Launching GUI App over SSH between 24.04.03 and 25.10

Ubuntu Version:
22.04.03 LTS AND 25.10

Desktop Environment:
GNOME,

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.

Available platform plugins are: wayland-egl, wayland, xcb, offscreen, linuxfb, vkkhrdisplay, vnc, minimalegl, eglfs, minimal.

[1]+ Aborted (core dumped) calibre

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:

  1. Make sure the server has X11 forwarding enabled in /etc/ssh/sshd_config:

    X11Forwarding yes
    

    Then restart SSH.

  2. 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.

1 Like

Cool. All I had to do was to NOT set the DISPLAY. I already have X11 fwd enabled (as this was working).
It’s working fine now.

Cheers,

2 Likes

Great, glad to hear it’s working :+1:
Yes, with newer Wayland-based setups, manually setting DISPLAY usually breaks X11 forwarding. Letting SSH handle it automatically is the correct approach.

Cheers!

1 Like