Setup VNC Server for Ubuntu Gutsy Gibbon and Hardy Heron in 3 easy steps
I just did this on Gutsy, and I thought that it might be worth sharing as a simple way to set up a persistent VNC server. If you dont know what VNC is, its similiar to Remote Desktop for wind0ze. This is accessible using regular vnc viewers, and through java-enabled browsers. That's right, you work on your computer through a browser.
1) Install packages | click here for 1 click installsudo aptitude install x11vnc vnc-java
2) Set up password to allow clients to viewx11vnc -storepasswd
3) Open up ports 5800 and 5900 on your firewall
4) Run this command: x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800
That's it!
And an optional step 5:
5) Add the command from 4) to your sessions, so that it starts at each login
If you want to test it out on a browser, type this in the URL field:
25.542.161.414:5800
Of course, replace the 25.etc. w/ your external IP address.
Addendums to this are welcome, such as how to make it more secure. I just thought it'd be nice to have a quick and dirty tutorial for getting this set up easily.
Comments (21)

Comments by IntenseDebate
· 909 weeks ago
· 909 weeks ago
AskTheAdmin.Com
Thanks you have friends over @ <A HREF="http://www.askTheAdmin.com" REL="nofollow">AskTheAdmin.com!
· 909 weeks ago
· 908 weeks ago
04/11/2007 11:08:44 x11vnc version: 0.8.2 lastmod: 2006-07-12
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: MIT-MAGIC-COOKIE-1 data did not match
04/11/2007 11:08:45 ***************************************
04/11/2007 11:08:45 *** XOpenDisplay failed (localhost:10.0)
*** x11vnc was unable to open the X DISPLAY: "localhost:10.0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.
HELP!
· 906 weeks ago
Forest · 856 weeks ago
· 906 weeks ago
it doesnt work when I type "(my name)-desktop:5800
· 905 weeks ago
Head over to http://www.ubuntuforums.org, register, browse the forums! Chances are, someone has already solved the problem you are looking to solve. If you cannot find a solution somewhere, feel free to post a thread under the appropriate section.
To uninstall,
sudo aptitude remove x11vnc vnc-java
Yes, windows remote desktop (as far as I am aware) is a proprietary piece of software that is not VNC-compliant.
And finally, a security note here: Using the default ports of 5800 and 5900 is generally bad security practice. Try changing them so something higher (40,000-65,000 is a good range). Be sure you forward the correct port, if you are behind a firewall!
Good luck!
· 891 weeks ago
lmao.
· 887 weeks ago
LMAO!
sudo aptitude remove x11vnc vnc-java
Joel · 883 weeks ago
defcon 52p · 883 weeks ago
nowandever29 · 881 weeks ago
renat · 878 weeks ago
sidm · 878 weeks ago
MIlorad · 869 weeks ago
Richard · 859 weeks ago
Thanks in advance.
netvampire · 846 weeks ago
Shad · 829 weeks ago
djf · 823 weeks ago