October 9, 2010

Installing TightVNC 1.3.10 on Linux

This post describes how to install and configure TightVNC 1.3.10 on Oracle Enterprise Linux or Red Hat Linux.

TightVNC is a free remote control software package, giving you full remote access to your Linux desktop. It is free and very network efficient. For more information, check out http://www.TightVNC.com.


Installing TightVNC 1.3.10 on Linux

1. Download the latest source files from SourceForge from http://sourceforge.net/projects/vnc-tight/files/
For example, navigate TightVNC-unix --> 1.3.10 --> tightvnc-1.3.10_unixsrc.tar.gz
2. Execute the following commands to install the software:
gtar -xvf tightvnc-1.3.10_unixsrc.tar
cd vnc_unixsrc

xmkmf
make World
cd Xvnc
./configure
make
cd ..
./vncinstall /usr/local/bin /usr/local/man
3. Set a VNC password. This will be used required by your VNC client when connecting.
vncpasswd
4. If installing on OEL 5 or RHEL 5, perform the following additional steps to resolve a minor font issue:
mkdir -p /usr/X11R6/lib/X11/fonts
cd /usr/X11R6/lib/X11/fonts
ln -s /usr/share/X11/fonts/100dpi 100dpi
ln -s /usr/share/X11/fonts/75dpi 75dpi
ln -s /usr/share/X11/fonts/misc misc
ln -s /usr/share/X11/fonts/Type1 Type1
ln -s /usr/share/X11/fonts/util
Startup/Shutdown/Status
Startup:         /usr/bin/vncserver
Stop:            /usr/bin/vncserver -kill :1
Status:          ps -ef | grep Xvnc
If you run into startup issues, try removing the lock files:
rm -rf /tmp/.X11-unix
rm -f /tmp/.X5-lock
Modify Desktop

If you want to modify the VNC desktop and use a different desktop manager, edit /root/.vnc/xstartup and use one of the following settings:
twm &                                 <-- Tab Window Manager, which is the default
startkde &                        <-- KDE
exec gnome-session &    <-- Gnome (my preferred desktop)
Changing the Port Number

The default port is 1.You may or may not want to change that. Simply add the following line to the end of your /root/.vnc/xstartup file, and restart. Note that the example below sets the VNC port to 7777, as we are defaulting our display to 1.
$vncPort = 7776 + $displayNumber;
Connecting with a VNC Client

My preferred client is "TightVNC Viewer", which can be downloaded from http://www.tightvnc.com/download.php

1. Download and install TightVNC Viewer (currently http://www.tightvnc.com/download/2.0.2/tightvnc-2.0.2-src-wviewer.zip)

2. Simply enter the IP address or hostname of your server, followed by the VNC port number.

3. Enter the VNC password when prompted.

4. That's it!

Monitoring Logs

Make sure to occasionally monitor the /root/.vnc/<hostname>:1.log file, as it grows out of control.

6 comments:

  1. Excellent post and very informative as well. Your knowledge appears very well on this topic and the way you have explained it, any new person can understand it easily. I would like you to keep writing like this and share your information with us.
    fabric sourcing company
    global sourcing in the textile and apparel industry

    ReplyDelete