VNC server
Install VNC on Centos 6
Before installing VNC server, make sure you have installed any Desktop environment.
Step 1 » Issue the below command to install gnome desktop environment.
[root@krizna ~]# yum groupinstall Desktop
Step 2 » After installing gnome packages .Issue the below command to install VNC package along with dependencies.
[root@krizna ~]# yum -y install tigervnc-server pixman pixman-devel libXfont
Step 3 » Create user name and password.
[root@krizna ~]# adduser user1
[root@krizna ~]# adduser user2
[root@krizna ~]# passwd user1
[root@krizna ~]# passwd user2
Step 4 » Create VNC passwords for the Users created.
[root@krizna ~]# su - user1
[user1@krizna ~]$ vncpasswd
Password:
Verify:
[user1@krizna ~]$ logout
[root@krizna ~]# su - user2
[user2@krizna ~]$ vncpasswd
Password:
Verify:
[user2@krizna ~]$ logout
Step 5 » Now open /etc/sysconfig/vncservers file and add the following lines at the end of the file( Edit as per your usernames ).
VNCSERVERS="1:user1 2:user2"
VNCSERVERARGS[1]="-geometry 640x480"
VNCSERVERARGS[2]="-geometry 800x600"
Here we have configured session 1 with 640×480 resolution for the user “user1″ and session 2 with 800×600 resolution for the user “user2″.
Step 6 » Start vnc service
[root@krizna ~]# service vncserver start
and issue this command to start vnc service automatically during startup.
[root@krizna ~]# chkconfig --levels 235 vncsever on
Step 7 » Now in remote machine, start vncviewer type the IP and session as below to view their respective sessions.
192.168.1.10:1 for user1
192.168.1.10:2 for user2
Users sessions.
Troubleshooting
» Check the iptables in the server, if you are not able to connect the sessions.
Issue the below command to stop iptables service.
[root@krizna ~]# service iptables stop
try again.
» you might receive the below error while starting the vnc service.
/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
/usr/bin/Xvnc: symbol lookup error: /usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
[FAILED]
Issue the below command to install pixman,pixman-devel and libXfont packages.
[root@krizna ~]# yum -y pixman pixman-devel libXfont
[or]
This command will update everything .
[root@krizna ~]# yum update
and restart the VNC service and try again.
Good luck