- Add x11vnc + noVNC container with Traefik reverse proxy - Add /api/vnc_status and toggle_vnc action to FastAPI - Add VNC toggle button to BotVPS dashboard - VNC off by default, controlled via dashboard
27 lines
539 B
Bash
27 lines
539 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Ensure X11 socket exists and has correct permissions
|
|
chmod 1777 /tmp/.X11-unix 2>/dev/null || true
|
|
chmod 666 /tmp/.X11-unix/X10 2>/dev/null || true
|
|
|
|
# Start x11vnc — connects to host XFCE on display :10
|
|
x11vnc \
|
|
-display :10 \
|
|
-nopw \
|
|
-bg \
|
|
-listen 0.0.0.0 \
|
|
-xkb \
|
|
-ncache 10 \
|
|
-ncache_cr \
|
|
-forever \
|
|
-shared \
|
|
-noshm \
|
|
-rfbport 5900
|
|
|
|
# Start websockify → WebSocket proxy for noVNC
|
|
exec websockify \
|
|
--web /usr/share/novnc \
|
|
0.0.0.0:6080 \
|
|
localhost:5900
|