#!/usr/bin/env bash # 1. Start Xvfb (headless X server) Xvfb :1 -screen 0 1280x720x24 & # 2. Export display for all GUI apps export DISPLAY=:1 # 3. Launch a minimal window manager fluxbox & # 4. Start X11 VNC server (no password, persistent) x11vnc -display :1 -nopw -forever -shared -rfbport 5901 & # 5. Launch noVNC (serves on port 6080) /usr/share/novnc/utils/launch.sh --vnc localhost:5901 --listen 6080 & # 6. Finally, start the Gradio app python3 /app.py