Swap tigervnc server for turbovnc server.

- This appears to fix several render issues in Firefox and bumps performance quite a bit.
This commit is contained in:
Teffen Ellis 2020-10-24 01:21:05 +00:00
parent b8ad3bcb41
commit f8bd8ada5e
3 changed files with 40 additions and 15 deletions

View File

@ -4,6 +4,9 @@ USER 0
ARG DEBCONF_NONINTERACTIVE_SEEN=true
ARG DEBIAN_FRONTEND="noninteractive"
ARG TURBOVNC_VERSION=2.2.5
ARG VIRTUALGL_VERSION=2.6.4
ARG LIBJPEG_VERSION=2.0.5
RUN echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections
@ -14,9 +17,6 @@ RUN apt-get update && apt-get install -y \
zsh \
supervisor \
xorg \
tigervnc-standalone-server \
tigervnc-xorg-extension \
tigervnc-viewer \
ssh \
xfce4 \
xfce4-goodies \
@ -24,7 +24,18 @@ RUN apt-get update && apt-get install -y \
xterm \
python-numpy \
firefox \
fonts-lyx
fonts-lyx \
libxtst6 \
libxv1 \
libglu1-mesa \
libc6-dev \
libglu1 \
libsm6 \
libxv1 \
x11-xkb-utils \
xauth \
xfonts-base \
xkb-data
# Install quality of life packages.
RUN yes | unminimize
@ -45,6 +56,26 @@ RUN curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd
ARG HOME=/home/coder
ARG VNC_ROOT_DIR=/opt/vnc
RUN cd /tmp \
&& curl -fsSL -O https://svwh.dl.sourceforge.net/project/turbovnc/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb \
-O https://svwh.dl.sourceforge.net/project/libjpeg-turbo/${LIBJPEG_VERSION}/libjpeg-turbo-official_${LIBJPEG_VERSION}_amd64.deb \
-O https://svwh.dl.sourceforge.net/project/virtualgl/${VIRTUALGL_VERSION}/virtualgl_${VIRTUALGL_VERSION}_amd64.deb \
&& dpkg -i *.deb \
&& rm -f /tmp/*.deb \
&& sed -i 's/$host:/unix:/g' /opt/TurboVNC/bin/vncserver
RUN ln -s /opt/TurboVNC/bin/* /opt/VirtualGL/bin/* /usr/local/bin/
# Configure VGL for use in a single user environment.
# This may trigger a warning about display managers needing to be restarted.
# This can be ignored as the VNC server manages this lifecycle.
RUN vglserver_config -config +s +f +t
RUN echo 'no-remote-connections\n\
no-httpd\n\
no-x11-tcp-connections\n\
no-pam-sessions\n\
' > /etc/turbovncserver-security.conf
ENV VNC_SCRIPTS=$VNC_ROOT_DIR/scripts \
VNC_SETUP_SCRIPTS=$VNC_ROOT_DIR/setup \
VNC_LOG_DIR=$HOME/.vnc/log \

View File

@ -1,5 +1,5 @@
[program:tigervnc]
command=/opt/vnc/scripts/tigervnc.sh
[program:vncserver]
command=/opt/vnc/scripts/vncserver.sh
autorestart=true
stopasgroup=true
killasgroup=true

View File

@ -6,21 +6,15 @@ mkdir -p $VNC_LOG_DIR
if [[ -v VNC_DISPLAY_ID ]]; then
echo "Removing previous VNC locks..."
vncserver -kill "$VNC_DISPLAY_ID" &> "$VNC_LOG_DIR/vnc_startup.log"
rm -rfv /tmp/.X90-lock /tmp/.X11-unix &> "$VNC_LOG_DIR/vnc_startup.log"
vncserver -kill "$VNC_DISPLAY_ID" &> "$VNC_LOG_DIR/vnc_startup.log" || true
rm -rfv /tmp/.X90-lock /tmp/.X11-unix &> "$VNC_LOG_DIR/vnc_startup.log" || true
fi
echo -e "Starting vncserver with param: VNC_COL_DEPTH=$VNC_COL_DEPTH, VNC_RESOLUTION=$VNC_RESOLUTION\n..."
exec vncserver "$VNC_DISPLAY_ID" \
-cleanstale \
-SecurityTypes None \
-AlwaysShared \
-AcceptKeyEvents \
-AcceptPointerEvents \
-AcceptSetDesktopSize \
-SendCutText \
-AcceptCutText \
-alwaysshared \
-depth "$VNC_COL_DEPTH" \
-geometry "$VNC_RESOLUTION" \
-fg \