File tree Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ if [ "${START_XVFB:-$SE_START_XVFB}" = true ] ; then
28
28
X11VNC_OPTS=" ${X11VNC_OPTS} -viewonly"
29
29
fi
30
30
31
+ VNC_PASSWORD=${VNC_PASSWORD:- $SE_VNC_PASSWORD }
32
+ if [ ! -z $VNC_PASSWORD ]; then
33
+ echo " Starting VNC server with custom password"
34
+ x11vnc -storepasswd ${VNC_PASSWORD} ${HOME} /.vnc/passwd
35
+ fi
36
+
31
37
for i in $( seq 1 10)
32
38
do
33
39
sleep 1
Original file line number Diff line number Diff line change @@ -1092,27 +1092,8 @@ Then, you would use in your VNC client:
1092
1092
- Port 5901 to connect to the Edge container
1093
1093
- Port 5902 to connect to the Firefox container
1094
1094
1095
- If you get a prompt asking for a password, it is: ` secret ` . If you wish to change this, you should either change
1096
- it in the ` /NodeBase/Dockerfile ` and build the images yourself, or you can define a Docker image that derives from
1097
- the posted ones which reconfigures it:
1098
-
1099
- Dockerfile example that extends the ` node-chrome:4.9.0-20230421 ` . You can choose another browser image or a Standalone
1100
- browser image.
1101
-
1102
- ``` dockerfile
1103
- FROM selenium/node-chrome:4.9.0-20230421
1104
-
1105
- RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
1106
- ```
1107
-
1108
- Save the ` Dockerfile ` as ` DockerfileVNCPasswordChanged ` , open a terminal and on the same directory run:
1109
-
1110
- ``` shell
1111
- docker build -t selenium/node-chrome-vnc-password-changed:4.9.0-20230421 -f DockerfileVNCPasswordChanged .
1112
- ```
1113
-
1114
- And from now on, instead of using ` node-chrome:4.9.0-20230421 ` in your scripts or docker-compose files, use
1115
- ` selenium/node-chrome-vnc-password-changed:4.9.0-20230421 ` .
1095
+ If you get a prompt asking for a password, it is: ` secret ` . If you wish to change this,
1096
+ you can set the environment variable ` SE_VNC_PASSWORD ` .
1116
1097
1117
1098
If you want to run VNC without password authentication you can set the environment variable ` SE_VNC_NO_PASSWORD=1 ` .
1118
1099
You can’t perform that action at this time.
0 commit comments