Enable Unattended RustDesk Access on Wayland

Ubuntu uses GNOME on Wayland by default. RustDesk works well once the desktop session is running, but unattended access can become awkward around the graphical login screen.

On my Ubuntu 26.04 system, the practical solution was to use an X11-based LightDM login screen while keeping the normal Ubuntu GNOME Wayland desktop after login:

LightDM + Slick Greeter + X11
Ubuntu + GNOME + Wayland

This gives RustDesk access to the login screen without replacing the everyday Ubuntu desktop.

Compatibility: This guide uses Ubuntu 26.04 LTS as an example. The same approach may work on other Ubuntu releases, but the package names and session configuration are Ubuntu-specific. It should not be treated as a universal solution for every Wayland desktop.

The Problem

Wayland provides stronger isolation between applications than X11. This is useful for security, but it also means remote-desktop applications cannot always capture the screen as freely as they could under X11.

RustDesk supports Wayland, but the graphical login screen is a special case: it exists before the user’s Wayland session starts. For unattended access, RustDesk must be able to reach that screen without someone physically present.

The goal is therefore not to replace Wayland completely. It is to use X11 only for the login screen.

How the Setup Works

The relevant components have different roles:

ComponentRole
GDM3Ubuntu’s default display manager
LightDMAn alternative display manager
Slick GreeterThe login interface shown by LightDM
GNOMEUbuntu’s desktop environment
WaylandThe display system used after login
X11The display system used by the LightDM greeter

GDM3 and LightDM are display managers. They show the login screen, authenticate the user, and launch the selected desktop session.

GNOME is the desktop shown after login. Replacing GDM3 with LightDM does not replace GNOME.

With the configuration below:

  • Before login: LightDM + Slick Greeter + X11
  • After login: Ubuntu + GNOME + Wayland

The gdm3 package may remain installed, but LightDM becomes the active display manager.

Setup

1. Install LightDM and Slick Greeter

sudo apt update
sudo apt install lightdm slick-greeter

When prompted to choose a display manager, select:

lightdm

If the prompt does not appear, run:

sudo dpkg-reconfigure lightdm

2. Configure LightDM

Create the configuration directory:

sudo install -d -m 755 /etc/lightdm/lightdm.conf.d

Create the local configuration:

sudo tee /etc/lightdm/lightdm.conf.d/90-local.conf >/dev/null <<'EOF'
[LightDM]
sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions

[Seat:*]
greeter-session=slick-greeter
user-session=ubuntu
EOF

The two important settings are:

greeter-session=slick-greeter
user-session=ubuntu

greeter-session=slick-greeter gives LightDM a polished login screen with the classic Ubuntu look. No custom wallpaper configuration is required.

user-session=ubuntu launches the standard Ubuntu GNOME session after login. On Ubuntu 26.04, that session runs on Wayland.

The sessions-directory line allows LightDM to discover both X11 and Wayland sessions.

3. Reboot and Verify

Reboot the system:

sudo reboot

After logging in, verify the desktop session:

echo "$XDG_SESSION_TYPE"
echo "$DESKTOP_SESSION"

Expected output:

wayland
ubuntu

This confirms that the login screen is managed by LightDM, while the desktop remains the standard Ubuntu Wayland session.

To confirm the active display manager:

readlink -f /etc/systemd/system/display-manager.service

The result should point to lightdm.service.

You can also check:

systemctl status display-manager

Restore the Default Configuration

To switch back to Ubuntu’s default display manager:

sudo dpkg-reconfigure gdm3
sudo reboot

Select gdm3 when prompted.

After confirming that GDM3 works, LightDM can optionally be removed:

sudo apt purge lightdm slick-greeter
sudo apt autoremove --purge

The final setup is simple:

  • LightDM + Slick Greeter for login
  • Ubuntu + GNOME + Wayland for the desktop

It keeps the normal Ubuntu experience while making unattended RustDesk access around the login screen much more practical.

Known Issues

With LightDM as the display manager, pressing Super + L no longer locks the screen. GNOME’s built-in shortcut relies on GDM3’s screen locking, which is unavailable under LightDM.

The workaround is to rebind Super + L to LightDM’s own lock command. First, release the built-in binding:

gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver "[]"

Then, in Settings → Keyboard → Custom Shortcuts, add a new shortcut that runs:

dm-tool lock

and assign Super + L to it. This restores manual screen locking.

However, automatic screen locking (after the idle timeout) still does not work under this setup. Only manual locking via the shortcut is available.