Skip to content

Instantly share code, notes, and snippets.

@aptivate
Created July 13, 2011 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aptivate/1080780 to your computer and use it in GitHub Desktop.
Save aptivate/1080780 to your computer and use it in GitHub Desktop.
README to go with fabfile for VNC connections - https://gist.github.com/1080774
These are files to make it easy to set up VNC connections.
QUICK GUIDE TO GETTING GOING
============================
The person who starts the connection should do:
fab startvnc
Anyone else wanting to join who has this fabric script can do:
fab joinvnc
PREREQUISITES
=============
This assumes you are running linux and have the following packages installed
(debian/ubuntu package names used):
* fabric
* tightvncviewer
To ensure they are installed you can just do:
sudo apt-get install fabric tightvncviewer
WHAT IT DOES
============
startvnc will:
* ensure your remote account has the standard VNC password
* check the display is available and suggest another one if not
* start the VNC server for your account remotely
* start the VNC viewer for you locally
* when the VNC viewer exits it will kill the VNC server remotely
joinvnc will:
* start the VNC viewer for you locally.
OPTIONS
=======
Display Number
--------------
One option is to vary the display number. By default we use display number :1
(which means port 5901). But other people can join you, so we can have
multiple VNC sessions if required. Just add the display number to the end.
So for the first person:
fab startvnc:2
And anyone else joining:
fab joinvnc:2
Use SSH
-------
You can use a ssh tunnel to make the session more secure - if you don't then
anything you do will be visible to any eavesdropper.
So for the first person:
fab startvnc:use_ssh=True
And anyone else joining:
fab joinvnc:use_ssh=True
You can also combine the arguments, eg
fab startvnc:2,use_ssh=True
Note that the ssh tunnel can be a bit slow. To turn on compression (currently)
requires you to add the following to ~/.ssh/config
Host vnc.example.org
Compression yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment