qt.qpa.xcb: could not connect to display :0
-
This is the link to the instructions for running the QtSlim, you have to go to section 2.4.5
http://benhaller.com/slim/SLiM_Manual.pdf
After running that this is what popped upadduser@DESKTOP-991BCVH:~$ export LIBGL_ALWAYS_INDIRECT=; export DISPLAY=:0; ~/build/QtSLiM
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": 330752
}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": 330752
}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": 330752
}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": 330752
}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": 330752
}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": 330752
}Got keys from plugin meta data ("vnc")
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": 330752
}Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/adduser/build/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, xcb.
Aborted
-
@SSJCarti said in qt.qpa.xcb: could not connect to display :0:
qt.qpa.xcb: could not connect to display :0
it seems you haven't looked at my previous post. You may need an X server running
-
@SSJCarti said in qt.qpa.xcb: could not connect to display :0:
I have a VcXsrv running
According to this site:
VcXsrv makes it possible to run Linux GUI programs installed with WSL, the Windows Subsystem for Linux. In bash for Windows, setting the DISPLAY environment variable allows WSL programs to use the Windows GUI. For instance, if VcXsrv is configured to use display number zero, the command DISPLAY=:0 etr would run the game Extreme Tux Racer
Given that you're running VcXsrv, you may need to double check its configuration and what display it's exporting/providing to the Linux side of the Windows WSL (sorry but I don't have experience with Windows WSL to help more).
You may also want to check the videos here about VcXsrv & Win10 Linux Subsystems
-
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.
I know little about, less than you or @Pablo-J-Rogina . But it does seem to me that whatever he is trying to ask/tell you about an X server --- either not running or somehow not found? --- is what is causing the problem here, given that it has said
loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
Could not load the Qt platform plugin "xcb" in "" even though it was found.?
There are many Google hits for
Could not load the Qt platform plugin "xcb"
, and we usually find that is an absent library likelibxcb-xinerama.so.0
. But here I am thinking you should Google forcould not load the qt platform plugin "xcb" in "" even though it was found.
The "even though it was found" being key. There are a bunch of hits on that, things likeXDG_RUNTIME_DIR
not giving you a good X environment. If I understood any of this :) that is what I would look through. -
@SSJCarti
One thing: It seems to me there is a related discussion going on in https://forum.qt.io/topic/120349/run-qt-gui-application-inside-docker. I assume that Poster is not yourself too. At least, that seems to get the same message as you do:loaded library "/home/user/app/platforms/libqxcb.so"
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.So maybe worth a look?
EDIT @Pablo-J-Rogina has said below this would not be helpful to you, so don't! :)
-
@JonB said in qt.qpa.xcb: could not connect to display :0:
So maybe worth a look?
I don't think the goals/environments are the same... I'd say it will mislead OP here
-
@Pablo-J-Rogina so is my Xlaunch a xserver?
-
@SSJCarti said in qt.qpa.xcb: could not connect to display :0:
is my Xlaunch a xserver?
Once again, you failed to provided a link to such component/application... Make life easier for the ones that may help you.
If you're referring to this Xlaunch, I'm not familiar with it but from its documentation it is not an X server:
XLaunch is a wizard to make starting X server sessions easy
In addition, have you checked the videos I suggested?
-
@Pablo-J-Rogina I do not know what an xserver is, I am very new to this whole type of stuff
-
@SSJCarti said in qt.qpa.xcb: could not connect to display :0:
what an xserver is
I guess you'll find lots of references, documentation, tutorials about the X windowing system.
One of the videos I linked before does a good job at describing the purpose and some details of an X server. -
In my case I was using PyQt5 in a docker container. Even though
i forwarded my DISPLAY variable and X11-unix path, it didn't seem to find the display.The solution for me was running
xhost +local:*
in the terminal of the host (outside of the container), to allow the server connection to be used by the container. -
@BertChristiaens I created an account just to say that this is exactly what I was looking for! After hours of sifting through online forums trying to find a solution to this problem, this is the one that worked like a charm! Thank you good sir!
-
This post is deleted!