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
QtWS25 Last Chance

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 last edited by
    #1

    Hi,

    When I am trying to install wireshark on kali linux I am facing this issue. Could anyone help me out with this?

    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.

    Thanks

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jarvis
      wrote on last edited by
      #2

      after using export QT_DEBUG_PLUGINS=1

      jarvis@hp:/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms$ export QT_DEBUG_PLUGINS=1
      jarvis@hp:/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms$ wireshark
      QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms" ...
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "eglfs"
      ]
      },
      "archreq": 0,
      "className": "QEglFSIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("eglfs")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "linuxfb"
      ]
      },
      "archreq": 0,
      "className": "QLinuxFbIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("linuxfb")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "minimal"
      ]
      },
      "archreq": 0,
      "className": "QMinimalIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("minimal")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "minimalegl"
      ]
      },
      "archreq": 0,
      "className": "QMinimalEglIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("minimalegl")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "offscreen"
      ]
      },
      "archreq": 0,
      "className": "QOffscreenIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("offscreen")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "vnc"
      ]
      },
      "archreq": 0,
      "className": "QVncIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("vnc")
      QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
      Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
      {
      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
      "MetaData": {
      "Keys": [
      "xcb"
      ]
      },
      "archreq": 0,
      "className": "QXcbIntegrationPlugin",
      "debug": false,
      "version": 330752
      }

      Got keys from plugin meta data ("xcb")
      QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
      QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqeglfs.so"
      Got keys from plugin meta data ("eglfs")
      QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqlinuxfb.so"
      Got keys from plugin meta data ("linuxfb")
      QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimal.so"
      Got keys from plugin meta data ("minimal")
      QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqminimalegl.so"
      Got keys from plugin meta data ("minimalegl")
      QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqoffscreen.so"
      Got keys from plugin meta data ("offscreen")
      QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqvnc.so"
      Got keys from plugin meta data ("vnc")
      QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqxcb.so"
      Got keys from plugin meta data ("xcb")
      loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/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.
      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.

      Aborted (core dumped)

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jarvis
        wrote on 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          0
          • SGaistS SGaist

            Hi,

            How are you installing it ?

            J Offline
            J Offline
            jarvis
            wrote on 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 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
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on 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 last edited by
                  #8

                  Well not yet

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    jarvis
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 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
                      0
                      • SGaistS SGaist

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

                        J Offline
                        J Offline
                        jarvis
                        wrote on 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 last edited by
                          #12

                          can any symbolic link solve this issue?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 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 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
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 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 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
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 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 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 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
                                        0
                                        • N Networkyy

                                          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 Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 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

                                          • Login

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