From 3311f24e9ccb74944e2a74e15aeaaeed9edef81f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 28 Jun 2020 13:57:36 -0300 Subject: VNC: instructions --- vnc | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'vnc') diff --git a/vnc b/vnc index 2b190f7..94ce3d6 100755 --- a/vnc +++ b/vnc @@ -15,13 +15,39 @@ REMOTEPORT="${3:-5901}" # This is probably a bug on xtigervncviewer VIEWER_OPTS="-AcceptClipboard=off -SendClipboard=off -SetPrimary=off -SendPrimary=off" +function usage { + echo "usage: $BASENAME [localport] [remoteport]" + cat <:~/.vnc/passwd ~/.vnc/.passwd # copy the secret + $BASENAME # use our magic script to do everything else + +EOF + + exit 1 +} + +# Usage +if [ "$1" == "--help" ]; then + usage +fi + # Check if [ -z "$SERVER" ]; then if [ -h "$HOME/.vnc/default.passwd" ]; then SERVER="$(basename `readlink $HOME/.vnc/default.passwd` .passwd)" else - echo "usage: $BASENAME [localport] [remoteport]" - exit 1 + usage fi fi -- cgit v1.2.3