forked from Bostwickenator/ch.rip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
35 lines (28 loc) · 934 Bytes
/
entrypoint.sh
File metadata and controls
35 lines (28 loc) · 934 Bytes
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
28
29
30
31
32
33
34
35
#!/bin/bash
set -e
echo "Starting Xvfb on display ${DISPLAY}..."
Xvfb ${DISPLAY} -screen 0 ${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH} &
sleep 1
echo "Starting Openbox window manager..."
DISPLAY=${DISPLAY} openbox-session &
sleep 1
echo "Starting x11vnc..."
if [ -n "$VNC_PASSWORD" ]; then
x11vnc -display ${DISPLAY} -forever -shared -rfbauth <(x11vnc -storepasswd "$VNC_PASSWORD" /tmp/vncpass && echo /tmp/vncpass) &
else
x11vnc -display ${DISPLAY} -forever -shared -nopw &
fi
sleep 1
echo "Starting noVNC on port 6080..."
websockify --web=/usr/share/novnc/ 6080 localhost:5900 &
sleep 1
echo "Starting ch.rip..."
echo ""
echo "========================================="
echo " Open http://localhost:6080/vnc.html"
echo " to interact with the browser"
echo "========================================="
echo ""
# Change to output directory so downloads land there
cd /output
DISPLAY=${DISPLAY} node /app/chrip.js