From c7cdbd4442b0ae8289a6715755af161fbae204a4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 4 Sep 2024 13:49:47 -0300 Subject: Fix: vnc: support for multiple users --- vnc | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/vnc b/vnc index 94ce3d6..a5d9a28 100755 --- a/vnc +++ b/vnc @@ -6,8 +6,9 @@ # Parameters BASENAME="`basename $0`" SERVER="$1" -LOCALPORT="${2:-5901}" -REMOTEPORT="${3:-5901}" +REMOTEUSER="$2" +LOCALPORT="${3:-5901}" +REMOTEPORT="${4:-5901}" # Clipboard options # In practice, clipboard limitations are not working as expected @@ -16,7 +17,7 @@ REMOTEPORT="${3:-5901}" VIEWER_OPTS="-AcceptClipboard=off -SendClipboard=off -SetPrimary=off -SendPrimary=off" function usage { - echo "usage: $BASENAME [localport] [remoteport]" + echo "usage: $BASENAME [user] [localport] [remoteport]" cat <