Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DISCOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
INAF
DISCOS
Commits
aa78bc43
Unverified
Commit
aa78bc43
authored
3 years ago
by
Andrea Orlati
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix issue #653: med-vnc now allows to connect when inside the Medicina LAN (#670)
parent
49e8f2bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Medicina/Misc/MedScripts/src/med-vnc
+6
-6
6 additions, 6 deletions
Medicina/Misc/MedScripts/src/med-vnc
with
6 additions
and
6 deletions
Medicina/Misc/MedScripts/src/med-vnc
+
6
−
6
View file @
aa78bc43
...
@@ -5,7 +5,7 @@ print_help() {
...
@@ -5,7 +5,7 @@ print_help() {
echo
"
`
basename
$0
`
v1.0"
echo
"
`
basename
$0
`
v1.0"
echo
" "
echo
" "
echo
"Start a new session toward DISCOS control software"
echo
"Start a new session toward DISCOS control software"
echo
"Usage: '
`
basename
$0
`
[OPTIONS] [-
t
|--port portnumber] <role>@<gatein>'"
echo
"Usage: '
`
basename
$0
`
[OPTIONS] [-
p
|--port portnumber] <role>@<gatein>'"
echo
" '
`
basename
$0
`
-r|--roles'"
echo
" '
`
basename
$0
`
-r|--roles'"
echo
" '
`
basename
$0
`
-h|--help'"
echo
" '
`
basename
$0
`
-h|--help'"
echo
"<role> indicates the role (observer or administrative privileges) for which the connection is done"
echo
"<role> indicates the role (observer or administrative privileges) for which the connection is done"
...
@@ -114,9 +114,9 @@ for session in "${remote_sessions[@]}" ; do
...
@@ -114,9 +114,9 @@ for session in "${remote_sessions[@]}" ; do
if
[[
"
$role
"
==
"
$role_name
"
]]
;
then
if
[[
"
$role
"
==
"
$role_name
"
]]
;
then
if
[
"
$local_connection
"
=
"TRUE"
]
;
then
if
[
"
$local_connection
"
=
"TRUE"
]
;
then
#this is for local area connection when it will enabled
#this is for local area connection when it will enabled
#
remote_port=$lport
remote_port
=
$lport
remote_port
=
$rport
#
remote_port=$rport
ssh_port
=
51
22
ssh_port
=
22
else
else
remote_port
=
$rport
remote_port
=
$rport
fi
fi
...
@@ -154,11 +154,11 @@ fi
...
@@ -154,11 +154,11 @@ fi
if
[[
"
$local_connection
"
=
"TRUE"
]]
;
then
if
[[
"
$local_connection
"
=
"TRUE"
]]
;
then
echo
"Connecting from local area...."
echo
"Connecting from local area...."
#
ssh -N -f -L $local_port:192.168.1.99:$remote_port $role@192.167.189.98
ssh
-N
-f
-L
$local_port
:192.168.1.99:
$remote_port
$role
@192.167.189.98
else
else
echo
"Connecting from wide area....."
echo
"Connecting from wide area....."
fi
ssh
-N
-f
-p
$ssh_port
-L
$local_port
:192.167.189.98:
$remote_port
$role
@
$gatein
ssh
-N
-f
-p
$ssh_port
-L
$local_port
:192.167.189.98:
$remote_port
$role
@
$gatein
fi
if
[[
"
$vnc_avail
"
==
"TRUE"
]]
;
then
if
[[
"
$vnc_avail
"
==
"TRUE"
]]
;
then
echo
"Starting vncviewer...."
echo
"Starting vncviewer...."
vncviewer localhost:
$local_port
$viewonly
&>/dev/null
vncviewer localhost:
$local_port
$viewonly
&>/dev/null
...
...
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