VNC password handling; chrome --start-maximized

pull/6/head
Tomohisa Kusano 7 years ago
parent cd0703e034
commit ef44089d0f

@ -5,7 +5,6 @@ MAINTAINER Tomohisa Kusano <siomiz@gmail.com>
COPY copyables /
ADD https://dl.google.com/linux/linux_signing_key.pub /tmp/
ADD https://launchpad.net/ubuntu/+archive/primary/+files/libgcrypt11_1.5.3-2ubuntu4.4_amd64.deb /tmp/
RUN apt-key add /tmp/linux_signing_key.pub \
&& apt-get update \
@ -17,7 +16,6 @@ RUN apt-key add /tmp/linux_signing_key.pub \
supervisor \
x11vnc \
fluxbox \
&& dpkg -i /tmp/libgcrypt11_*.deb \
&& apt-get clean \
&& rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/* /tmp/* \
&& addgroup chrome-remote-desktop \
@ -27,11 +25,11 @@ RUN apt-key add /tmp/linux_signing_key.pub \
&& mkdir -p /home/chrome/.config/chrome-remote-desktop \
&& mkdir -p /home/chrome/.fluxbox \
&& echo ' \n\
session.screen0.toolbar.visible: false
session.screen0.fullMaximization: true
session.screen0.maxDisableResize: true
session.screen0.maxDisableMove: true
session.screen0.defaultDeco: NONE
session.screen0.toolbar.visible: false\n\
session.screen0.fullMaximization: true\n\
session.screen0.maxDisableResize: true\n\
session.screen0.maxDisableMove: true\n\
session.screen0.defaultDeco: NONE\n\
' >> /home/chrome/.fluxbox/init \
&& chown -R chrome:chrome /home/chrome/.config /home/chrome/.fluxbox
@ -39,4 +37,6 @@ VOLUME ["/home/chrome"]
EXPOSE 5900
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

@ -1,2 +1,2 @@
rm -rf /home/chrome/.config/chrome-remote-desktop/chrome-profile/Singleton*
exec /opt/google/chrome/chrome --no-sandbox --window-position=0,0 --window-size=1024,768 --force-device-scale-factor=1
exec /opt/google/chrome/chrome --no-sandbox --start-maximized --force-device-scale-factor=1 --use-system-title-bar

@ -0,0 +1,25 @@
#!/bin/bash
set -e
# VNC default no password
export X11VNC_AUTH="-nopw"
# look for VNC password file in order (first match is used)
passwd_files=(
/home/chrome/.vnc/passwd
/run/secrets/vncpasswd
)
for passwd_file in ${passwd_files[@]}; do
if [[ -f ${passwd_file} ]]; then
export X11VNC_AUTH="-rfbauth ${passwd_file}"
break
fi
done
# override above if VNC_PASSWORD env var is set (insecure!)
if [[ "$VNC_PASSWORD" != "" ]]; then
export X11VNC_AUTH="-passwd $VNC_PASSWORD"
fi
exec "$@"

@ -2,7 +2,7 @@
nodaemon=true
[program:xvfb]
command=/usr/bin/Xvfb :1 -screen 0 1024x768x24
command=/usr/bin/Xvfb :1 -screen 0 1024x768x24 +extension RANDR
autorestart=true
priority=100
@ -14,7 +14,7 @@ autorestart=true
priority=200
[program:x11vnc]
command=/usr/bin/x11vnc -display :1 -nopw -wait 5 -forever
command=/usr/bin/x11vnc -display :1 %(ENV_X11VNC_AUTH)s -wait 5 -forever -xrandr
user=chrome
autorestart=true
priority=300

Loading…
Cancel
Save