diff options
-rwxr-xr-x | vnc | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -9,6 +9,11 @@ SERVER="$1" LOCALPORT="${2:-5901}" REMOTEPORT="${3:-5901}" +# Clipboard options +# In practice, clipboard limitations are not working as expected +# So please do not use this script if you don't want to automatically share clipboard with the remote system +VIEWER_OPTS="-AcceptClipboard off -SendClipboard off -SendPrimary off" + # Check if [ -x "$SERVER" ]; then echo "usage: $BASENAME <server> [localport] [remoteport]" @@ -38,7 +43,7 @@ ssh -f -L $LOCALPORT:127.0.0.1:$REMOTEPORT $SERVER sleep 10 # Run VNC client # Copy $SERVER:~/.vnc/passwd into $HOME/.vnc/$SERVER.passwd for passwordless login if [ -e "$HOME/.vnc/$SERVER.passwd" ]; then - vncviewer -passwd $HOME/.vnc/$SERVER.passwd localhost:$LOCALPORT + vncviewer $VIEWER_OPTS -passwd $HOME/.vnc/$SERVER.passwd localhost:$LOCALPORT else - vncviewer localhost:$LOCALPORT + vncviewer $VIEWER_OPTS localhost:$LOCALPORT fi |