First update the packages with,
apt-get update
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 1024x768 -depth 16 -pixelformat rgb565
5. Now, if you execute command
ps aux
You 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
Comment "x-window-manager" and add this on the end of file:
gnome-session &
so it will look like this:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
gnome-session &
7. Next, do a reboot. Usually a reboot is not needed, but just to make sure you can do it.
sudo reboot
8. Start the VNC server:
vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565
9. Download Tight VNC client here: http://www.tightvnc.com/download.html