Step by step instructions to install VNC

Refer following step by step instructions to install VNC
1) As root user fire the commands

yum install vnc-server xorg-x11-xauth xorg-x11 twm xterm

2) if yum is not working, download the rpm using “wget http://mirror.pacific.net.au/linux/CentOS/4.2/os/i386/CentOS/RPMS/vnc-server-4.0-8.1.i386.rpm
2.1) install vncserver by the command “rpm -Uvh vnc-server-4.0-8.1.i386.rpm

3) start vncserver by “vncserver :0“. You will be asked for password, set the password you require.

4) try to vnc into your Linux box from Windows to your Linux box using server_ip:5900 eg. 192.168.0.21:5900
4.1) if it doesn’t work, bring down your firewall by doing “service iptables stop” and vnc from your Windows again.

5) you can stop the vncserver by using command “vncserver -kill :0

6) remember to bring your firewall back up “service iptables start”

7) you might want to have gnome, kde running.. in that case look into your ~/.vnc/xstartup file, uncomment two lines (# unset SESSION_MANAGER and # exec /etc/X11/xinit/xinitrc)

8) If gnome is not install, Install Gnome using “yum install gnome-* ” and set the server to use gnome desktop using “switchdesk gnome” and restart VNC.

9) you might want to start vncserver when the system reboots, use “chkconfig –level 345 vncserver on”

10) You can change the VNC server password using “vncpasswd

Note : If getting error while starting VNC
——
[root@202 conf]# vncserver :0
vncserver: couldn’t find “xauth” on your PATH.
——
do:
check if xauth is installed

which xauth
yum install xorg-x11-xauth
yum install xorg-x11
yum install twm
yum install xterm

About Anant 373 Articles
Senior technical writer