Custom Podman image (forge.quinefoundation.com/ironmagma/vnc-desktop) running TigerVNC + noVNC + openbox, proxied via nginx with ACME TLS and basic auth. Also switches all arion projects from docker to podman backend. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
644 B
Bash
29 lines
644 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
mkdir -p /root/.vnc /root/.ssh
|
|
chmod 700 /root/.ssh
|
|
|
|
# Set VNC password from environment
|
|
echo "${VNC_PASSWORD:?VNC_PASSWORD must be set}" | vncpasswd -f > /root/.vnc/passwd
|
|
chmod 600 /root/.vnc/passwd
|
|
|
|
# Start Xvnc (headless X server + VNC server in one)
|
|
Xvnc :1 \
|
|
-rfbport 5901 \
|
|
-SecurityTypes VncAuth \
|
|
-PasswordFile /root/.vnc/passwd \
|
|
-geometry 1280x800 \
|
|
-depth 24 \
|
|
-AlwaysShared \
|
|
&
|
|
|
|
export DISPLAY=:1
|
|
sleep 2
|
|
|
|
# Start window manager and initial terminal
|
|
openbox-session &
|
|
xterm &
|
|
|
|
# Serve noVNC web UI + bridge WebSocket -> VNC
|
|
exec websockify --web /usr/share/novnc 6080 localhost:5901
|