feat: add Xvfb + RustDesk scripts for VPS GUI fix (#6)\n\n- scripts/vps/start-rustdesk-xvfb.sh: Xvfb + xcompmgr + RustDesk launcher\n- scripts/host/manual-start-rustdesk.sh: manual run script for VPS\n\nWorkaround for RustDesk v1.4.6 SIGSEGV on dummy/Xvfb display\nwhen opening GUI (Flutter requires GL/GLES compositor).\n\nCloses #6 (partial)

This commit is contained in:
Orchestrator
2026-05-16 00:46:53 +01:00
parent 43e7b30f41
commit 038b9791c5
2 changed files with 99 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# RustDesk Client Launcher for VPS (Manual Run)
# Run this script when you want to connect to host from VPS
# 1. Ensure no conflicting X servers
pkill -f Xvfb
pkill -f Xorg
# 2. Start Xvfb on :0
rm -f /tmp/.X11-unix/X0 /tmp/.X0-lock 2>/dev/null
/usr/bin/Xvfb :0 -screen 0 1920x1080x24 +extension GLX +extension RANDR +extension RENDER -ac &
echo "Xvfb started on :0"
sleep 2
# 3. Configure RustDesk
cat > ~/.config/rustdesk/RustDesk2.toml <<'EOF'
rendezvous_server = 'localhost:21116'
custom-rendezvous-server = 'localhost:21116'
key = 'JDSXd9sxN6Y7mIzu3krSpPTTc4yjChfqpzgIH5fl9Iw='
nat_type = 1
serial = 0
unlock_pin = ''
[options]
local-ip-addr = '2.59.219.61'
EOF
# 4. Start RustDesk client
export DISPLAY=:0
export XAUTHORITY=/root/.Xauthority
export LIBVA_DRIVER_NAME=none
export VDPAU_DRIVER=none
# Add xauth for display :0
xauth -f "$XAUTHORITY" add :0 . $(mcookie) 2>/dev/null || true
echo "Starting RustDesk..."
nohup /usr/share/rustdesk/rustdesk &
echo "RustDesk started. Check ID: DISPLAY=:0 /usr/share/rustdesk/rustdesk --get-id"
sleep 2
echo "Current ID:"
DISPLAY=:0 /usr/share/rustdesk/rustdesk --get-id