RustDesk headless display helper for an Ubuntu/GNOME machine that should work both with no monitor attached and with a real HDMI/DP monitor plugged in.
The original headless workaround used a global Xorg dummy driver config in /etc/X11/xorg.conf. That made RustDesk work without a monitor, but it also forced the normal desktop to use only DUMMY0, so a plugged-in physical monitor stayed black or disconnected.
This project replaces that approach with the Intel Xorg driver and VirtualHeads:
- When a real monitor is connected, Xorg uses the physical output, for example
HDMI1. - When all real monitor outputs are disconnected, a hotplug helper enables
VIRTUAL1at1920x1080. - RustDesk can then capture the virtual display without blocking the physical monitor path.
config/xorg-intel-virtualheads.conf: Xorg config that uses the Intel driver and creates one virtual output.bin/rustdesk-headless-display: User-level display guard. It turns offVIRTUAL1when a real monitor exists and turns it on when no real monitor exists.bin/rustdesk-display-hotplug: Root/system helper triggered by udev on DRM monitor changes.systemd/rustdesk-display-hotplug.service: One-shot service for the hotplug helper.udev/99-rustdesk-display-hotplug.rules: Starts the service on monitor plug/unplug events.config/rustdesk-headless-display.desktop: GNOME autostart entry for login-time setup.scripts/install.sh: Installs the config and helpers.scripts/uninstall.sh: Removes the helper files.
- Ubuntu/GNOME using GDM on Xorg.
- Intel graphics using the Xorg
inteldriver. - Packages:
xrandr,xserver-xorg-video-intel,xserver-xorg-video-dummy. - RustDesk service installed and enabled.
This was created on a machine with Intel UHD Graphics 630 and GDM configured with WaylandEnable=false.
cd ~/projects/rust-no-display
sudo ./scripts/install.sh
sudo systemctl restart gdm
sudo systemctl restart rustdeskRestarting GDM will briefly disconnect the graphical session and RustDesk.
With a monitor connected:
DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority xrandr --queryExpected shape:
HDMI1 connected primary 1920x1080+0+0
VIRTUAL1 disconnected
With the monitor unplugged:
HDMI1 disconnected
VIRTUAL1 connected primary 1920x1080+0+0
If RustDesk still says no display after unplugging the monitor, restart RustDesk:
sudo systemctl restart rustdeskThe install script backs up any existing global Xorg config as:
/etc/X11/xorg.conf.backup-YYYYMMDDHHMMSS
To revert manually:
sudo cp -a /etc/X11/xorg.conf.backup-YYYYMMDDHHMMSS /etc/X11/xorg.conf
sudo systemctl restart gdmTo remove the helper files:
sudo ./scripts/uninstall.shThis project intentionally does not manage RustDesk ID servers, relay servers, passwords, or keys. It only handles display availability for monitorless RustDesk access.