bsodmike's photostream @ www.flickr.com
            

Better VNC in Ubuntu 10.04 Lucid Lynx with x11vnc

1/06/2010

Been working with Ubuntu Lucid a bit over the past few days and am not a big fan of the Vino VNC “Remote Desktop”. The problem is that it doesn’t persist when logged out. To get around this I setup x11vnc as per the HOWTO referenced at the end of this post.

Running it is quite simple, first ssh as follow:

1
ssh -L 5900:localhost:5900 yourUserName@serverIP

To bring up the login window for your ‘user’ account, run the following as root:

1
root@ubuntuServer:~# x11vnc -auth /home/someuser/.Xauthority -rfbauth ~/.vnc/passwd -display :0

At this stage, simply connect with ChickenVNC. VNC login password has been setup as per the referred guide and stored in the above mentioned location. Remember, when running the above at root, you need to recreate the password in ‘/root/.vnc’ – the root users home directory.

VNC Tunneling via SSH

In the very first ssh command, by using the ‘-L’ flag we bind the a port on the server we SSH to with a port defined on our host – localhost. This port has, for this example at least, chosen as 5900. We also force X11 forwarding,

1
ssh -X -L 5900:localhost:5900 yourUserName@serverIP

Ensure your /etc/ssh/ssh_config file is edited properly as well (here) & (here).

Achieve SSH tunnelling by using the ‘-localhost’ flag as follows:

1
root@ubuntuServer:~# x11vnc -auth /home/someuser/.Xauthority -rfbauth ~/.vnc/passwd -localhost -display :0

Now just connect ChickenVNC, or your VNC viewer of choice, to localhost:0 (with the chosen password if needed) to connect with SSH tunnelling!

Reference:

(1) HOWTO: Share desktops with x11vnc instead of built-in Remote Desktop

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

No comments yet.

Write a comment:

About

For the past couple years I lived in the UK, reading in BEng (Hons) Electronic and Computer Engineering at The University of Leeds and MSc (Dist) Mechatronics at King's College London.

My interests and hobbies include writing with Fountain Pens on various ink and paper, Swiss and German wristwatches, authoring articles in Mathematics, Physics, and Engineering, and Gundam modeling.

I have been following much Anime over the years as well as TV Shows with the likes of 24, Smallville, Dexter, and NCIS becoming favourites.