Files
RDtop/config/systemd/rustdesk-headless-inhibit.service
Orchestrator 5020b591aa fix: install.sh — sleep-safe, auto-display, fresh-machine install
- install.sh now has 8 steps:
  1) Detect arch, 2) Install deps, 3) Disable sleep/lock/screensaver,
  4) Detect display, 5) Setup dummy + force DUMMY0 primary,
  6) Start Xorg/Xvfb, 7) Download+install RustDesk (with apt fallback),
  8) Install systemd unit rustdesk-headless.service

- New systemd unit: rustdesk-headless.service
  * Forces DUMMY0 as primary via ExecStartPre (no monitor selection dialog)
  * Restart=always — survives any crash
  * Wants=display-manager.service — starts after graphical session

- Sleep-safe changes:
  * Mask sleep.target suspend.target hibernate.target hybrid-sleep.target
  * logind.conf: HandleLidSwitch=ignore, IdleAction=ignore
  * GNOME screensaver: gsettings lock-enabled false, idle-delay 0
  * X11: xset s off -dpms

- Fresh machine fixes:
  * dpkg --force-depends --force-confnew (installs even with missing deps)
  * apt-get install -f after dpkg (fixes broken deps)
  * Fallback to 'apt-get install rustdesk' from repo if .deb download fails
  * Added libva-drm2 libva-x11-2 (fresh systems often miss these)

- Output at end:
  * ID, Password, Display (:0 DUMMY0 primary), Sleep/Lock status
  * Monitor status via xrandr --listmonitors

Fixes #7
2026-05-16 11:19:43 +01:00

19 lines
483 B
Desktop File

[Unit]
Description=Inhibit system sleep while RustDesk is active
After=rustdesk-headless.service
[Service]
Type=simple
ExecStart=/bin/bash -c '\
while true; do \
if pgrep -f "/usr/share/rustdesk/rustdesk --server" >/dev/null; then \
systemd-inhibit --what=sleep:idle:handle-lid-switch --who="RustDesk" --why="Remote access active" sleep 60; \
else \
sleep 5; \
fi; \
done'
Restart=always
[Install]
WantedBy=multi-user.target