Skip to content

Commit 03dcc15

Browse files
committed
added ENV variable VNC_NO_PASSWORD to disable password auth
fixes #701
1 parent 6d6662e commit 03dcc15

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

NodeDebug/entry_point.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ if [ ! -z "$REMOTE_HOST" ]; then
4040
REMOTE_HOST_PARAM="-remoteHost $REMOTE_HOST"
4141
fi
4242

43+
if [ ! -z $VNC_NO_PASSWORD ]; then
44+
echo "starting VNC server without password authentication"
45+
X11VNC_OPTS=
46+
else
47+
X11VNC_OPTS=-usepw
48+
fi
49+
4350
if [ ! -z "$SE_OPTS" ]; then
4451
echo "appending selenium options: ${SE_OPTS}"
4552
fi
@@ -71,6 +78,6 @@ done
7178

7279
fluxbox -display $DISPLAY &
7380

74-
x11vnc -forever -usepw -shared -rfbport 5900 -display $DISPLAY &
81+
x11vnc $X11VNC_OPTS -forever -shared -rfbport 5900 -display $DISPLAY &
7582

7683
wait $NODE_PID

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ When you are prompted for the password it is `secret`. If you wish to change thi
261261
RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
262262
```
263263

264+
If you want to run VNC without password authentication you can set the environment variable `VNC_NO_PASSWORD=1`.
265+
264266
### Troubleshooting
265267

266268
All output is sent to stdout so it can be inspected by running:

StandaloneDebug/entry_point.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ function shutdown {
1111
wait $NODE_PID
1212
}
1313

14+
if [ ! -z $VNC_NO_PASSWORD ]; then
15+
echo "starting VNC server without password authentication"
16+
X11VNC_OPTS=
17+
else
18+
X11VNC_OPTS=-usepw
19+
fi
20+
1421
if [ ! -z "$SE_OPTS" ]; then
1522
echo "appending selenium options: ${SE_OPTS}"
1623
fi
@@ -38,6 +45,6 @@ done
3845

3946
fluxbox -display $DISPLAY &
4047

41-
x11vnc -forever -usepw -shared -rfbport 5900 -display $DISPLAY &
48+
x11vnc $X11VNC_OPTS -forever -shared -rfbport 5900 -display $DISPLAY &
4249

4350
wait $NODE_PID

0 commit comments

Comments
 (0)