Created
April 2, 2016 21:46
-
-
Save isuldor/af56eaf06beed30ace871ee8c567e7a8 to your computer and use it in GitHub Desktop.
Lazy VNC connection script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Connect to the actual X desktop session of another machine | |
# x0vncserver is included with TigerVNC | |
DESKTOP=10.10.10.10 | |
if ! nc -nvz ${DESKTOP} 5900; then | |
ssh ${DESKTOP} 'x0vncserver -MaxDisconnectionTime=120 -Display :0 -PasswordFile ~/.vnc/passwd' & | |
sleep 1 | |
fi | |
vncviewer DotWhenNoCursor=1 ${DESKTOP} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment