VNC Server Installation and Conguration on Red Hat Enterprise Linux 5
Ahmet Emre Alada 12.07.2008
1 Installation
Check if you have the vnc-server package already installed:
rpm -q vnc-server
If not, download the package from rpmnd.net and install it by double clicking on it.
2 Conguration
2.1 Opening the Ports
VNC Server requires 5000-5999 ports to be opened on the rewall. To open these ports, 1. Click on System->Administration->Security Level and Firewall. 2. Click on "Other ports" below. 3. Click "Add" button. 4. Enter 5000-5999 to the "Port(s)" box. 5. Click OK. 6. Click Apply.
2.2 Enabling Remote Visual Access
Open the le /root/.vnc/xstartup with a text editor and uncomment the following lines:
#unset SESSION_MANAGER #exec /etc/X11/xinit/xinitrc
2.3 Starting VNC Server Listener at Startup
If the /root/.vnc/xstartup le is still open, append the following line to the le and save it:
vncserver :1
or alternatively, you can apply the following command in a root terminal:
echo vncserver :1 > > /root/.vnc/xtartup
Open the /etc/init.d/vncserver le with a text editor and add the users you want to activate the access to into VNCSERVERS parameter:
VNCSERVERS="1:root"
Then link this le to the init directory via:
ln -s /etc/init.d/vncserver /etc/rc3.d/S99vncserver
3 Starting the Server
3.1 Running the VNC Server
vncserver :1
This command will ask you to set an access password. You can later change this initial password with vncpasswd command.
3.2 Restarting the VNC Server
service vncserver restart
Note that this will terminate all the active listeners.
3.3 Accessing the Server
vncviewer :1
3.4 Dening Password
vncpasswd
3.5 Killing a VNC Session
vncserver -kill :1
4 More Resources
http://kbase.redhat.com/faq/FAQ_79_3976.shtm http://www.tightvnc.com/vncserver.1.html