Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding VNC_PASSWORD to configure VNC password #1840

Merged
merged 1 commit into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NodeBase/start-vnc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ if [ "${START_XVFB:-$SE_START_XVFB}" = true ] ; then
X11VNC_OPTS="${X11VNC_OPTS} -viewonly"
fi

VNC_PASSWORD=${VNC_PASSWORD:-$SE_VNC_PASSWORD}
if [ ! -z $VNC_PASSWORD ]; then
echo "Starting VNC server with custom password"
x11vnc -storepasswd ${VNC_PASSWORD} ${HOME}/.vnc/passwd
fi

for i in $(seq 1 10)
do
sleep 1
Expand Down
23 changes: 2 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1092,27 +1092,8 @@ Then, you would use in your VNC client:
- Port 5901 to connect to the Edge container
- Port 5902 to connect to the Firefox container

If you get a prompt asking for a password, it is: `secret`. If you wish to change this, you should either change
it in the `/NodeBase/Dockerfile` and build the images yourself, or you can define a Docker image that derives from
the posted ones which reconfigures it:

Dockerfile example that extends the `node-chrome:4.9.0-20230421`. You can choose another browser image or a Standalone
browser image.

``` dockerfile
FROM selenium/node-chrome:4.9.0-20230421

RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
```

Save the `Dockerfile` as `DockerfileVNCPasswordChanged`, open a terminal and on the same directory run:

```shell
docker build -t selenium/node-chrome-vnc-password-changed:4.9.0-20230421 -f DockerfileVNCPasswordChanged .
```

And from now on, instead of using `node-chrome:4.9.0-20230421` in your scripts or docker-compose files, use
`selenium/node-chrome-vnc-password-changed:4.9.0-20230421`.
If you get a prompt asking for a password, it is: `secret`. If you wish to change this,
you can set the environment variable `SE_VNC_PASSWORD`.

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

Expand Down