The VNC server is the remote control software that allows you to connect to the VPS Desktop.
1. Install Gnome Desktop, VNC Server and Xterm.
yum groupinstall gnome-desktop
yum install vnc-server xterm
It will take some time to install the Gnome Desktop as it quite big packages.
2. Create a normal user.
useradd vncuser
Setup the user password for vncuser
passwd vncuser
3. Login as vncuser and create VNC password.
vncpasswd
ls .vnc
4. Creating xstartup script.
Assuming no problems are encountered vncserver will output a message that looks something like:
New ‘myhost:1 (src)’ desktop is myhost:1
Creating default startup script /home/neil/.vnc/xstartup
Starting applications specified in /home/neil/.vnc/xstartup
Log file is /home/neil/.vnc/myhost:1.log
The key information here is that vncserver has started up an X server as display :1 on system “myhost” and that it has created a sub-directory called .vnc in the home directory of the user that started the server containing a startup script called xstartup.
To stop the VNC server simpy run the following command:
vncserver -kill :1
Now check if the xstartup script is created
ls /home/vncuser/.vnc
That command should show these files: passwd <hostname>:1.log xstartup
5. Edit the default xstartup script to run Gnome desktop.
The default xstartup script looks like this:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
You have to edit it so it looks like this:
#!/bin/sh
( while true; do xterm; done ) &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 1024x768 -ls -name "$VNCDESKTOP Desktop" &
gnome-session &
6. Start the VNC server.
After finished editing the xstartup script run again the vncserver service
vncserver
7. Download Tight VNC client here: http://www.tightvnc.com/download.html
8. Connect to the VNC server
After you installed the Tight VNC client, run it and you’ll see this form:
On the VNC Server field, insert your VPS’ IP address followed with ‘:1’ and then click on Connect.
You’ll be asked for a password, this is the password you created on step 3.
9. Starting vncserver at boot
To start vncserver at boot, enter the command chkconfig vncserver on.
(: =================================================================================================== :)
For ubundu and Debian
http://anhblog.net/pc-place/setup-ubuntu-vps-as-a-vnc/