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

qt.qpa.xcb: could not connect to display

Scheduled Pinned Locked Moved Solved Installation and Deployment
23 Posts 7 Posters 152.7k 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.
  • J Offline
    J Offline
    jarvis
    wrote on 22 May 2020, 07:50 last edited by
    #3

    And after trying ldd command

    jarvis@hp:/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms$ ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
    linux-vdso.so.1 (0x00007fffd1586000)
    libQt5XcbQpa.so.5 => /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 (0x00007f544e1c0000)
    libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007f544dbe0000)
    libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f544d6a0000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f544d4d0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f544d300000)
    libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f544d2b0000)
    libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f544d1e0000)
    libQt5DBus.so.5 => /lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007f544d140000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f544d11f000)
    libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f544d110000)
    libxcb-xinput.so.0 => /lib/x86_64-linux-gnu/libxcb-xinput.so.0 (0x00007f544d0e0000)
    libxcb-icccm.so.4 => /lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007f544d0d0000)
    libxcb-image.so.0 => /lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007f544ceb0000)
    libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f544cea0000)
    libxcb-keysyms.so.1 => /lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007f544cc90000)
    libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f544cc70000)
    libxcb-render-util.so.0 => /lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007f544ca60000)
    libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f544ca50000)
    libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f544ca30000)
    libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f544ca20000)
    libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f544ca10000)
    libxcb-xinerama.so.0 => /lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007f544ca00000)
    libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f544c9e0000)
    libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f544c9b0000)
    libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f544c790000)
    libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f544c640000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f544c4f0000)
    libSM.so.6 => /lib/x86_64-linux-gnu/libSM.so.6 (0x00007f544c4e0000)
    libICE.so.6 => /lib/x86_64-linux-gnu/libICE.so.6 (0x00007f544c2c0000)
    libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f544c2b0000)
    libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f544c250000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f544c120000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f544c100000)
    libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f544c070000)
    libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f544c030000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f544c000000)
    libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f544bef0000)
    libicui18n.so.63 => /lib/x86_64-linux-gnu/libicui18n.so.63 (0x00007f544bc10000)
    libicuuc.so.63 => /lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f544ba30000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f544ba20000)
    libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007f544b990000)
    libdouble-conversion.so.3 => /lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007f544b960000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f544e374000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f544b930000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f544b920000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f544b8c0000)
    libxcb-util.so.0 => /lib/x86_64-linux-gnu/libxcb-util.so.0 (0x00007f544b6b0000)
    libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f544b490000)
    libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f544b280000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f544b260000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f544b1e0000)
    libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f544b120000)
    libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f544b0d0000)
    libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f544b0a0000)
    libicudata.so.63 => /lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f54496a0000)
    libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f54495f0000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f54495e0000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f54495a0000)
    liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f5449570000)
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f5449450000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f5449420000)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 May 2020, 08:15 last edited by
      #4

      Hi,

      How are you installing it ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply 22 May 2020, 08:27
      0
      • S SGaist
        22 May 2020, 08:15

        Hi,

        How are you installing it ?

        J Offline
        J Offline
        jarvis
        wrote on 22 May 2020, 08:27 last edited by
        #5

        Hi @SGaist

        sudo apt-get install wireshark in kali linux

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jarvis
          wrote on 22 May 2020, 08:39 last edited by
          #6

          I even tried QT_QPA_PLATFORM_PLUGIN_PATH= /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 22 May 2020, 08:43 last edited by
            #7

            Did you test other Qt based applications ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jarvis
              wrote on 22 May 2020, 08:51 last edited by
              #8

              Well not yet

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jarvis
                wrote on 22 May 2020, 11:27 last edited by
                #9

                Is there any way to restore libqxcb.so this file is missing.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 22 May 2020, 11:29 last edited by
                  #10

                  You deleted it from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  J 1 Reply Last reply 22 May 2020, 14:05
                  0
                  • S SGaist
                    22 May 2020, 11:29

                    You deleted it from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ ?

                    J Offline
                    J Offline
                    jarvis
                    wrote on 22 May 2020, 14:05 last edited by
                    #11

                    @SGaist I have it now
                    still facing the same issue

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jarvis
                      wrote on 22 May 2020, 15:58 last edited by
                      #12

                      can any symbolic link solve this issue?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 22 May 2020, 17:53 last edited by
                        #13

                        No

                        As requested did you check other Qt application ?
                        What desktop environment are you using ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          jarvis
                          wrote on 23 May 2020, 07:35 last edited by
                          #14

                          Well i am on windows 10 with enabled subsystem kali linux.
                          "sudo apt-get install wireshark-common" was the command which I used,
                          it downloads all the lib as well automatically which I mentioned above.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 23 May 2020, 17:29 last edited by
                            #15

                            That's the kind of details that is important. A full blown Linux system or the Windows Linux subsystem is not exactly the same.

                            AFAIK, they currently don't provide direct support for X11, you may have to install a tool like Xming for that.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              jarvis
                              wrote on 27 May 2020, 06:18 last edited by
                              #16

                              Well I have installed Xming. Could you please help me with this

                              qt.qpa.xcb: X server does not support XInput 2
                              failed to get the current screen resources
                              QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-jarvis'
                              Failed to connect to generic netlink.
                              The X11 connection broke: I/O error (code 1)
                              XIO: fatal IO error 2 (No such file or directory) on X server ":0"
                              after 364 requests (364 known processed) with 0 events remaining.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 27 May 2020, 13:44 last edited by
                                #17

                                I can currently go further as I don't have a Windows machine at hand.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • J Offline
                                  J Offline
                                  jarvis
                                  wrote on 28 May 2020, 06:58 last edited by
                                  #18

                                  Well, I have installed VcXsrv instead of Xming and now Wireshark is working just as expected.

                                  Thanks @SGaist

                                  1 Reply Last reply
                                  0
                                  • N Offline
                                    N Offline
                                    Networkyy
                                    wrote on 12 Oct 2020, 11:26 last edited by
                                    #19

                                    Hello i have this message while trying to downgrde ubuntu 20.04 to 18.04

                                    E: The repository 'https://packages.sury.org/php focal Release' does not have a Release file.
                                    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
                                    N: See apt-secure(8) manpage for repository creation and user configuration details.
                                    E: The repository 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04 Release' does not have a Release file.
                                    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
                                    N: See apt-secure(8) manpage for repository creation and user configuration details.

                                    jsulmJ 1 Reply Last reply 12 Oct 2020, 12:01
                                    0
                                    • N Networkyy
                                      12 Oct 2020, 11:26

                                      Hello i have this message while trying to downgrde ubuntu 20.04 to 18.04

                                      E: The repository 'https://packages.sury.org/php focal Release' does not have a Release file.
                                      N: Updating from such a repository can't be done securely, and is therefore disabled by default.
                                      N: See apt-secure(8) manpage for repository creation and user configuration details.
                                      E: The repository 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04 Release' does not have a Release file.
                                      N: Updating from such a repository can't be done securely, and is therefore disabled by default.
                                      N: See apt-secure(8) manpage for repository creation and user configuration details.

                                      jsulmJ Online
                                      jsulmJ Online
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on 12 Oct 2020, 12:01 last edited by
                                      #20

                                      @Networkyy How is your issue related to this thread?
                                      It is not even clear to me how it is related to Qt at all...

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      1
                                      • Z Offline
                                        Z Offline
                                        ZainlessBrombie
                                        wrote on 2 Dec 2020, 20:16 last edited by
                                        #21

                                        FYI I had this issue when I had ssh-ed into localhost for port forwarding and tried to start it from there. A fresh terminal worked.
                                        What I am trying to say is: Check if your $DISPLAY ist set correctly for the process and that it can communicate.

                                        1 Reply Last reply
                                        1
                                        • J Offline
                                          J Offline
                                          John.M T
                                          wrote on 6 Feb 2022, 11:20 last edited by
                                          #22

                                          hi guys,
                                          I have the same error when issuing the following command:
                                          ros2 run turtlesim turtlesim_node

                                          My environment:
                                          Running ubuntu20.04 server with ROS2 foxy desktop on Raspberry Pi 4.
                                          Using windows10 putty ssh to access raspberry pi 4 and login into its ubuntu,
                                          and issued the command "ros2 run turtlesim turtlesim_node"

                                          Error message:


                                          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.
                                          This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

                                          Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.


                                          Please advise.
                                          Thanks.

                                          JonBJ 1 Reply Last reply 6 Feb 2022, 15:06
                                          0

                                          • Login

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