Hi & greetings. I have the following problem:
when I try to start my new 3D Slicer on Linux there is a flash of the “welcome screen” & the following error message:
Qt: Session management error: Could not open network socket
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
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.
I found some fixes here used for other versions:
Debian / Ubuntu
The following may be needed on fresh debian or ubuntu:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
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: xcb.
@JSteinJ Slicer uses Qt as GUI toolkit and right now many (all?) such applications seem to be broken if Wayland is used (see for example 1 and 2). Please try solutions that you can find on the web about running Qt applications on Ubuntu-22 with Wayland and let us know if you found any solution (or if disabling Wayland fixes the issue).
@cnot thank you for trying those instructions
If those did not help then probably your system is configured to use Wayland. Please see tips that I gave to @JSteinJ above.
and see which other QT plugin you are missing from your system (the ones we included in the documentation are the most common ones for most common install options, they are not necessarily the only ones, say if you did a minimal install).
Thank you very much for your reply, @muratmaga . When running it with QT_DEBUG_PLUGIN, this is the output:
Found metadata in lib /usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so, metadata=
{
“IID”: “org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3”,
“MetaData”: {
“Keys”: [
“xcb”
]
},
“archreq”: 0,
“className”: “QXcbIntegrationPlugin”,
“debug”: false,
“version”: 331520
}
Got keys from plugin meta data (“xcb”)
QFactoryLoader::QFactoryLoader() checking directory path “/usr/img/Slicer503/bin/platforms” …
Cannot load library /usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on “/usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so” : “Cannot load library /usr/img/Slicer503/lib/QtPlugins/platforms/libqxcb.so: (libxcb-icccm.so.4: cannot open shared object file: No such file or directory)”
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: xcb.
error: [/usr/img/Slicer503/bin/SlicerApp-real] exit abnormally - Report the problem.
I tried: dnf install libxcb-icccm.so.4
Result:
No match for argument: lixcb-icccm.so.4
Error: Unable to find a match: lixcb-icccm.so.4
I then tried dnf list libxcb
To see if I was missing anything, but the result was