How to install VNC server in CentOS
Install Required Packets using yum
# yum install vnc-server gnome-desktop xorg-x11-xinit xterm gnome-applets gnome-session gnome-themes gnome-panel gdm firefox dbus-x11
Set Password for VNC server user
# vncpasswd
Type new password and confirm it for accessing vnc server
Note:- To set password to user you must login with that user to create vnc password.
# vi /etc/sysconfig/vncservers
VNCSERVERS="1:root"
VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”
#service vncserver start
#service vncserver stop
#vi .vnc/xstartup
Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
# service vncserver start
It done. Now connect to vnc server from vncviewer with <IP_Address>:1