Commit 1405f791 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Working on upgrading Kasm VNC to 0.9.2

parent 31465d2a
......@@ -53,17 +53,21 @@ RUN apt-get install xvfb xterm -y
# && tar -zxvf tigervnc-1.8.0.x86_64.tar.gz \
# && mv tigervnc-1.8.0.x86_64 tigervnc
# Supervisord configuration
COPY files/supervisord_kasm.conf /etc/supervisor/conf.d/
COPY files/run_kasm.sh /etc/supervisor/conf.d/
RUN chmod 755 /etc/supervisor/conf.d/run_kasm.sh
# Kasm VNC (modded by gtaffoni to use a socket named by an env var)
COPY files/kasmvnc-Linux-x86_64-0.9.tar.gz /tmp
RUN sudo tar xz --strip 1 -C / -f /tmp/kasmvnc-Linux-x86_64-0.9.tar.gz && rm /tmp/kasmvnc-Linux-x86_64-0.9.tar.gz
RUN mkdir /usr/local/share/kasmvnc/certs
RUN chown metauser:metauser /usr/local/share/kasmvnc/certs
COPY files/index.html /usr/local/share/kasmvnc/www/
#COPY files/kasmvnc-Linux-x86_64-0.9.tar.gz /tmp
#RUN sudo tar xz --strip 1 -C / -f /tmp/kasmvnc-Linux-x86_64-0.9.tar.gz && rm /tmp/kasmvnc-Linux-x86_64-0.9.tar.gz
#RUN mkdir /usr/local/share/kasmvnc/certs
#RUN chown metauser:metauser /usr/local/share/kasmvnc/certs
#COPY files/index.html /usr/local/share/kasmvnc/www/
RUN apt-get install ssl-cert -y
RUN wget https://github.com/kasmtech/KasmVNC/releases/download/v0.9.2-beta/kasmvncserver_ubuntu_bionic_0.9.2_amd64.deb
# see https://github.com/kasmtech/workspaces-core-images/blob/develop/src/ubuntu/install/kasm_vnc/install_kasm_vnc.sh
#RUN wget https://kasmweb-build-artifacts.s3.amazonaws.com/kasmvnc/159d7527955f131e096cf1602b7f9f66cc5d66cb/kasmvncserver_bionic_0.9.3_master_159d75_amd64.deb
RUN dpkg -i kasmvncserver_*.deb
# Other utilities
RUN apt-get install -y net-tools
......@@ -94,6 +98,12 @@ COPY files/background.jpg /usr/share/images/fluxbox/background.jpg
RUN chmod 777 /home
# Supervisord configuration
COPY files/supervisord_kasm.conf /etc/supervisor/conf.d/
COPY files/run_kasm.sh /etc/supervisor/conf.d/
RUN chmod 755 /etc/supervisor/conf.d/run_kasm.sh
#----------------------
# Entrypoint
#----------------------
......
......@@ -72,8 +72,11 @@ else
echo "[INFO] Setting up default VNC password (metapassword)"
AUTH_PASS=metapass
fi
/usr/local/bin/kasmvncpasswd -f <<< $AUTH_PASS > /home/metauser/.kasmpasswd
chmod 600 /home/metauser/.kasmpasswd
#kasmvncpasswd -f <<< $AUTH_PASS > /home/metauser/.kasmpasswd
#chmod 600 /home/metauser/.kasmpasswd
echo -e "$AUTH_PASS\n$AUTH_PASS\n" | kasmvncpasswd -u metauser
export VNC_AUTH=True
......
......@@ -16,9 +16,9 @@ fi
if [ "x$VNC_AUTH" == "xTrue" ]; then
echo "[INFO] Setting new certificate for VNC"
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /home/metauser/.vnc/self.pem -out /home/metauser/.vnc/self.pem -subj "/C=IT/ST=None/L=None/O=INAF/OU=OATs/CN=kasm/emailAddress=none@none.none"
/usr/local/bin/vncserver :$DESKTOP_NUMBER -depth 24 -geometry 1280x1050 -websocketPort $BASE_PORT -cert /home/metauser/.vnc/self.pem -sslOnly -FrameRate=24 -interface 0.0.0.0
vncserver :$DESKTOP_NUMBER -depth 24 -geometry 1280x1050 -websocketPort $BASE_PORT -cert /home/metauser/.vnc/self.pem -sslOnly -FrameRate=24 -interface 0.0.0.0
else
/usr/local/bin/vncserver :$DESKTOP_NUMBER -depth 24 -geometry 1280x1050 -websocketPort $BASE_PORT -FrameRate=24 -interface 0.0.0.0
vncserver :$DESKTOP_NUMBER -depth 24 -geometry 1280x1050 -websocketPort $BASE_PORT -FrameRate=24 -interface 0.0.0.0
fi
# Check it is running. If it is not, exit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment