breaking news

How to Install VNC Server on Linux

April 5th, 2016 | by Shree H. Niraula
How to Install VNC Server on Linux

#To run the VNC Server on CentOS, we have to install these required packages:

sudo yum groupinstall Desktop
sudo yum install tigervnc-server

#To start VNC Server on boot
sudo chkconfig vncserver on

#To setup users’ VNC password:

#Edit the /etc/sysconfig/vncservers file:
sudo nano /etc/sysconfig/vncservers

#Add the following to the end of the file:
VNCSERVERARGS[1]=”-geometry 1024×600″

#The iptables rules need to be amended to open the VNC ports:
sudo iptables -I INPUT 5 -m state –state NEW -m tcp -p tcp -m multiport –dports 5901:5903,6001:6003 -j ACCEPT
sudo service iptables save
sudo service iptables restart

#Restart the VNC Server:
sudo service vncserver restart

Share This