Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. qt.qpa.xcb: could not connect to display :0

qt.qpa.xcb: could not connect to display :0

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
26 Posts 7 Posters 57.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S SSJCarti

    @JonB Do you have any ideas?

    JonBJ Online
    JonBJ Online
    JonB
    wrote on last edited by
    #16

    @SSJCarti

    loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
    qt.qpa.xcb: could not connect to display :0
    qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
    

    I know little about, less than you or @Pablo-J-Rogina . But it does seem to me that whatever he is trying to ask/tell you about an X server --- either not running or somehow not found? --- is what is causing the problem here, given that it has said

    loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
    Could not load the Qt platform plugin "xcb" in "" even though it was found.

    ?

    There are many Google hits for Could not load the Qt platform plugin "xcb", and we usually find that is an absent library like libxcb-xinerama.so.0. But here I am thinking you should Google for could not load the qt platform plugin "xcb" in "" even though it was found. The "even though it was found" being key. There are a bunch of hits on that, things like XDG_RUNTIME_DIR not giving you a good X environment. If I understood any of this :) that is what I would look through.

    S 1 Reply Last reply
    0
    • JonBJ JonB

      @SSJCarti

      loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
      qt.qpa.xcb: could not connect to display :0
      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
      

      I know little about, less than you or @Pablo-J-Rogina . But it does seem to me that whatever he is trying to ask/tell you about an X server --- either not running or somehow not found? --- is what is causing the problem here, given that it has said

      loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
      Could not load the Qt platform plugin "xcb" in "" even though it was found.

      ?

      There are many Google hits for Could not load the Qt platform plugin "xcb", and we usually find that is an absent library like libxcb-xinerama.so.0. But here I am thinking you should Google for could not load the qt platform plugin "xcb" in "" even though it was found. The "even though it was found" being key. There are a bunch of hits on that, things like XDG_RUNTIME_DIR not giving you a good X environment. If I understood any of this :) that is what I would look through.

      S Offline
      S Offline
      SSJCarti
      wrote on last edited by
      #17

      @JonB alright thank you ill look for that

      JonBJ 1 Reply Last reply
      0
      • S SSJCarti

        @JonB alright thank you ill look for that

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by JonB
        #18

        @SSJCarti
        One thing: It seems to me there is a related discussion going on in https://forum.qt.io/topic/120349/run-qt-gui-application-inside-docker. I assume that Poster is not yourself too. At least, that seems to get the same message as you do:

        loaded library "/home/user/app/platforms/libqxcb.so"
        qt.qpa.xcb: could not connect to display
        qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

        So maybe worth a look?

        EDIT @Pablo-J-Rogina has said below this would not be helpful to you, so don't! :)

        Pablo J. RoginaP 1 Reply Last reply
        0
        • JonBJ JonB

          @SSJCarti
          One thing: It seems to me there is a related discussion going on in https://forum.qt.io/topic/120349/run-qt-gui-application-inside-docker. I assume that Poster is not yourself too. At least, that seems to get the same message as you do:

          loaded library "/home/user/app/platforms/libqxcb.so"
          qt.qpa.xcb: could not connect to display
          qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

          So maybe worth a look?

          EDIT @Pablo-J-Rogina has said below this would not be helpful to you, so don't! :)

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #19

          @JonB said in qt.qpa.xcb: could not connect to display :0:

          So maybe worth a look?

          I don't think the goals/environments are the same... I'd say it will mislead OP here

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          S 1 Reply Last reply
          1
          • Pablo J. RoginaP Pablo J. Rogina

            @JonB said in qt.qpa.xcb: could not connect to display :0:

            So maybe worth a look?

            I don't think the goals/environments are the same... I'd say it will mislead OP here

            S Offline
            S Offline
            SSJCarti
            wrote on last edited by
            #20

            @Pablo-J-Rogina so is my Xlaunch a xserver?

            Pablo J. RoginaP 1 Reply Last reply
            0
            • S SSJCarti

              @Pablo-J-Rogina so is my Xlaunch a xserver?

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #21

              @SSJCarti said in qt.qpa.xcb: could not connect to display :0:

              is my Xlaunch a xserver?

              Once again, you failed to provided a link to such component/application... Make life easier for the ones that may help you.

              If you're referring to this Xlaunch, I'm not familiar with it but from its documentation it is not an X server:

              XLaunch is a wizard to make starting X server sessions easy

              In addition, have you checked the videos I suggested?

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              S 1 Reply Last reply
              0
              • Pablo J. RoginaP Pablo J. Rogina

                @SSJCarti said in qt.qpa.xcb: could not connect to display :0:

                is my Xlaunch a xserver?

                Once again, you failed to provided a link to such component/application... Make life easier for the ones that may help you.

                If you're referring to this Xlaunch, I'm not familiar with it but from its documentation it is not an X server:

                XLaunch is a wizard to make starting X server sessions easy

                In addition, have you checked the videos I suggested?

                S Offline
                S Offline
                SSJCarti
                wrote on last edited by
                #22

                @Pablo-J-Rogina I do not know what an xserver is, I am very new to this whole type of stuff

                Pablo J. RoginaP 1 Reply Last reply
                0
                • S SSJCarti

                  @Pablo-J-Rogina I do not know what an xserver is, I am very new to this whole type of stuff

                  Pablo J. RoginaP Offline
                  Pablo J. RoginaP Offline
                  Pablo J. Rogina
                  wrote on last edited by
                  #23

                  @SSJCarti said in qt.qpa.xcb: could not connect to display :0:

                  what an xserver is

                  I guess you'll find lots of references, documentation, tutorials about the X windowing system.
                  One of the videos I linked before does a good job at describing the purpose and some details of an X server.

                  Upvote the answer(s) that helped you solve the issue
                  Use "Topic Tools" button to mark your post as Solved
                  Add screenshots via postimage.org
                  Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    BertChristiaens
                    wrote on last edited by
                    #24

                    In my case I was using PyQt5 in a docker container. Even though
                    i forwarded my DISPLAY variable and X11-unix path, it didn't seem to find the display.

                    The solution for me was running xhost +local:* in the terminal of the host (outside of the container), to allow the server connection to be used by the container.

                    M T 2 Replies Last reply
                    1
                    • B BertChristiaens

                      In my case I was using PyQt5 in a docker container. Even though
                      i forwarded my DISPLAY variable and X11-unix path, it didn't seem to find the display.

                      The solution for me was running xhost +local:* in the terminal of the host (outside of the container), to allow the server connection to be used by the container.

                      M Offline
                      M Offline
                      Messiah
                      wrote on last edited by
                      #25

                      @BertChristiaens I created an account just to say that this is exactly what I was looking for! After hours of sifting through online forums trying to find a solution to this problem, this is the one that worked like a charm! Thank you good sir!

                      1 Reply Last reply
                      0
                      • B BertChristiaens

                        In my case I was using PyQt5 in a docker container. Even though
                        i forwarded my DISPLAY variable and X11-unix path, it didn't seem to find the display.

                        The solution for me was running xhost +local:* in the terminal of the host (outside of the container), to allow the server connection to be used by the container.

                        T Offline
                        T Offline
                        tosh_45
                        wrote on last edited by tosh_45
                        #26
                        This post is deleted!
                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved