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. QXcbConnection: Could not connect to display

QXcbConnection: Could not connect to display

Scheduled Pinned Locked Moved Solved Installation and Deployment
18 Posts 6 Posters 85.9k 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.
  • M MHermann
    6 Oct 2017, 09:33

    @m.sue :
    I tried it directly on the Ubuntu 16 machine.
    Is it possible to use QtCreator with ssh -X?

    M Offline
    M Offline
    m.sue
    wrote on 6 Oct 2017, 10:27 last edited by
    #8

    Hi @MHermann

    I would assume that QtCreator does this on its own for remote debugging?

    Please try also with ssh -X from the Ubuntu 16 command line. If this works the problem lies within QtCreator's connection to the remote machine.

    -Michael.

    M 1 Reply Last reply 6 Oct 2017, 11:05
    0
    • M m.sue
      6 Oct 2017, 10:27

      Hi @MHermann

      I would assume that QtCreator does this on its own for remote debugging?

      Please try also with ssh -X from the Ubuntu 16 command line. If this works the problem lies within QtCreator's connection to the remote machine.

      -Michael.

      M Offline
      M Offline
      MHermann
      wrote on 6 Oct 2017, 11:05 last edited by
      #9

      @m.sue :
      I tried it with ssh -X from the Ubuntu 16 command line.
      This is also not working.
      It gives me the following error messages:

      Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
      

      Any idea about this?

      M 1 Reply Last reply 6 Oct 2017, 11:16
      0
      • M MHermann
        6 Oct 2017, 11:05

        @m.sue :
        I tried it with ssh -X from the Ubuntu 16 command line.
        This is also not working.
        It gives me the following error messages:

        Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
        

        Any idea about this?

        M Offline
        M Offline
        m.sue
        wrote on 6 Oct 2017, 11:16 last edited by m.sue 10 Jun 2017, 11:16
        #10

        Hi @MHermann

        You will have to solve this OpenGL forwarding problem to make QtCreator remote debugging of a QML program possible.

        You will have to wait for someone else to take over here.

        -Michael.

        M 1 Reply Last reply 6 Oct 2017, 11:19
        0
        • M m.sue
          6 Oct 2017, 11:16

          Hi @MHermann

          You will have to solve this OpenGL forwarding problem to make QtCreator remote debugging of a QML program possible.

          You will have to wait for someone else to take over here.

          -Michael.

          M Offline
          M Offline
          MHermann
          wrote on 6 Oct 2017, 11:19 last edited by
          #11

          @m.sue :
          I am not sure if I understand you right here.
          For summerize:

          • I can compile and debug the app directly on my Ubuntu 16.

          • I can also compile remote debug the app on and Raspberry Pi.

          • I have only problems with remote debugging on Ubuntu 15.

          So the QtCreator is able to remote debug QML programs.

          M 1 Reply Last reply 6 Oct 2017, 11:24
          0
          • M MHermann
            6 Oct 2017, 11:19

            @m.sue :
            I am not sure if I understand you right here.
            For summerize:

            • I can compile and debug the app directly on my Ubuntu 16.

            • I can also compile remote debug the app on and Raspberry Pi.

            • I have only problems with remote debugging on Ubuntu 15.

            So the QtCreator is able to remote debug QML programs.

            M Offline
            M Offline
            m.sue
            wrote on 6 Oct 2017, 11:24 last edited by m.sue 10 Jun 2017, 11:33
            #12

            Hi @MHermann

            Yes but I think you have a problem to run a QML program on Ubuntu 15 remotely on Ubuntu 16. That is independent of QtCreator. The problem is to realize OpenGL commands generated in the program running on Ubuntu 15 on the graphics card of your Ubuntu 16 machine. This can be a configuration issue, a general problem, who knows.

            -Michael.

            M 1 Reply Last reply 10 Oct 2017, 05:26
            0
            • M m.sue
              6 Oct 2017, 11:24

              Hi @MHermann

              Yes but I think you have a problem to run a QML program on Ubuntu 15 remotely on Ubuntu 16. That is independent of QtCreator. The problem is to realize OpenGL commands generated in the program running on Ubuntu 15 on the graphics card of your Ubuntu 16 machine. This can be a configuration issue, a general problem, who knows.

              -Michael.

              M Offline
              M Offline
              MHermann
              wrote on 10 Oct 2017, 05:26 last edited by
              #13

              Has somebody else an idea how I can resolve this problem???

              M 1 Reply Last reply 12 Oct 2017, 12:10
              0
              • M MHermann
                10 Oct 2017, 05:26

                Has somebody else an idea how I can resolve this problem???

                M Offline
                M Offline
                MHermann
                wrote on 12 Oct 2017, 12:10 last edited by
                #14

                I found the solution.
                Maybe someone is interested in it...

                In QtCreator > Run Settings > Run Environment it is necessary to set two environment variables:

                • DISPLAY
                • XAUTHORITY

                After that the debugging works without problems.

                1 Reply Last reply
                1
                • D Offline
                  D Offline
                  da_ebeng
                  wrote on 27 Oct 2017, 11:06 last edited by
                  #15

                  Hi @MHermann ,
                  I have the same problem. i tried to fix it by setting these evironment variables (DISPLAY, XAUTHORITY) but I still get this error:
                  qt.qpa.screen: QXcbConnection: Could not connect to display <VALUE>
                  Could not connect to any X display.
                  I did not set the values of the environment variables. How did you set the values?

                  1 Reply Last reply
                  0
                  • O Offline
                    O Offline
                    obertini
                    wrote on 24 Dec 2017, 11:16 last edited by
                    #16

                    Hi,
                    Maybe that can help.

                    Cross-compiling Qt-5.10 on Raspberry Pi 3 running Raspbian Stretch
                    In Qt Creator, the Run parameters for the device are:
                    Use System Environment and
                    Set DISPLAY to :0
                    Set XAUTHORITY to /home/pi/.Xauthority

                    Note that I have also set the run argument as -platform xcb

                    1 Reply Last reply
                    1
                    • afyaA Offline
                      afyaA Offline
                      afya
                      wrote on 2 May 2019, 12:15 last edited by
                      #17

                      Just as normal user authorize root, to connect to your display :)
                      xhost +SI:localuser:root

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        pakainfo
                        Banned
                        wrote on 6 Dec 2021, 16:10 last edited by
                        #18
                        This post is deleted!
                        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