QXcbConnection: Could not connect to display
-
wrote on 6 Oct 2017, 08:30 last edited by
Hi all!
I am developing my QtQuick2 application on Ubuntu 16.04.
Now I am trying to remote debug my QtQuick2 application on an Ubuntu 15.04.
But this does not work.
I always get following message and then the application aborts:QXcbConnection: Could not connect to display Process killed by signal
Does anyone have an idea what could be the reason for this problem and how it can be solved?
-
Hi all!
I am developing my QtQuick2 application on Ubuntu 16.04.
Now I am trying to remote debug my QtQuick2 application on an Ubuntu 15.04.
But this does not work.
I always get following message and then the application aborts:QXcbConnection: Could not connect to display Process killed by signal
Does anyone have an idea what could be the reason for this problem and how it can be solved?
-
wrote on 6 Oct 2017, 09:01 last edited by
@m.sue :
Oh. I forgot to mention.
I am using the QtCreator and therefore I am connecting via ssh.
The connection it self can be established. But then my application crashes with the message: "QXcbConnection: Could not connect to display. Process killed by signal." -
@m.sue :
Oh. I forgot to mention.
I am using the QtCreator and therefore I am connecting via ssh.
The connection it self can be established. But then my application crashes with the message: "QXcbConnection: Could not connect to display. Process killed by signal." -
Hi @MHermann
Does your program start if you call it on the Ubuntu 16 machine directly from the command line?
-Michael.
-
@m.sue :
Yes. If I copy my application to the system, then I can start it on the Ubuntu via command line and it is running without problems. -
Hi @MHermann
Did you connect via ssh -X or such from the Ubuntu 15 machine for this start test or did you try it directly on the Ubuntu 16 machine?
-Michael.
-
@m.sue :
I tried it directly on the Ubuntu 16 machine.
Is it possible to use QtCreator with ssh -X?wrote on 6 Oct 2017, 10:27 last edited byHi @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.
-
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.
wrote on 6 Oct 2017, 11:05 last edited by@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.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?
-
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.
wrote on 6 Oct 2017, 11:19 last edited by@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.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.
wrote on 6 Oct 2017, 11:24 last edited by m.sue 10 Jun 2017, 11:33Hi @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.
-
-
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.
wrote on 10 Oct 2017, 05:26 last edited byHas somebody else an idea how I can resolve this problem???
-
wrote on 12 Oct 2017, 12:10 last edited by
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.
-
wrote on 27 Oct 2017, 11:06 last edited by
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? -
wrote on 24 Dec 2017, 11:16 last edited by
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/.XauthorityNote that I have also set the run argument as -platform xcb
-
wrote on 2 May 2019, 12:15 last edited by
Just as normal user authorize root, to connect to your display :)
xhost +SI:localuser:root -
This post is deleted!