Skip to content

Commit 0856320

Browse files
authored
Merge pull request #19 from mrgreywater/tigervnc
replace x11vnc and xvfb with tigervnc ( @mrgreywater ) - solves #18
2 parents 638e061 + f0d7638 commit 0856320

7 files changed

Lines changed: 27 additions & 42 deletions

File tree

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ You can customize the settings of the Docker container by passing environment va
5757
- Enabling/disabling auto-start for the browser: `AUTO_START_BROWSER=true` or `AUTO_START_BROWSER=false`
5858
- Enabling/disabling auto-start for xterm: `AUTO_START_XTERM=true` or `AUTO_START_XTERM=false`
5959
- Enabling/disabling auto-start for window manager (fluxbox): `AUTO_START_WM=true` or `AUTO_START_WM=false`
60-
- Enabling/disabling auto-start for x11vnc: `AUTO_START_X11VNC=true` or `AUTO_START_X11VNC=false`
61-
- Enabling/disabling auto-start for xvfb: `AUTO_START_XVFB=true` or `AUTO_START_XVFB=false`
60+
- Enabling/disabling auto-start for vnc (tigervnc): `AUTO_START_VNC=true` or `AUTO_START_VNC=false`
6261
- Enabling/disabling auto-start for noVNC (websockify): `AUTO_START_NOVNC=true` or `AUTO_START_NOVNC=false`
6362
- Adding command options for browser: `BROWSER_OPTIONS="--start-fullscreen --kiosk --incognito --noerrdialogs --no-first-run --disk-cache-dir=/dev/null"`
64-
- Adding command options for x11vnc: `X11VNC_OPTIONS="-nocursor"`
65-
- Adding command options for xvfb: `XVFB_OPTIONS="-nocursor"`
63+
- Adding command options for vnc (tigervnc): `VNC_OPTIONS="-AlwaysShared"`
6664
- Adding command options for window manager (fluxbox): `WM_OPTIONS="-rc /app/fluxbox.conf"`
6765
- Adding command options for noVNC (websockify): `NOVNC_OPTIONS="--heartbeat=10"`
6866
- Adding command options for xterm: `XTERM_OPTIONS="-leftbar"`
@@ -83,14 +81,12 @@ You can customize the settings of the Docker container by passing environment va
8381
| AUTO_START_BROWSER | true | Automatically start the browser |
8482
| AUTO_START_XTERM | true | Automatically start xterm |
8583
| AUTO_START_WM | true | Automatically start window manager (fluxbox) |
86-
| AUTO_START_X11VNC | true | Automatically start x11vnc |
87-
| AUTO_START_XVFB | true | Automatically start xvfb |
84+
| AUTO_START_VNC | true | Automatically start vnc (tigervnc) |
8885
| AUTO_START_NOVNC | true | Automatically start noVNC (websockify) |
8986
| CUSTOM_ENTRYPOINTS_DIR | /app/custom_entrypoints_scripts | Directory for custom entry point scripts |
9087
| DEBIAN_FRONTEND | noninteractive | Frontend setting for Debian-based installations |
9188
| BROWSER_OPTIONS | | Additional command options to provide to browser start |
92-
| X11VNC_OPTIONS | | Additional command options to provide to x11vnc start |
93-
| XVFB_OPTIONS | | Additional command options to provide to xvfb start |
89+
| VNC_OPTIONS | | Additional command options to provide to vnc (tigervnc) start |
9490
| WM_OPTIONS | | Additional command options to provide to window manager (fluxbox) start |
9591
| NOVNC_OPTIONS | | Additional command options to provide to noVNC (websockify) start |
9692
| XTERM_OPTIONS | | Additional command options to provide to xterm start |

alpine.dockerfile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ ARG DEF_CUSTOM_ENTRYPOINTS_DIR=/app/custom_entrypoints_scripts
1616
ARG DEF_AUTO_START_BROWSER=true
1717
ARG DEF_AUTO_START_XTERM=true
1818
ARG DEF_AUTO_START_WM=true
19-
ARG DEF_AUTO_START_X11VNC=true
20-
ARG DEF_AUTO_START_XVFB=true
19+
ARG DEF_AUTO_START_VNC=true
2120
ARG DEF_AUTO_START_NOVNC=true
2221
ARG DEF_BROWSER_OPTIONS=
23-
ARG DEF_X11VNC_OPTIONS=
24-
ARG DEF_XVFB_OPTIONS=
22+
ARG DEF_VNC_OPTIONS=
2523
ARG DEF_WM_OPTIONS=
2624
ARG DEF_NOVNC_OPTIONS=
2725
ARG DEF_XTERM_OPTIONS=
@@ -42,12 +40,10 @@ ENV DISPLAY=:${DEF_VNC_DISPLAY}.${DEF_VNC_SCREEN} \
4240
AUTO_START_BROWSER=${DEF_AUTO_START_BROWSER} \
4341
AUTO_START_XTERM=${DEF_AUTO_START_XTERM} \
4442
AUTO_START_WM=${DEF_AUTO_START_WM} \
45-
AUTO_START_X11VNC=${DEF_AUTO_START_X11VNC} \
46-
AUTO_START_XVFB=${DEF_AUTO_START_XVFB} \
43+
AUTO_START_VNC=${DEF_AUTO_START_VNC} \
4744
AUTO_START_NOVNC=${DEF_AUTO_START_NOVNC} \
4845
BROWSER_OPTIONS=${DEF_BROWSER_OPTIONS} \
49-
X11VNC_OPTIONS=${DEF_X11VNC_OPTIONS} \
50-
XVFB_OPTIONS=${DEF_XVFB_OPTIONS} \
46+
VNC_OPTIONS=${DEF_VNC_OPTIONS} \
5147
WM_OPTIONS=${DEF_WM_OPTIONS} \
5248
NOVNC_OPTIONS=${DEF_NOVNC_OPTIONS} \
5349
XTERM_OPTIONS=${DEF_XTERM_OPTIONS}
@@ -61,8 +57,7 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/reposit
6157
tini \
6258
supervisor \
6359
bash \
64-
xvfb \
65-
x11vnc \
60+
tigervnc \
6661
novnc \
6762
websockify \
6863
fluxbox \

