Ans: Open the main config file and add all the users along with any of the id as shown below. So that the user will logon using that ID using vnc client.
# vi /etc/sysconfig/vncservers
VNCSERVERS="2:root 4:deepak "
Once done save the config file and assign a vnc password to each user manually by logging into their account
NOTE: Make sure you login to the users account for assigning them password or else the vncserver services would not run properly for all the users
# su - deepak
Password: [Give the password for VNC]
Verify: [Retype the password for VNC]
Restart the vncserver services
# service vncserver restart
Shutting down VNC server: 2:root 4:deepak [ OK ]
Starting VNC server: 2:root
New 'server.example.com:2 (root)' desktop is server.example.com:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/server.example.com:2.log
New 'server.example.com:4 (deepak)' desktop is server.example.com:4
Starting applications specified in /home/deepak/.vnc/xstartup
Log file is /home/deepak/.vnc/server.example.com:4.log
[ OK ]
Now you can login to the Linux machine using VNC viewer client using the below syntax
192.168.0.100:2 ==> for user root
192.168.0.100:4 ==> for user deepak
You can also login to the server using your browser. Type the following links for the same
http://server-ip:5802 ==> for user root
http://server-ip:5804 ==> for user deepak
NOTE: As you can see the port no. when you are trying to access your machine through the browser. It defines the ID of the user which you have assigned in the configuration file.
2:root - 5802
4:deepak - 5804
usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
You'll have to kill the Xvnc process manually
VNC configuration in Linux
Follow the below links for more tutorials:Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
How to configure Samba 4 Secondary Domain Controller
How to secure Apache web server in Linux using password (.htaccess)
How to register Red Hat Linux with RHN (Red Hat Network )
Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
15 tips to enhance security of your Linux machine
Why is Linux more secure than windows and any other OS
What is the difference between "su" and "su -" in Linux?
What is kernel-PAE in Linux?
What is swappiness and how do we change its value?
How to log iptables messages in different log file
What are the s and k scripts in the etc rcx.d directories
How to check all the currently running services in Linux
How to auto start service after reboot in Linux
What is virtual memory, paging and swap space?