Installing VNC Remote Desktop on Ubuntu Linux VPS
I have a linux Ubuntu 8.10 VPS that I would like to have GUI and use it as remote desktop pc just like what we can do with Windows XP. Here are the steps that I run.
1. Most of the VPS that delivered by VPS hosting provider is minimal setup of linux, it means that most of the time it only have SSH server installed and the other services such as HTTP server, FTP server, Mail server must be installed by our self. The default setup of VPS linux also doesn’t have window manager (GUI) hence we must install it first:
sudo apt-get install ubuntu-desktop
2. Configure the Gnome Desktop Manager and XServer
sudo /etc/init.d/gdm start sudo dpkg-reconfigure xserver-xorg
3. After we installed a window manager, next step is to install the remote desktop server, for linux we use TightVNC
sudo apt-get install tightvncserver
4. Next we need to configure the remote desktop server and create a password to access the VPS via its GUI. This command will start the server, you will be asked for a password, this password will be used as authentication when you connect to the VPS, make sure you have a strong password.
vncserver :1 -geometry 1024×768 -depth 16 -pixelformat rgb565
5. Now, if you execute command
ps auxYou should see an Xtightvnc process:
Xtightvnc :1 -desktop X –auth
This means the setting is OK and VNC server is running fine.
6. The default VNC server doesn’t use Gnome window manager as default, to run Gnome as default we must do some changes on the configuration file.
sudo nano ~/.vnc/xstartup
Add this on the end of file:
gnome-session &
7. Next, do a reboot. Usually a reboot is not needed, but just to make sure you can do it.
sudo reboot8. Start the VNC server:
vncserver :1 -geometry 1024×768 -depth 16 -pixelformat rgb565
9. Download Tight VNC client here: http://www.tightvnc.com/download.html
10. After you install it, run the VNC client and insert your VPS IP address and VNC server number on the VNC Server field and click on “Connect”. In this tutorial the VNC server number is :1, so you must fill in :1

You will be asked for a password to access the remote desktop, this password is the one you set on step 4.
Related Article
Sideblog 
- Mozilla Released Thunderbird 3 9 December 2009
The long waited open source email client Thunderbird 3 is now released! Upgrading from Thunderbird 2 to Thunderbird 3 is very easy and almost automatically. Once you finished installing version 3, you. […] - Microsoft Wireless Comfort Desktop 5000 Keyboard and Mouse 22 October 2009
The Microsoft Wireless Comfort Desktop 5000 has been designed to enhance your Windows 7 experience. You can easily access programs in the task bar with convenient hot keys. Applications in the taskbar. […] - WooFunction: 178 Amazing Web Design Icons 28 September 2009
The WooFunction Icon Set includes 178 amazing web-related icons in a sophisticated and glossy design style. All 178 icons are available as 32×32 pixel PNG files and we can assure you that they are in. […] - Moblin the Next Generation OS for Netbook 27 September 2009
Moblin is an open source project that supports Linux-based software platform and is optimized for the next generation of mobile devices including netbooks, mobile Internet devices (MIDs), in-vehicle i. […] - Twitterify Your Wordpress Blog Using P2 Theme 21 September 2009
Twitter is becoming more and more popular due to its requirement as micro blogging is not much, only 140 characters that even less than a text message limit which is 160 characters. Blogger that is no. […]

August 4th, 2009 - 11:14
Amazing!! thanks for the walkthrough! make my night!!
October 25th, 2009 - 01:35
This is certainly the most straight forward description I have seen. It worked for me first time, thanks!
November 26th, 2009 - 08:37
Please can you do a rtorrent tutorial i’m begging YOU
November 26th, 2009 - 15:17
@mysoogal I will check on it
November 28th, 2009 - 14:40
Thanks for a straight forward and simple guide!
Cheers
January 5th, 2010 - 08:05
This quick little throw away kludge worked for me;
#!/bin/bash
#Install X
sudo apt-get install ubuntu-desktop
#
#startx
sudo /etc/init.d/gdm start
#
#Configure xserver
sudo dpkg-reconfigure xserver-xorg
#
#Install tightvncserver
sudo apt-get install tightvncserver
#
#Start vncserver to test
sudo vncserver :1 -depth 16 -pixelformat rgb565
#
#Verify server is running
ps -ef | grep Xtightvnc
#Kill vncserver and reboot
sudo tightvncserver -kill :1
#
#Switch vncserver Window Manager to Gnome
sudo sed -i “s/x-window-manager/gnome-session/” /$HOME/.vnc/xstartup
#
#Get viewer message
echo “Get vncviewer from here; http://www.tightvnc.com/download.html”
#
#Reboot
echo “Will reboot in 5 seconds, ctrl-c to exit.”
sleep 5
sudo reboot
February 5th, 2010 - 07:08
Cheers Markus, Haven’t tried your source above yet, but looks promising!
February 24th, 2010 - 05:36
I found your tutorial very thourough, but I am lost already on instruktion 2.
When I write sudo /etc/init.d/gdm start I get:
sudo: /etc/init.d/gdm: command not found
I have googled this, but fail to find a next step forward. Any ideas here?
Thanks
February 24th, 2010 - 06:24
what ubuntu version do you have? desktop/server? 8.x/9.x?
installing ubuntu-desktop meta package should install gdm also
can you try run:
cd /etc/init.d
sudo ls
March 5th, 2010 - 14:10
use the –fix-missing option in the first command.
sudo apt-get install ubuntu-desktop –fix-missing
March 5th, 2010 - 14:08
Very useful, worked a treat! Thanks.