Using x11vnc with Ubuntu


There might come a time when you want to connect to a remote ubuntu machine, whether for your own use or to assist someone else with a problem. An easy (relatively) way to do this is to use x11vnc as a VNC server. I'll show you how to get it set up for Ubuntu (I'm using Ubuntu 12.04 for both machines, the remote one and the one I am on).

To get started, install x11vnc on the remote machine. You can do this via the terminal emulator and ssh:

sudo apt-get install x11vnc

Then you should set up a password:

x11vnc --storepasswd

Next you can start the VNC server:

x11vnc -geometry 1366x768 -rfbauth .vnc/passwd

The previous command started the server with a display resolution of 1366x768 (my local machine's native resolution) and used the password you set by referencing the file passwd in the .vnc directory.

To connect to the machine, you will need to know the remote machine's IP address. You can find this by searching for "my ip" on Google from the remote machine. It gets a little more complicated in that you need the VNC (port 5900) traffic going to that remote machine. This may involve changing a setting on the remote network's router. I use Remmina to connect to remote machines using VNC.