miniRT/scripts/run_vnc.sh
2026-02-07 00:10:07 +01:00

35 lines
556 B
Bash
Executable File

#!/bin/bash
XVNC=Xvnc
XVNC_HOST=0.0.0.0
XVNC_PORT=5901
DISPLAY_WIDTH=$1
DISPLAY_HEIGHT=$2
if ! command -v novnc_proxy &> /dev/null; then
echo "noVNC (novnc_proxy) not found! Aborting..."
exit 1
fi
if ! command -v Xvnc &> /dev/null; then
echo "Xvnc not found! Aborting..."
exit 1
fi
$XVNC :1 \
-geometry ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} \
-depth 24 \
-SecurityTypes None \
-interface $XVNC_HOST \
-rfbport $XVNC_PORT &
sleep 2
novnc_proxy --vnc localhost:${XVNC_PORT} &
sleep 2
export DISPLAY=:1
exec ./miniRT