XFCE session fails to start on Ubuntu 24.04 with Wayland

Hello,

I have been trying to set up ThinLinc so I can connect remotely from my
MacBook to my Ubuntu desktop, but I am unable to get a working session.

Setup:

  • Server: Ubuntu 24.04.4 LTS, ThinLinc 4.20.0, running GNOME on Wayland
    (local display)
  • Client: macOS, ThinLinc client 4.20.0

What I have tried:
Since GNOME sessions exited immediately with code 143 (killed by SIGTERM,
likely due to conflict with the already-running local GNOME/Wayland
session), I installed XFCE4 and configured ThinLinc to use it instead.

The session log shows XFCE failing with the following errors:

(xfwm4): cannot open display: wayland-0
(xfce4-panel): Could not open X display
xfce4-panel: Unable to open display from environment variable
DISPLAY=‘wayland-0’, exiting.

It appears that the WAYLAND_DISPLAY environment variable from the local
session is leaking into the ThinLinc session, causing XFCE components to
try to connect to the Wayland compositor instead of the ThinLinc Xvnc
display (:10).

I attempted to fix this by adding the following to ~/.xsession:

unset WAYLAND_DISPLAY
unset DISPLAY
export DISPLAY=:10
exec startxfce4

However, after this change the session still does not connect, the ThinLinc
client on the Mac shows the loading screen but never presents a desktop,
and eventually disconnects without any error message.

Both vsmserver and vsmagent are running. SSH is accessible on port 22. Port
904 is listening. The firewall (ufw) is inactive.

Any advice? :slight_smile:

Hi,

The core issue here is likely that most modern desktop environments don’t handle running multiple sessions as the same user very well. This is likely to be aggravated by the fact that one of the sessions is X11, and the other Wayland. One option might be to have two separate users, one for remote access via ThinLinc, and one for local console access.

Are you trying to access the local console session on your Ubuntu machine remotely? ThinLinc is a terminal server solution, so this isn’t actually a use-case we explicitly cater to. ThinLinc creates its own sessions, and is designed for multi-user systems. One way of handling this though is to connect via ThinLinc, even when sitting in front of the physical server. There’s a bit of discussion around this here:

Hope that helps!