base_entrypoint.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
# Add password to x11vnc options
4+
# Add password to vnc options
55
if [ -n "${VNC_PASSWORD}" ]; then
6-
X11VNC_OPTIONS="${X11VNC_OPTIONS} -passwd '${VNC_PASSWORD}'"
6+
mkdir -p ~/.vnc
7+
echo "${VNC_PASSWORD}" | vncpasswd -f > ~/.vnc/passwd
8+
export VNC_OPTIONS="${VNC_OPTIONS} -SecurityTypes VncAuth -PasswordFile /root/.vnc/passwd"
9+
else
10+
export VNC_OPTIONS="${VNC_OPTIONS} -SecurityTypes None"
711
fi
812

913
# Print current VNC info

conf.d/tigervnc.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[program:Xvnc]
2+
command=/usr/bin/Xvnc %(ENV_DISPLAY)s -geometry %(ENV_VNC_RESOLUTION)s -rfbport %(ENV_VNC_PORT)s %(ENV_VNC_OPTIONS)s
3+
autostart=%(ENV_AUTO_START_VNC)s
4+
autorestart=true
5+
# stdout_logfile=/var/log/Xvnc.log
6+
# stderr_logfile=/var/log/Xvnc.err.log

conf.d/x11vnc.conf

Lines changed: 0 additions & 6 deletions
This file was deleted.

conf.d/xvfb.conf

Lines changed: 0 additions & 6 deletions
This file was deleted.

debian.dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ ARG DEF_AUTO_START_BROWSER=true
1717
ARG DEF_AUTO_START_XTERM=true
1818
ARG DEF_DEBIAN_FRONTEND=noninteractive
1919
ARG DEF_AUTO_START_WM=true
20-
ARG DEF_AUTO_START_X11VNC=true
21-
ARG DEF_AUTO_START_XVFB=true
20+
ARG DEF_AUTO_START_VNC=true
2221
ARG DEF_AUTO_START_NOVNC=true
2322
ARG DEF_BROWSER_OPTIONS=
24-
ARG DEF_X11VNC_OPTIONS=
25-
ARG DEF_XVFB_OPTIONS=
23+
ARG DEF_VNC_OPTIONS=
2624
ARG DEF_WM_OPTIONS=
2725
ARG DEF_NOVNC_OPTIONS=
2826
ARG DEF_XTERM_OPTIONS=
@@ -45,12 +43,10 @@ ENV DISPLAY=:${DEF_VNC_DISPLAY}.${DEF_VNC_SCREEN} \
4543
DEBIAN_FRONTEND=${DEF_DEBIAN_FRONTEND} \
4644
AUTO_START_XTERM=${DEF_AUTO_START_XTERM} \
4745
AUTO_START_WM=${DEF_AUTO_START_WM} \
48-
AUTO_START_X11VNC=${DEF_AUTO_START_X11VNC} \
49-
AUTO_START_XVFB=${DEF_AUTO_START_XVFB} \
46+
AUTO_START_VNC=${DEF_AUTO_START_VNC} \
5047
AUTO_START_NOVNC=${DEF_AUTO_START_NOVNC} \
5148
BROWSER_OPTIONS=${DEF_BROWSER_OPTIONS} \
52-
X11VNC_OPTIONS=${DEF_X11VNC_OPTIONS} \
53-
XVFB_OPTIONS=${DEF_XVFB_OPTIONS} \
49+
VNC_OPTIONS=${DEF_VNC_OPTIONS} \
5450
WM_OPTIONS=${DEF_WM_OPTIONS} \
5551
NOVNC_OPTIONS=${DEF_NOVNC_OPTIONS} \
5652
XTERM_OPTIONS=${DEF_XTERM_OPTIONS}
@@ -63,8 +59,8 @@ RUN set -e; \
6359
tini \
6460
supervisor \
6561
bash \
66-
xvfb \
67-
x11vnc \
62+
tigervnc-standalone-server \
63+
tigervnc-tools \
6864
novnc \
6965
websockify \
7066
fluxbox \

0 commit comments

Comments
 (0)