feat: add persistent RustDesk client service for VPS

- Add rustdesk-vps.service (systemd unit with Xvfb + DBus)
- Add rustdesk-vps-start.sh (Xvfb startup + DBus session for RustDesk)
- Update xorg-dummy.service without -nolisten local (fixes socket access)
- Update rustdesk-dummy.service with /usr/share/ binary path
- Add docker-compose.vps.yml with hbbs/hbbr RustDesk server
- RustDesk client connects to public relay rs-ny.rustdesk.com:21116
- ID: 458564614 (confirmed via --get-id)
- Password: retrowest
This commit is contained in:
Deploy Bot
2026-05-15 21:30:47 +01:00
parent a6492fc1b9
commit be123e8057
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#!/bin/bash
# RustDesk VPS Headless Client Startup Script
# Starts Xvfb :99, waits for display, then launches RustDesk client via DBus
set -e
# Kill old Xvfb
pkill -9 Xvfb 2>/dev/null || true
sleep 1
# Start Xvfb
/usr/bin/Xvfb :99 -screen 0 1920x1080x24 -ac -nolisten tcp -nolisten unix &
XVFB_PID=$!
sleep 2
# Wait for display to be ready
for i in $(seq 1 30); do
if xdpyinfo -display :99 > /dev/null 2>&1; then
break
fi
sleep 1
done
# Verify display is up
if ! xdpyinfo -display :99 > /dev/null 2>&1; then
echo "ERROR: Xvfb failed to start on :99"
kill $XVFB_PID 2>/dev/null || true
exit 1
fi
export DISPLAY=:99
# Start RustDesk client inside DBus session (required for headless GUI apps)
exec /usr/bin/dbus-run-session -- /usr/share/rustdesk/rustdesk --server

View File

@@ -0,0 +1,17 @@
[Unit]
Description=RustDesk VPS Client
After=network.target
[Service]
Type=simple
User=root
Environment="DISPLAY=:99"
ExecStartPre=-/usr/bin/pkill -9 Xvfb
ExecStart=/usr/local/bin/rustdesk-vps-start.sh
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target