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
2ea682db
Commit
2ea682db
authored
8 years ago
by
Mathis Rosenhauer
Browse files
Options
Downloads
Patches
Plain Diff
TightVNC also supports -passwd option
parent
a56637ed
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
startvnc.sh
+9
-19
9 additions, 19 deletions
startvnc.sh
with
9 additions
and
19 deletions
startvnc.sh
+
9
−
19
View file @
2ea682db
...
...
@@ -12,8 +12,7 @@
# patient.
#
# The vncviewer client has to support the -via option. TurboVNC,
# TigerVNC and TightVNC are known to work. You have to specify your
# vncviewer type because they differ in accepted and required options.
# TigerVNC and TightVNC are known to work.
set
-e
...
...
@@ -26,16 +25,13 @@ QOS=normal # <-- Set here an alternative QOS
# if desired
GEOMETRY
=
${
1
:-
"1920x1200"
}
# <-- Set here the resolution of
# your remote desktop window
VNCTYPE
=
TightVNC
# <-- Set to your vncviewer type.
# Can be one of TightVNC,
# TigerVNC, or TurboVNC
#OPTIONS="-extssh" # <-- Uncomment this if you use
# TurboVNC as vncviewer
VNCVIEWER
=
/usr/bin/vncviewer
# <-- Set here the correct path to
# your local vncviewer
PASSWORD
=
true
# <-- If enabled, the vncpassword
# will be temporarily copied to
# the local workstation
# (effective only with TurboVNC
# or TigerVNC)
MISTRAL
=
"
${
USERNAME
}
@mistral.dkrz.de"
...
...
@@ -114,18 +110,12 @@ host_and_display=$(ssh ${MISTRAL} "/bin/bash .startvnc/gethost.${job_id}")
vnc_host
=
${
host_and_display
%
:
*
}
vnc_display
=
${
host_and_display
#*
:
}
v
ncv
_options
=
"-via
${
USERNAME
}
@
${
vnc_host
}
.dkrz.de"
v
iewer
_options
=
"
${
OPTIONS
}
-via
${
USERNAME
}
@
${
vnc_host
}
.dkrz.de"
# Set options depending on vncviewer type
if
[[
${
VNCTYPE
}
=
TurboVNC
]]
;
then
vncv_options+
=
" -extssh"
fi
if
[[
${
VNCTYPE
}
=
TurboVNC
]]
||
[[
${
VNCTYPE
}
=
TigerVNC
]]
;
then
copy_password
=
${
PASSWORD
}
fi
# Start VNC client
if
[[
${
copy_password
}
=
true
]]
;
then
if
[[
${
PASSWORD
}
=
true
]]
;
then
scp
-q
${
MISTRAL
}
:.vnc/passwd
${
HOME
}
/vnc_passwd
v
ncv
_options+
=
" -
P
assw
ordFile
${
HOME
}
/vnc_passwd"
v
iewer
_options+
=
" -
p
assw
d
${
HOME
}
/vnc_passwd"
fi
${
VNCVIEWER
}
${
vncv_options
}
:
${
vnc_display
}
# Start VNC viewer
${
VNCVIEWER
}
${
viewer_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