CloudCompare fails to launch with error: “QXcbConnection: Could not connect to display :0”












0















In the last week, CloudCompare has suddenly stopped launching. When trying to launch via desktop icon, nothing happens. When trying to launch via commandline (e.g. $ cloudcompare.CloudCompare) nothing happens and I get the following error:



QXcbConnection: Could not connect to display :0
Aborted (core dumped)


Trying to launch CloudCompare with sudo/as root user returns a slightly different error message:



mkdir: cannot create directory '/run/user/0': Permission denied
QXcbConnection: Could not connect to display :0


Having looked around Github, here and various other forums, this seems to be a problem that people have encountered with other programs that use Qt and/or OpenGL (see 1, 2, 3). I also realise that this isn't really enough information to debug the problem, so if there is any other diagnostic info I can/should provide, let me know and I will add it.



My Environment





  • OS & Version: Ubuntu 14.04 LTS


  • CC Version: v2.8.1 (latest)


  • Graphics card: Intel Haswell Mobile


  • Qt version: 5.2.1










share|improve this question
















bumped to the homepage by Community 2 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    In the last week, CloudCompare has suddenly stopped launching. When trying to launch via desktop icon, nothing happens. When trying to launch via commandline (e.g. $ cloudcompare.CloudCompare) nothing happens and I get the following error:



    QXcbConnection: Could not connect to display :0
    Aborted (core dumped)


    Trying to launch CloudCompare with sudo/as root user returns a slightly different error message:



    mkdir: cannot create directory '/run/user/0': Permission denied
    QXcbConnection: Could not connect to display :0


    Having looked around Github, here and various other forums, this seems to be a problem that people have encountered with other programs that use Qt and/or OpenGL (see 1, 2, 3). I also realise that this isn't really enough information to debug the problem, so if there is any other diagnostic info I can/should provide, let me know and I will add it.



    My Environment





    • OS & Version: Ubuntu 14.04 LTS


    • CC Version: v2.8.1 (latest)


    • Graphics card: Intel Haswell Mobile


    • Qt version: 5.2.1










    share|improve this question
















    bumped to the homepage by Community 2 hours ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      In the last week, CloudCompare has suddenly stopped launching. When trying to launch via desktop icon, nothing happens. When trying to launch via commandline (e.g. $ cloudcompare.CloudCompare) nothing happens and I get the following error:



      QXcbConnection: Could not connect to display :0
      Aborted (core dumped)


      Trying to launch CloudCompare with sudo/as root user returns a slightly different error message:



      mkdir: cannot create directory '/run/user/0': Permission denied
      QXcbConnection: Could not connect to display :0


      Having looked around Github, here and various other forums, this seems to be a problem that people have encountered with other programs that use Qt and/or OpenGL (see 1, 2, 3). I also realise that this isn't really enough information to debug the problem, so if there is any other diagnostic info I can/should provide, let me know and I will add it.



      My Environment





      • OS & Version: Ubuntu 14.04 LTS


      • CC Version: v2.8.1 (latest)


      • Graphics card: Intel Haswell Mobile


      • Qt version: 5.2.1










      share|improve this question
















      In the last week, CloudCompare has suddenly stopped launching. When trying to launch via desktop icon, nothing happens. When trying to launch via commandline (e.g. $ cloudcompare.CloudCompare) nothing happens and I get the following error:



      QXcbConnection: Could not connect to display :0
      Aborted (core dumped)


      Trying to launch CloudCompare with sudo/as root user returns a slightly different error message:



      mkdir: cannot create directory '/run/user/0': Permission denied
      QXcbConnection: Could not connect to display :0


      Having looked around Github, here and various other forums, this seems to be a problem that people have encountered with other programs that use Qt and/or OpenGL (see 1, 2, 3). I also realise that this isn't really enough information to debug the problem, so if there is any other diagnostic info I can/should provide, let me know and I will add it.



      My Environment





      • OS & Version: Ubuntu 14.04 LTS


      • CC Version: v2.8.1 (latest)


      • Graphics card: Intel Haswell Mobile


      • Qt version: 5.2.1







      linux qt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 3 '17 at 1:14







      Matt

















      asked Nov 3 '17 at 0:26









      MattMatt

      112




      112





      bumped to the homepage by Community 2 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 2 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Newer systems by design don't allow graphical applications as root (it's a Wayland thing). Workaround:



          $ xhost si:localuser:root
          $ sudo ...your-graphical-app...


          Restore the default permissions:



          $ xhost -si:localuser:root





          share|improve this answer


























          • Many thanks for the answer! I haven't encountered the problem since re-installing CloudCompare, but if it happens again I will certainly try this and report back.

            – Matt
            Apr 9 '18 at 22:00











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402180%2fcloudcompare-fails-to-launch-with-error-qxcbconnection-could-not-connect-to-d%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Newer systems by design don't allow graphical applications as root (it's a Wayland thing). Workaround:



          $ xhost si:localuser:root
          $ sudo ...your-graphical-app...


          Restore the default permissions:



          $ xhost -si:localuser:root





          share|improve this answer


























          • Many thanks for the answer! I haven't encountered the problem since re-installing CloudCompare, but if it happens again I will certainly try this and report back.

            – Matt
            Apr 9 '18 at 22:00
















          0














          Newer systems by design don't allow graphical applications as root (it's a Wayland thing). Workaround:



          $ xhost si:localuser:root
          $ sudo ...your-graphical-app...


          Restore the default permissions:



          $ xhost -si:localuser:root





          share|improve this answer


























          • Many thanks for the answer! I haven't encountered the problem since re-installing CloudCompare, but if it happens again I will certainly try this and report back.

            – Matt
            Apr 9 '18 at 22:00














          0












          0








          0







          Newer systems by design don't allow graphical applications as root (it's a Wayland thing). Workaround:



          $ xhost si:localuser:root
          $ sudo ...your-graphical-app...


          Restore the default permissions:



          $ xhost -si:localuser:root





          share|improve this answer















          Newer systems by design don't allow graphical applications as root (it's a Wayland thing). Workaround:



          $ xhost si:localuser:root
          $ sudo ...your-graphical-app...


          Restore the default permissions:



          $ xhost -si:localuser:root






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 9 '18 at 3:12









          slm

          254k71535687




          254k71535687










          answered Apr 8 '18 at 12:07









          kubanczykkubanczyk

          876514




          876514













          • Many thanks for the answer! I haven't encountered the problem since re-installing CloudCompare, but if it happens again I will certainly try this and report back.

            – Matt
            Apr 9 '18 at 22:00



















          • Many thanks for the answer! I haven't encountered the problem since re-installing CloudCompare, but if it happens again I will certainly try this and report back.

            – Matt
            Apr 9 '18 at 22:00

















          Many thanks for the answer! I haven't encountered the problem since re-installing CloudCompare, but if it happens again I will certainly try this and report back.

          – Matt
          Apr 9 '18 at 22:00





          Many thanks for the answer! I haven't encountered the problem since re-installing CloudCompare, but if it happens again I will certainly try this and report back.

          – Matt
          Apr 9 '18 at 22:00


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402180%2fcloudcompare-fails-to-launch-with-error-qxcbconnection-could-not-connect-to-d%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Loup dans la culture

          How to solve the problem of ntp “Unable to contact time server” from KDE?

          Connection limited (no internet access)