Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ssh_scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sofiane Bendoukha
ssh_scripts
Commits
7432cb34
Commit
7432cb34
authored
6 years ago
by
Mathis Rosenhauer
Browse files
Options
Downloads
Patches
Plain Diff
vnc: replace via with manual ssh tunnel so Win10 works
parent
e2d99f89
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
start-vnc
+13
-10
13 additions, 10 deletions
start-vnc
with
13 additions
and
10 deletions
start-vnc
+
13
−
10
View file @
7432cb34
#!/bin/bash
#
# Copyright 201
7
Deutsches Klimarechenzentrum GmbH
# Copyright 201
9
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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment