File size: 611 Bytes
bcb86b5 cd7bbee bcb86b5 eeffe53 bcb86b5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
#!/bin/bash
set -e
# Start VNC
echo "Starting VNC..."
su - vncuser -c "vncserver ${DISPLAY} -geometry 1280x720 -depth 24 -localhost no -SecurityTypes None --I-KNOW-THIS-IS-INSECURE"
# Start noVNC
echo "Starting noVNC..."
websockify --web=/usr/share/novnc ${NO_VNC_PORT} localhost:${VNC_PORT} &
# Wait for X server to be ready
echo "Waiting for X server..."
for i in {1..30}; do
if xdotool getdisplaygeometry >/dev/null 2>&1; then
echo "X server is ready."
break
fi
echo "Waiting for X server... ($i/30)"
sleep 1
done
# Start App
echo "Starting App..."
cd /app
python3 app.py
|