Problem Description:
I have ssh server running LTS 24.04.03 and I access it using 25.10.
SSH works fine.
With older version, Sometimes I used to launch GUI application from server over ssh from commandline (by setting up display env variable and launching the binary of the application.
It uses to work great.
However, with current set-up I get core dumped.
I tried launching calibre (book management application). And I get following error.
What can I do to fix this?
I am open to running VNC (or RDP) for full gui desktop if recommended. But I prefer to launch ad-hoc applications.
ERROR:
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.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
This is expected behavior with newer Ubuntu releases using GNOME on Wayland.
Manually setting DISPLAY=:0 no longer works, which is why Qt apps like calibre fail with the xcb error.
The correct solution is to use X11 forwarding over SSH:
Make sure the server has X11 forwarding enabled in /etc/ssh/sshd_config:
X11Forwarding yes
Then restart SSH.
Connect using:
ssh -X user@server
(or -Y if needed)
After that, launching GUI apps like calibre should work normally.
Alternatively, you can force Qt to use X11:
QT_QPA_PLATFORM=xcb calibre
Disabling Wayland or using VNC/RDP are possible, but X11 forwarding is the simplest solution for ad-hoc GUI apps over SSH.
Great, glad to hear it’s working
Yes, with newer Wayland-based setups, manually setting DISPLAY usually breaks X11 forwarding. Letting SSH handle it automatically is the correct approach.