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. trying to start application gives Qfactory loader errors: qt.qpa.xcb: could not connect to display :0
Forum Update on Monday, May 27th 2025

trying to start application gives Qfactory loader errors: qt.qpa.xcb: could not connect to display :0

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 3 Posters 311 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.
  • W Offline
    W Offline
    Willem
    wrote on last edited by
    #1

    trying to start application gives Qfactory loader errors: qt.qpa.xcb: could not connect to display :0....
    I hav set export QT_DEBUG_PLUGINS=1 and started the application again. But same result with more messages.

    I also installed the application kstars again as advised but no luck. So please help. This is on a new Windwos11 machine. I also installed this on another Windows11 laptop and there it worked with no problem.

    Here it is:


    This message is shown once a day. To disable it please create the
    /home/wil_vree/.hushlogin file.
    wil_vree@BMAX1:~$ export QT_DEBUG_PLUGINS=1
    wil_vree@BMAX1:~$ kstars
    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": 331520
    }

    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": 331520
    }

    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": 331520
    }

    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": 331520
    }

    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": 331520
    }

    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": 331520
    }

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

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

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

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

    Got keys from plugin meta data ("wayland-xcomposite-glx")
    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": 331520
    }

    Got keys from plugin meta data ("xcb")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
    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.
    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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

    Aborted (core dumped)
    wil_vree@BMAX1:~$

    Axel SpoerlA 1 Reply Last reply
    0
    • W Willem

      trying to start application gives Qfactory loader errors: qt.qpa.xcb: could not connect to display :0....
      I hav set export QT_DEBUG_PLUGINS=1 and started the application again. But same result with more messages.

      I also installed the application kstars again as advised but no luck. So please help. This is on a new Windwos11 machine. I also installed this on another Windows11 laptop and there it worked with no problem.

      Here it is:


      This message is shown once a day. To disable it please create the
      /home/wil_vree/.hushlogin file.
      wil_vree@BMAX1:~$ export QT_DEBUG_PLUGINS=1
      wil_vree@BMAX1:~$ kstars
      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": 331520
      }

      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": 331520
      }

      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": 331520
      }

      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": 331520
      }

      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": 331520
      }

      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": 331520
      }

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

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

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

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

      Got keys from plugin meta data ("wayland-xcomposite-glx")
      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": 331520
      }

      Got keys from plugin meta data ("xcb")
      QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
      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.
      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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

      Aborted (core dumped)
      wil_vree@BMAX1:~$

      Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      @Willem said in trying to start application gives Qfactory loader errors: qt.qpa.xcb: could not connect to display :0:

      Hi and welcome!
      please format code with the </> code formatting tags. Its really cumbersome to read it otherwise.

      This is on a new Windwos11 machine

      That can't be true, because on Windows this path doesn't exist:

      loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"

      If the XCB plugin is loaded, you're running Linux. Also this is a Linux output / prompt:

      Aborted (core dumped)
      wil_vree@BMAX1:~$

      The actual error is here:

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

      The XCB plugin fails to connect to an X Terminal. That happens, if no X server is running at all, or the Qt application is started by a user, that has no permission to connect to :0.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        In addition to what @Axel-Spoerl wrote: are you using the Windows Subsystem for Linux ?
        Since you mention KStars, they have a Windows build so why not use that one directly ?

        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

        • Login

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