qt.qpa.xcb: could not connect to display :1.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
@JonB it says
xterm: Xt error: Can't open display: :1.0
Nope I don't have dual monitors.
One thing more,
I don't know what's happening but when I open new terminal it sometimes gives me error :Got keys from plugin meta data ("ibus") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforminputcontexts" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" Cannot mix incompatible Qt library (version 0x50c08) with this library (version 0x50c09) Aborted (core dumped)
I reinstalled qt5-default again ,tried your command and now I 'm back to getting the old cannot connect to display error
-
@JonB said in qt.qpa.xcb: could not connect to display :1.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
You should get the same error message.
I know it does, that is exactly what I said it would do! So now you know you have the problem quite outside of anything Qt, and it needs resolving.
-
@B_R_Khan said in qt.qpa.xcb: could not connect to display :1.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
@JonB It's giving me a different error now:
Programs are (mostly) deterministic and do not give different error messages each time they run.
Unless you changed something and don't bother to say what, in which case there's no point asking about it.
Meanwhile, that is an error message about Qt.
xterm
does not use Qt. I said getxterm
working then your Qt issue should resolve itself. Fiddling with things Qt won't affectxterm
, or your problem. -
@JonB
sorry for not being clear enough. I apologize.I was following the thread https://forum.qt.io/topic/111553/solved-qt-qpa-plugin-could-not-find-the-qt-platform-plugin-xcb-in/8 before I posted this question. Initially, I was only getting qt plugin not found error. I followed the steps
export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
export QT_DEBUG_PLUGINS=1
flameshot / gave plot command in gnuplot
It started giving the error I asked in this thread i-e display not found and could not load qt plugin even though it was found.
I started looking for display not found error as you mentioned it's not qt error. Assuming that I have to run the export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins everytime I open new terminal, I executed all of the above commands again in new terminal in addition to sudo ln -sf /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms. I ran flameshot again and got error:Got keys from plugin meta data ("ibus") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforminputcontexts" ... loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" Cannot mix incompatible Qt library (version 0x50c08) with this library (version 0x50c09) Aborted (core dumped)
I deleted all xcb libraries and qt packages, reinstalled but again getting the same error. I don't know what went wrong.
-
@B_R_Khan said in qt.qpa.xcb: could not connect to display :1.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.:
Assuming that I have to run the export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
This is wrong assumption.
Your problem has NOTHING to do with Qt!
The problem is that you do not have XServer running, or display: :1.0 is wrong.
So, do NOT set QT_PLUGIN_PATH.
Make sure you have XServer running and find out which display id you have to use. -
Hi,
Any chances that your desktop environment runs on top of Wayland ?
What are you currently using ?
-
@SGaist Hi!
I have x11 and xterm is running now since I started using a different kernel version. Unfortunately, I'm still not being able to solve this error. The error says:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Aborted (core dumped)
The output for ldd libqxcb.so is:
linux-vdso.so.1 (0x00007ffcd771e000) libQt5XcbQpa.so.5 => /home/b/OpenFOAM/ParaView-5.9.1/lib/libQt5XcbQpa.so.5 (0x00007f324df9f000) libQt5Gui.so.5 => /home/b/OpenFOAM/ParaView-5.9.1/lib/libQt5Gui.so.5 (0x00007f324d786000) libQt5Core.so.5 => /home/b/OpenFOAM/ParaView-5.9.1/lib/libQt5Core.so.5 (0x00007f324cf66000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f324cd67000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f324cb73000) libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f324caeb000) libfontconfig.so.1 => /home/b/OpenFOAM/ParaView-5.9.1/lib/libfontconfig.so.1 (0x00007f324c89c000) libfreetype.so.6 => /home/b/OpenFOAM/ParaView-5.9.1/lib/libfreetype.so.6 (0x00007f324c5b1000) libz.so.1 => /home/b/OpenFOAM/ParaView-5.9.1/lib/libz.so.1 (0x00007f324c394000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f324c371000) libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f324c36a000) libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f324c340000) libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f324c136000) libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f324c121000) libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f324bfe4000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f324be95000) libSM.so.6 => /lib/x86_64-linux-gnu/libSM.so.6 (0x00007f324be88000) libICE.so.6 => /lib/x86_64-linux-gnu/libICE.so.6 (0x00007f324be6a000) libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f324be5f000) libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f324be1d000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f324be17000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f324bdfc000) libpng16.so.16 => /home/b/OpenFOAM/ParaView-5.9.1/lib/libpng16.so.16 (0x00007f324bbb7000) /lib64/ld-linux-x86-64.so.2 (0x00007f324e2d9000) libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f324baff000) libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f324bacb000) libxml2.so.2 => /home/b/OpenFOAM/ParaView-5.9.1/lib/../lib/libxml2.so.2 (0x00007f324b70f000) libuuid.so.1 => /home/b/OpenFOAM/ParaView-5.9.1/lib/../lib/libuuid.so.1 (0x00007f324b507000) libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f324b4ff000) libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f324b4f7000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f324b4dd000) libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f324b4bf000)
Would really appreciate some help since I want to use some applications that can't be run without qt
Thanks
-
I get this when I run gnuplot commands after export QT_DEBUG_PLUGINS=1:
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Aborted (core dumped)
-
@B_R_Khan
I am really surprised. If you look at anyone else reporting this or similar issues you will see they get voluminous diagnostic output. Are you setting the environment variable in a shell/terminal and running your application from there after setting the variable? If the output is not markedly different with and without that variable set it does not sound right. -
I ran export QT_DEBUG_PLUGINS=1 in a new terminal and then ran flameshot/ gnuplot commands . Flameshot gives:
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ... qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Aborted (core dumped)
Gnuplot gives following when I try to plot anything:
Terminal type is now 'qt' gnuplot> plot sin(x)/x QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/gnuplot/platforms" ... qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Could not connect to existing gnuplot_qt. Starting a new one. QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/gnuplot/platforms" ... qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I hope I followed your instructions correctly . I am using paraview as well which requires qt and it is running fine.
I also want to mention that I get the following when I try the command qmake --version:
QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu -
What output do you get from paraview if you set QT_DEBUG_PLUGINS to 1 ?
-
@SGaist
I get the following output:QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/home/b/OpenFOAM/ParaView-5.9.1/plugins/platforms/libqxcb.so" Found metadata in lib /home/b/OpenFOAM/ParaView-5.9.1/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/b/OpenFOAM/ParaView-5.9.1/bin/platforms" ... loaded library "/home/b/OpenFOAM/ParaView-5.9.1/plugins/platforms/libqxcb.so" loaded library "Xcursor" QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/bin/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/platforminputcontexts" ... QFactoryLoader::QFactoryLoader() looking at "/home/b/OpenFOAM/ParaView-5.9.1/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so" Found metadata in lib /home/b/OpenFOAM/ParaView-5.9.1/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata= { "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1", "MetaData": { "Keys": [ "compose", "xim" ] }, "archreq": 0, "className": "QComposePlatformInputContextPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("compose", "xim") QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/bin/platforminputcontexts" ... loaded library "/home/b/OpenFOAM/ParaView-5.9.1/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/bin/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/iconengines" ... QFactoryLoader::QFactoryLoader() looking at "/home/b/OpenFOAM/ParaView-5.9.1/plugins/iconengines/libqsvgicon.so" Found metadata in lib /home/b/OpenFOAM/ParaView-5.9.1/plugins/iconengines/libqsvgicon.so, metadata= { "IID": "org.qt-project.Qt.QIconEngineFactoryInterface", "MetaData": { "Keys": [ "svg", "svgz", "svg.gz" ] }, "archreq": 0, "className": "QSvgIconPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("svg", "svgz", "svg.gz") QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/bin/iconengines" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/imageformats" ... QFactoryLoader::QFactoryLoader() looking at "/home/b/OpenFOAM/ParaView-5.9.1/plugins/imageformats/libqsvg.so" Found metadata in lib /home/b/OpenFOAM/ParaView-5.9.1/plugins/imageformats/libqsvg.so, metadata= { "IID": "org.qt-project.Qt.QImageIOHandlerFactoryInterface", "MetaData": { "Keys": [ "svg", "svgz" ], "MimeTypes": [ "image/svg+xml", "image/svg+xml-compressed" ] }, "archreq": 0, "className": "QSvgPlugin", "debug": false, "version": 330752 } Got keys from plugin meta data ("svg", "svgz") QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/bin/imageformats" ... loaded library "/home/b/OpenFOAM/ParaView-5.9.1/plugins/imageformats/libqsvg.so" loaded library "/home/b/OpenFOAM/ParaView-5.9.1/plugins/iconengines/libqsvgicon.so" QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/bin/accessible" ... VisRTX 0.1.6, using devices: 0: NVIDIA GeForce RTX 3050 Ti Laptop GPU (Total: 4.1 GB, Available: 4.0 GB) debug: In unknown, line 0 debug: QFactoryLoader::QFactoryLoader() checking directory path "/home/b/OpenFOAM/ParaView-5.9.1/plugins/xcbglintegrations" ... debug: In unknown, line 0 debug: QFactoryLoader::QFactoryLoader() looking at "/home/b/OpenFOAM/ParaView-5.9.1/plugins/xcbglintegrations/libqxcb-glx-integration.so"
-
Hi, paraview works because is using it's own Qt (version 5.9.1).
On the same PC you also have Qt version 5.12.8 and 5.12.9 installed. Having more than one version of Qt installed on the same computer is always risky :.-(
Try to get rid of that qt5-default Qt version 5.12.8 and instead install complete versions of flameshot and gnuplot (so that they get also get their own, internal Qt version, like paraview has now). -
I am using a remote Jupyter notebook and trying to start the qtconsole but getting the following error.
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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
I have tried both
export DISPLAY=:0
$
export DISPLAY=:1 -
When you say remote, how are you accessing it ?
-
So you have a JupyterLab session running ?