VNC server configuration on RHEL 6



Step 1

Installing  the VNC Server.
Download the following rpms and install/update them 
#rpm –ivh tigervnc-license-1.3.1-17.el6.noarch.rpm   
#rpm -Uvh libjpeg-6b-46.1.x86_64.rpm   
#rpm -Uvh libjpeg-turbo-1.2.1-1.el6.x86_64.rpm
#rpm -ivh tigervnc-server-minimal-1.3.1-17.el6.x86_64.rpm
#rpm -ivh tigervnc-server-1.3.1-17.el6.x86_64.rpm

Step 2

Edit the "/etc/sysconfig/vncservers" file to configure the required displays. The following entries enable VNC for display numbers ":2" and ":3". Notice multiple "display:user" pairs are defined on a single line, but the arguments for each display are defined separately.

vi  /etc/sysconfig/vncservers  

add the following lines
VNCSERVERS="2:root 3:oracle"
VNCSERVERARGS[2]="-geometry 1280x1024 -nolisten tcp -localhost"
VNCSERVERARGS[3]="-geometry 1280x1024"

Step 3

Set the VNC password for any users defined in the "/etc/sysconfig/vncservers" file.
# vncpasswd
Password:
Verify:
#
 
# su - oracle
$ vncpasswd
Password:
Verify:
$ exit
logout
# 


Step 4

Enable the "vncserver" service for autostart and start the service.

# chkconfig vncserver --list
vncserver       0:off   1:off   2:off   3:off   4:off   5:off   6:off
# chkconfig vncserver on
# chkconfig vncserver --list
vncserver       0:off   1:off   2:on    3:on    4:on    5:on    6:off
# service vncserver start

3 Comments

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post