aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-12-11 11:10:53 -0200
committerSilvio Rhatto <rhatto@riseup.net>2018-12-11 11:10:53 -0200
commite8c7e3161c3ab54f4e5f25ef8c6f0b9d65a67a2f (patch)
treef65c4fd30a81cea9e4d3a783213e860bb0da8b84
parent761bf47b0bdac9e9d4b642aae6db9dd2789bda8e (diff)
downloadscripts-e8c7e3161c3ab54f4e5f25ef8c6f0b9d65a67a2f.tar.gz
scripts-e8c7e3161c3ab54f4e5f25ef8c6f0b9d65a67a2f.tar.bz2
VNC: on clipboard sharing
-rwxr-xr-xvnc9
1 files changed, 7 insertions, 2 deletions
diff --git a/vnc b/vnc
index 24f3c20..11759b2 100755
--- a/vnc
+++ b/vnc
@@ -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