Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt.qpa.xcb: could not connect to display error
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 4.3k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    Dijkstra
    wrote on last edited by
    #1

    i am getting this error when i ssh to another machine and try to run my qt app the only thing that removes this error is by remove the qcoreapplication variable and it return in the main function any help ?

    JonBJ 2 Replies Last reply
    0
    • D Dijkstra

      i am getting this error when i ssh to another machine and try to run my qt app the only thing that removes this error is by remove the qcoreapplication variable and it return in the main function any help ?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Dijkstra
      Almost certainly you are not giving it a display to render to. DISPLAY environment variable for X11?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dijkstra
        wrote on last edited by
        #3

        what should i set the display to in the enviroment variables for it to work ?

        JonBJ 1 Reply Last reply
        0
        • D Dijkstra

          what should i set the display to in the enviroment variables for it to work ?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Dijkstra
          To whatever X display you want it to use! Not my area, but I think export DISPLAY=0:0 is where to start from. But you'll have to Google the web to understand what you need.

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

            Hi,

            @Dijkstra said in qt.qpa.xcb: could not connect to display error:

            i am getting this error when i ssh to another machine and try to run my qt app the only thing that removes this error is by remove the qcoreapplication variable and it return in the main function any help ?

            That is highly unlikely as QCoreApplication does not need any connection to the graphics server. Do you maybe have a QGuiApplication or just a QApplication ?

            In any case, is it a command line application or does it have a GUI ?

            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
            • D Dijkstra

              i am getting this error when i ssh to another machine and try to run my qt app the only thing that removes this error is by remove the qcoreapplication variable and it return in the main function any help ?

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @Dijkstra
              If it is not a display issue as I had assumed, you can discover the cause by setting environment variable export QT_DEBUG_PLUGINS (this needs to be in the remote shell), running your program, and looking at the end of the diagnostic output.

              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