How to install & configure VNC server on CentOS

How to install & configure VNC server on CentOS

How to install VNCSERVER on CentOS

yum groupinstall “GNOME Desktop Environment”
yum install xterm vnc-server vnc

remove the existing file & edit with ‘/etc/sysconfig/vncservers‘ and put the following lines in it

VNCSERVERS=”2:root”
VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”

set the vnc password to open the vnc for user root (you have to login as a root)
vncpasswd

set the vnc password to open the vnc for user (you have to login as a normal user that way it will create the file xstartup in $home/.vnc)
vncpasswd

Now start the vncserver as root user
/etc/init.d/vncserver start

Now kill the vncserver proocesses using ‘ps aux | grep vnc | xargs kill -9’

and start vnc server by following command
vncserver

check the given path to open the vnc display as given in example
New ‘appserver.ravi.com:3 (root)’ desktop is appserver.ravi.com:3

before open the vncviewer remove the file ‘/tmp/.X1-lock’

Now open the vnc display you will get the default ‘xterm’ open on it.

Similar Posts:

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *