Commit 7432cb34 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

vnc: replace via with manual ssh tunnel so Win10 works

parent e2d99f89
#!/bin/bash
#
# Copyright 2017 Deutsches Klimarechenzentrum GmbH
# Copyright 2019 Deutsches Klimarechenzentrum GmbH
#
# All rights reserved.
#
......@@ -39,10 +39,8 @@
# Technically, it starts a VNC server on one of the GPU nodes by
# submitting a generated job script. A local vncviewer client is used
# to connect to the server over an encypted ssh tunnel. After the
# client shuts down, the server job is terminated.
#
# Your local vncviewer client has to support the -via
# option. TigerVNC, TightVNC, and TurboVNC are known to work.
# client shuts down, the server job is terminated. TigerVNC, TightVNC,
# and TurboVNC are known to work.
#
# In case of problems contact Mathis Rosenhauer <rosenhauer@dkrz.de>.
#
......@@ -136,7 +134,7 @@ clean_up () {
# Remove local vnc PasswordFile
if [[ ${SVNC_PASSWORD} = "true" ]]; then
rm -f "${HOME}/vnc_passwd"
rm -f "vnc_passwd"
fi
exit
}
......@@ -278,13 +276,18 @@ main () {
echo "Vncserver started on node ${vnc_host}.dkrz.de display \
:${vnc_display}."
local vnc_port=$((5900+${vnc_display}))
ssh -o ForwardX11=no \
-L "${vnc_port}:localhost:${vnc_port}" \
-Nf \
"${SVNC_USERNAME}@${vnc_host}.dkrz.de";
local vnc_options
vnc_options="${SVNC_VNC_OPTIONS:-} \
-via ${SVNC_USERNAME}@${vnc_host}.dkrz.de"
vnc_options="${SVNC_VNC_OPTIONS:-}"
if [[ ${SVNC_PASSWORD} = "true" ]]; then
echo "Fetching password from frontend."
ssh_frontend "cat .vnc/passwd" > ${HOME}/vnc_passwd
vnc_options+=" -passwd ${HOME}/vnc_passwd"
ssh_frontend "cat .vnc/passwd" > vnc_passwd
vnc_options+=" -passwd vnc_passwd"
fi
echo "Connecting vncviewer to ${vnc_host}.dkrz.de"
"${SVNC_VNCVIEWER}" ${vnc_options} :${vnc_display}
......
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