Skip to content

Commit

Permalink
added ENV variable VNC_NO_PASSWORD to disable password auth
Browse files Browse the repository at this point in the history
fixes #701
  • Loading branch information
schmunk42 committed Mar 21, 2018
1 parent 6d6662e commit 03dcc15
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 8 additions & 1 deletion NodeDebug/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ if [ ! -z "$REMOTE_HOST" ]; then
REMOTE_HOST_PARAM="-remoteHost $REMOTE_HOST"
fi

if [ ! -z $VNC_NO_PASSWORD ]; then
echo "starting VNC server without password authentication"
X11VNC_OPTS=
else
X11VNC_OPTS=-usepw
fi

if [ ! -z "$SE_OPTS" ]; then
echo "appending selenium options: ${SE_OPTS}"
fi
Expand Down Expand Up @@ -71,6 +78,6 @@ done

fluxbox -display $DISPLAY &

x11vnc -forever -usepw -shared -rfbport 5900 -display $DISPLAY &
x11vnc $X11VNC_OPTS -forever -shared -rfbport 5900 -display $DISPLAY &

wait $NODE_PID
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ When you are prompted for the password it is `secret`. If you wish to change thi
RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
```

If you want to run VNC without password authentication you can set the environment variable `VNC_NO_PASSWORD=1`.

### Troubleshooting

All output is sent to stdout so it can be inspected by running:
Expand Down
9 changes: 8 additions & 1 deletion StandaloneDebug/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ function shutdown {
wait $NODE_PID
}

if [ ! -z $VNC_NO_PASSWORD ]; then
echo "starting VNC server without password authentication"
X11VNC_OPTS=
else
X11VNC_OPTS=-usepw
fi

if [ ! -z "$SE_OPTS" ]; then
echo "appending selenium options: ${SE_OPTS}"
fi
Expand Down Expand Up @@ -38,6 +45,6 @@ done

fluxbox -display $DISPLAY &

x11vnc -forever -usepw -shared -rfbport 5900 -display $DISPLAY &
x11vnc $X11VNC_OPTS -forever -shared -rfbport 5900 -display $DISPLAY &

wait $NODE_PID

0 comments on commit 03dcc15

Please sign in to comment.