As part of the HP Microserver build: seeking to have a backup remote administration (VNC) service I opted to install TightVNCServer. TightVNC is a free remote control software package which allows you to see the desktop of a remote machine and control it with your local mouse and keyboard, just like you would do it sitting in the front of that computer. TightVNC is free for both personal and commercial usage, and compatible with standard VNC software. The main reasons for installing TightVNC are that I often find it to be faster and more responsive than the Ubuntu built-in Remote Desktop VNC server, vino, and also I find that vino can often be unreliable with the screen not updating. Read on...
Installing TightVNCServer can be done through the built in Ubuntu package manager. I however, installed TigthVNCServer through Webmin's software package manager as part of the Microserver's headless install. Once installed TightVNCServer will need to be configured:
- Open a new terminal and run 'TightVNCServer' to get the server up and running
- Set the default TightVNCServer password
- Reconfirm the default TIghtVNCServer password
- Set whether the server should be view-only as opposed to allowing control
- The server should now be running most likely on port 5901,
- To confirm the port the VNC server is running on run from the terminal sudo netstat -pl | grep Xtightvnc
- Connect to the VNC server on the port discovered above using another PC and an appropriate VNC client.
Keyring & VNC Server
On rebooting the VNC server should start automatically but may not allow logins until the user keyring is unlocked. There are a couple aways around this one is to remove the password on the keyring in Ubuntu (this is not recommended as it will substantially lower your security) but can be done as follows:
- Go click Applications > Accessories > Passwords and Encryption keys
The should be entries there listing an array of keyring password.
- Right click on them and select change password
- Enter the old password if you have one then leave the new password blank. (A warning message should appear)
A more elegant approach is to change the password key for the VNC server to match your VNC password, which therefore doesn't require the keyring to be unlocked.
Here's how to do it for Vino the default Ubuntu remote desktop server:
- Go click Applications->Accessories->Passwords and Encryption Keys
- Right click Passwords:default and unlock it.
- You should be able to expand the tree and find a listing for vino. Right click and delete it.
- Close Passwords and Encryption Keys.
- Open gconf-editor and navigate to /desktop/gnome/remote_access
- Create a BASE64 encoded password (here)
- Enter in your BASE64 encoded password into the vnc_password key.
- Save the config and close the editor.
- Reboot and you can now use your VNC client to connect to your machine without being first prompted with the keyring.
Here's how to do it for TightVNCServer:
- I've still not been able to figure this out as of yet.
To enable TightVNCServer to start at boot I added at line to the rc.local start up script here's how:
sudo gedit rc.local
Add the line:
su - username -c "/usr/bin/tightvncserver"
Save and close. Done!
Optimal VNC Viewer settings
As a side note if you are using the Tight VNC viewer to access another VNC server I have found I obtain the best quality/performance using the client with the following parameters:
xtightvncviewer -bgr233 -encodings "tight" -compresslevel 9 -quality 0 vncserveripaddress::vncserverport