Tuesday, 27 April 2010

How To Install and Configure VNC Server on Linux (Fedora 12)

1. Run the the following command to install VNC Server.
    # yum install vnc-server
 It will most likely install tigervnc-server and that will also work for this tutorial.

2. Configure VNC Server by editing the /etc/sysconfig/vncservers file as the root user using 'vi', 'nano', or the 'gedit' editor.

     VNCSERVERS="1:data 2:picard 3:mujahid"
     VNCSERVERARGS[1]="-geometry 1280x720 -depth 16"
     VNCSERVERARGS[2]="-geometry 1024x768 -depth 16"
     VNCSERVERARGS[3]="-geometry 800x600 -depth 8"

VNC Server uses the port 5900+N for each instances. For example, for the user 'data', the port would be 5901 and for 'picard' 5902. The rest of the configuration lines define the resolution and color depth for the remote desktop.

3. Login to linux as the user you want to setup vnc instance for and type the following command to set a password for the user (eg: mujahid).
   # vncpasswd
This password would be saved in /home/mujahid/.vnc/passwd file.

4. Start the VNC-SERVER
    # service vncserver start

5. Enable VNC Server to start on boot and on all run levels
    # chkconfig vncserver on

6. Make sure you open ports 5900 and 5900+N (eg: 5903) in your fedora firewall or otherwise fedora won't let you log on.

Checkout => Setup VNC Server in Fedora by George Notaras for more user configuration.

No comments: