Skip to content

mostafa8026/rust-no-display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-no-display

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.

What This Fixes

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 VIRTUAL1 at 1920x1080.
  • RustDesk can then capture the virtual display without blocking the physical monitor path.

Files

  • 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 off VIRTUAL1 when 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.

Requirements

  • Ubuntu/GNOME using GDM on Xorg.
  • Intel graphics using the Xorg intel driver.
  • 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.

Install

cd ~/projects/rust-no-display
sudo ./scripts/install.sh
sudo systemctl restart gdm
sudo systemctl restart rustdesk

Restarting GDM will briefly disconnect the graphical session and RustDesk.

Verify

With a monitor connected:

DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority xrandr --query

Expected 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 rustdesk

Recovery

The 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 gdm

To remove the helper files:

sudo ./scripts/uninstall.sh

Notes

This project intentionally does not manage RustDesk ID servers, relay servers, passwords, or keys. It only handles display availability for monitorless RustDesk access.

About

RustDesk headless display helper for monitorless Ubuntu/GNOME systems with Intel VirtualHeads and hotplug switching

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages