feat: guestOS docker config (#3)

This commit is contained in:
Hari 2026-04-08 12:30:04 -04:00 committed by GitHub
commit 27f7b6318b
11 changed files with 660 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
export DISPLAY=:0
Xvfb "$DISPLAY" -screen 0 1280x800x24 >/tmp/xvfb.log 2>&1 &
XVFB_PID=$!
for _ in $(seq 1 50); do
if xdpyinfo -display "$DISPLAY" >/dev/null 2>&1; then
break
fi
sleep 0.1
done
runuser -u node -- env DISPLAY="$DISPLAY" openbox >/tmp/openbox.log 2>&1 &
runuser -u node -- env DISPLAY="$DISPLAY" xterm -fa Monospace -fs 12 >/tmp/xterm.log 2>&1 &
x11vnc -display "$DISPLAY" -rfbport 5900 -forever -shared -nopw >/tmp/x11vnc.log 2>&1 &
websockify --web=/usr/share/novnc 6080 localhost:5900 >/tmp/websockify.log 2>&1 &
trap 'kill $XVFB_PID || true; kill 0 || true; exit 0' INT TERM
wait -n