Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Using BLFS and Arch Linux Have Error qt.qpa.xcb: could not connect to display
Forum Updated to NodeBB v4.3 + New Features

Using BLFS and Arch Linux Have Error qt.qpa.xcb: could not connect to display

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
9 Posts 2 Posters 2.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.
  • G Offline
    G Offline
    glanzkaiser
    wrote on 11 Mar 2022, 05:15 last edited by
    #1

    Dear Qt Forum,
    Sorry if I bother you all. I am learning to create OS with KDE as my Desktop Environment using Qemu/KVM, my laptop is using CAELinux but I use ArchLinux as the virtual OS / main OS for my Linux From Scratch experimental OS.

    I already at this stage (https://www.linuxfromscratch.org/blfs/view/11.0/kde/plasma-all.html), I am using /opt/kf5 as my prefix but when I want to try it by running:
    "startx"
    an error window showed up saying:
    'ksplashqml closed unexpectedly
    Details: ksplashqml PID: 9212 Signal: Segmentation fault(11)'

    I asked BLFS forum it stated that I need to check environment variables, I already put it correctly according to the BLFS book.
    Then I check :
    "qml --version"
    It stated:
    '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.'

    I guess my Qt is not installed right is it true? or I need to download a package related to "xcb" or do I need to do anything else to fix this?

    Thank You

    J 1 Reply Last reply 11 Mar 2022, 05:18
    0
    • G glanzkaiser
      11 Mar 2022, 05:15

      Dear Qt Forum,
      Sorry if I bother you all. I am learning to create OS with KDE as my Desktop Environment using Qemu/KVM, my laptop is using CAELinux but I use ArchLinux as the virtual OS / main OS for my Linux From Scratch experimental OS.

      I already at this stage (https://www.linuxfromscratch.org/blfs/view/11.0/kde/plasma-all.html), I am using /opt/kf5 as my prefix but when I want to try it by running:
      "startx"
      an error window showed up saying:
      'ksplashqml closed unexpectedly
      Details: ksplashqml PID: 9212 Signal: Segmentation fault(11)'

      I asked BLFS forum it stated that I need to check environment variables, I already put it correctly according to the BLFS book.
      Then I check :
      "qml --version"
      It stated:
      '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.'

      I guess my Qt is not installed right is it true? or I need to download a package related to "xcb" or do I need to do anything else to fix this?

      Thank You

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 11 Mar 2022, 05:18 last edited by
      #2

      @glanzkaiser said in Using BLFS and Arch Linux Have Error qt.qpa.xcb: could not connect to display:

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

      Looks like you do not have X server running?

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

      1 Reply Last reply
      0
      • G Offline
        G Offline
        glanzkaiser
        wrote on 11 Mar 2022, 05:30 last edited by
        #3

        I have make Xorg working in the past at X Window Environment stage.
        How to fix this or check that the X server is running?
        Thanks

        J 1 Reply Last reply 11 Mar 2022, 05:33
        0
        • G glanzkaiser
          11 Mar 2022, 05:30

          I have make Xorg working in the past at X Window Environment stage.
          How to fix this or check that the X server is running?
          Thanks

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 11 Mar 2022, 05:33 last edited by
          #4

          @glanzkaiser You can try to run any other X application.
          Also, what does

          echo $DISPLAY
          

          output?

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            glanzkaiser
            wrote on 11 Mar 2022, 05:43 last edited by
            #5

            it returns nothing, I have to set this one then. I try to do this just now:
            " export DISPLAY=0"
            then I check again:
            "qml --version"
            It returns a lot of strings and at the end:
            'Got keys from plugin meta data ("xcb")
            QFactoryLoader::QFactoryLoader() checking directory path "opt/kf5/lib/plugins/kcms/platforms"...
            QFactoryLoader::QFactoryLoader() checking directory path "opt/qt5/bin/platforms"...
            loaded library "/opt/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.'

            What value should I set for $DISPLAY to fix the ksplashqml error when running startx to run KDE Plasma?

            Thanks jsulm

            J 1 Reply Last reply 11 Mar 2022, 05:47
            0
            • G glanzkaiser
              11 Mar 2022, 05:43

              it returns nothing, I have to set this one then. I try to do this just now:
              " export DISPLAY=0"
              then I check again:
              "qml --version"
              It returns a lot of strings and at the end:
              'Got keys from plugin meta data ("xcb")
              QFactoryLoader::QFactoryLoader() checking directory path "opt/kf5/lib/plugins/kcms/platforms"...
              QFactoryLoader::QFactoryLoader() checking directory path "opt/qt5/bin/platforms"...
              loaded library "/opt/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.'

              What value should I set for $DISPLAY to fix the ksplashqml error when running startx to run KDE Plasma?

              Thanks jsulm

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 11 Mar 2022, 05:47 last edited by
              #6

              @glanzkaiser said in Using BLFS and Arch Linux Have Error qt.qpa.xcb: could not connect to display:

              it returns nothing

              Then X server is not running. Setting DISPLAY manually will not help. You need to make sure X server is running.

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

              1 Reply Last reply
              0
              • G Offline
                G Offline
                glanzkaiser
                wrote on 11 Mar 2022, 06:36 last edited by
                #7

                @jsulm said in Using BLFS and Arch Linux Have Error qt.qpa.xcb: could not connect to display:

                X server is not running.

                So I start X Server by using Fluxbox DE then I check:
                "qml --version"
                it returns :
                'Qml runtime 5.15.2'

                Then I type:
                "echo $DISPLAY"
                returns:
                ':0.0'

                then I edit the ~/.xinitrc into:
                "dbus-launch --exit-with-session $KF5_PREFIX/bin/startplasma-x11"
                only one line, then I type on xterm inside Fluxbox:
                "startx"
                the cursor changed but the screen is black, no more ksplashqml error shown. Should I consult with KDE team for this or is it because I am missing something?

                Thanks.

                J 1 Reply Last reply 11 Mar 2022, 06:59
                0
                • G glanzkaiser
                  11 Mar 2022, 06:36

                  @jsulm said in Using BLFS and Arch Linux Have Error qt.qpa.xcb: could not connect to display:

                  X server is not running.

                  So I start X Server by using Fluxbox DE then I check:
                  "qml --version"
                  it returns :
                  'Qml runtime 5.15.2'

                  Then I type:
                  "echo $DISPLAY"
                  returns:
                  ':0.0'

                  then I edit the ~/.xinitrc into:
                  "dbus-launch --exit-with-session $KF5_PREFIX/bin/startplasma-x11"
                  only one line, then I type on xterm inside Fluxbox:
                  "startx"
                  the cursor changed but the screen is black, no more ksplashqml error shown. Should I consult with KDE team for this or is it because I am missing something?

                  Thanks.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 11 Mar 2022, 06:59 last edited by
                  #8

                  @glanzkaiser said in Using BLFS and Arch Linux Have Error qt.qpa.xcb: could not connect to display:

                  then I type on xterm inside Fluxbox:
                  "startx"

                  But X server is already running, right?
                  You should first exit Fluxbox.

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

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    glanzkaiser
                    wrote on 11 Mar 2022, 07:03 last edited by
                    #9

                    Yes I logout and in the LXDM I choose "Plasma (X11)" then it hangs but the cursor of the mouse changing shape.

                    1 Reply Last reply
                    0

                    1/9

                    11 Mar 2022, 05:15

                    • Login

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