Setting Up a VNC Server on Ubuntu for Remote Access
My Ubuntu server (an EeePC 901 netbook) is currently placed on top of the refrigerator. To access it directly, I have to stand on the TV stand and stretch on my toes. To make things easier, I set up a VNC server so I can access it from my daily driver PC. Surprisingly, VNC clients are now available for tablets and smartphones too, meaning I can control Ubuntu while lounging in bed. Take it a step further by configuring your router to forward the IP and ports, and you can even access it from your smartphone while away from home.
Reference URL:http://masahir0y.blogspot.jp/2013/05/ubuntu.htmlVNC can be easily configured through the GUI after logging in. Running the shell command "$vino-preferences" opens the "Desktop Sharing Preferences." However, with this method, you lose the connection as soon as you log out. That would mean physically accessing the top of the fridge every time I want a remote connection...
[The Problem] It only works when logged in.
[The Solution] Use X11vnc.
Install it with:
$ sudo apt-get install x11vnc xinetd
The default settings were fine out of the box.
/etc/xinetd.d/x11vnc
Set up the x11vnc password:
$ sudo x11vnc -storepasswd /etc/vncpasswd
-> Enter and confirm your password.
Restart xinetd:
$ sudo service xinetd restart
After that, you can connect using a VNC client from Ubuntu, Windows, or even your smartphone.

