
Modify the file so it looks like this: #twm &Ĭonnect with newly created user using centos:2, Where centos is my server name: Kill the vncserver session for new user and edit the xstartup file: su ali Restart the VNC service: sudo service vncserver restart Switch to the newly created user and run vncpasswd command for it: su aliĪdd these lines for new user: VNCSERVERS="1:arbab 2:ali" Now, download VNCViewer onto our desktop computer from which we want to access the shared desktop. Connect using ServerIP/Name:1 (:1 is for the VNC server window), In my case it is centos:1.Įnter the password that we created using the vncpasswd command:Ĭreate a local user, using the following command: sudo adduser aliĬreate a password for newly created user: sudo passwd ali Restart the service: sudo service vncserver restart vnc/xstartupĬomment the last line and run the Gnome: #twm & Now kill the VNC Server: vncserver -kill :1Įdit the xstartup file in .vnc directory: nano. Restart the VNC Server: sudo service vncserver restart

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 To start VNC Server on boot sudo chkconfig vncserver onĮdit the /etc/sysconfig/vncservers file: sudo nano /etc/sysconfig/vncserversĪdd the following to the end of the file: VNCSERVERS="1:arbab" To run the VNC Server on CentOS, we have to install these required packages: sudo yum groupinstall Desktop

VNC provides a lightweight virtual desktop than full blown version of Gnome. Actually there is a better way and that is to install VNC.
#Tigervnc server centos 6 full version#
When we install the minimal copy of CentOS Server, it only gives us the “Command Line” interface.īut some people prefer GUI instead and for this they install Full version of Gnome on CentOS.

VNC is a protocol that is used to share the desktop with other users/computers over the network/Internet.In order to share a desktop, VNC server must be install and configure on the computer and VNC client must be run on the computer that will access the shared desktop.
