vnc

www.youtube.com/watch?v=ZtJHQ-4yloI


$ sudo yum install tigervnc-server tigervnc -y
$ sudo adduser vnc
$ su vnc
$ vncpasswd
$ exit   # exit from vnc user

$ vim /etc/sysconfig/vncservers
uncomment last two lines, put user vnc, remove -localhost
# VNCSERVERS="2:vnc"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp"

In the above section, you can set up multiple users for connection. Say you had three users that needed access using different resolutions. To accomplish this, you could enter something like:
VNCSERVERS="1:vncuser1 2:vncuser2 3:vncuser3"
VNCSERVERARGS[1]="-geometry 640x480"
VNCSERVERARGS[2]="-geometry 800x600"
VNCSERVERARGS[3]="-geometry 1600x1200"


Firewall rule for VNC access:
sudo vim /etc/sysconfig/iptables        # add following line
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
sudo service iptables restart

$ sudo service vncserver start

$ sudo chkconfig vncserver on
$ chkconfig --list | grep vncserver
vncserver       0:off   1:off   2:on    3:on    4:on    5:on    6:off



















Comments