Commit 3a237139 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Merge branch 'feature/kasmvnc' into develop

parents 6aa51f93 7145df08
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ RUN apt-get install net-tools dbus-x11 -y
#----------------------

RUN apt-get update
RUN apt-get install xfce4 xfce4-terminal mousepad ristretto tumbler firefox -y
RUN apt-get install xfce4 xfce4-terminal mousepad ristretto tumbler firefox gnome-flashback -y


#----------------------
@@ -74,8 +74,10 @@ RUN chmod 755 /bin/runshell.sh
# Fix home permissions
RUN chmod 777 /home

# Set entrypoint command
ENV X11_ENTRYPOINT_COMMAND=":"
# X environment startup
RUN mkdir -p /metauser_home_vanilla/.vnc
COPY files/xstartup /metauser_home_vanilla/.vnc
RUN chmod 755 /metauser_home_vanilla/.vnc/xstartup

# Set user
USER metauser
+18 −0
Original line number Diff line number Diff line
#!/bin/sh

cd /home/metauser

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
export XDG_MENU_PREFIX="gnome-flashback-"


[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey
xfce4-session &
+15 −36
Original line number Diff line number Diff line
@@ -4,48 +4,27 @@ MAINTAINER Stefano Alberto Russo <stefano.russo@inaf.it>
# Switch to root
USER root

#------------------------
# Supervisord
#------------------------

# In this container we need to use supervisord as we have two services (VNC and noVNC)
RUN apt-get install supervisor -y

# Supervisord conf
COPY files/supervisord.conf /etc/supervisor/

# VNC supervisord conf
COPY files/supervisord_vnc.conf /etc/supervisor/conf.d/
COPY files/run_vnc.sh /etc/supervisor/conf.d/
RUN chmod 755 /etc/supervisor/conf.d/run_vnc.sh

# noVNC supervisord conf
COPY files/supervisord_novnc.conf /etc/supervisor/conf.d/
COPY files/run_novnc.sh /etc/supervisor/conf.d/
RUN chmod 755 /etc/supervisor/conf.d/run_novnc.sh


#------------------------
# VNC
# Kasm VNC
#------------------------

# Install xvfb that triggers minimal install of X base packages and xterm as sample application
RUN apt-get install xvfb xterm net-tools -y
# Install xvfb that triggers minimal install of X base packages and xterm as sample application,
# plus Python3 which is required for Kasm VNC
RUN apt-get install xvfb xterm net-tools python3 libjpeg8 libgomp1 -y

# Install base packages for VNC server and headless desktop (2)
COPY files/tigervnc-1.8.0.x86_64.tar.gz /opt/tigervnc-1.8.0.x86_64.tar.gz
RUN cd /opt && tar -zxvf tigervnc-1.8.0.x86_64.tar.gz && mv tigervnc-1.8.0.x86_64 tigervnc

# Web VNC (noVNC) v0.6.1.
# NOTE: this is a custom version from Doro Wu (fcwu.tw@gmail.com).
# TODO: Check differences and maybe move to 0.6.2
COPY files/noVNC.tar.gz /usr/lib/
RUN cd /usr/lib/ && tar -zxvf noVNC.tar.gz
COPY files/index.html /usr/lib/noVNC
# Kasm VNC (modded by gtaffoni to use a socket named by an env var)
COPY files/kasmvnc.ubuntu_focal.tar.gz /tmp
RUN sudo tar xz --strip 1 -C / -f /tmp/kasmvnc.ubuntu_focal.tar.gz && rm /tmp/kasmvnc.ubuntu_focal.tar.gz

# X environment setup/startup
COPY files/xstartup /opt/tigervnc/
RUN chmod 755 /opt/tigervnc/xstartup
RUN mkdir -p /metauser_home_vanilla/.vnc
COPY files/xstartup /metauser_home_vanilla/.vnc
RUN chmod 755 /metauser_home_vanilla/.vnc/xstartup

# KASM VNC startup script
COPY files/run_kasm.sh /usr/local/bin/run_kasm.sh
RUN chmod 755 /usr/local/bin/run_kasm.sh


#------------------------
@@ -56,7 +35,7 @@ RUN chmod 755 /opt/tigervnc/xstartup
RUN chmod 777 /home

# Set entrypoint command
ENV DEFAULT_ENTRYPOINT_COMMAND="supervisord"
ENV DEFAULT_ENTRYPOINT_COMMAND="/usr/local/bin/run_kasm.sh"

# Set user
USER metauser

X11Web/files/index.html

deleted100644 → 0
+0 −12
Original line number Diff line number Diff line
<html>
<head>
<script type="text/javascript">
function redirecter(){
    window.location = "./vnc.html?autoconnect=true&resize=remote"
}
</script>
</head>
<body onLoad="redirecter()">
Access VNC: click <a href="./vnc.html?autoconnect=true&resize=remote">here</a>.
</body>
</html>
 No newline at end of file
Loading