Notes on VNC server and client setup...

VNC server setup:

  1. Install the vncserver if not installed already on the server-side.
    # up2date -i vncserver
    
  2. Set a password for the VNC server. To do this, log in as a normal user and run the command `vncpasswd` from a shell prompt.
    # su - <user1>
    $ vncpasswd
    
    Note: The VNC service will not start unless you have set a password.
  3. Edit the "/etc/sysconfig/vncservers" file as below replacing the user values with the actual usernames.
    VNCSERVERS="1:<user1> 2:<user2>"
    
    # user1's VNC options
    VNCSERVERARGS[1]="-geometry 1024x768"
    
    # user2's VNC options
    VNCSERVERARGS[2]="-geometry 1280x1024"
    
  4. The default desktop session in VNC is a very simple one, using the twm window manager. Edit the file "/home/username/.vnc/xstartup" and remove the "#" from the beginning of the two lines that follow the line reading, "Uncomment the following two lines for normal desktop".
  5. To start all VNC persistent desktops at boot, enable the VNC service.
    # chkconfig vncserver on
    
  6. Start the VNC server.
    # service vncserver start
    
  7. Open up the firewall ports - 5901 and 5902 on the server for clients to connect to.

    VNC connections use TCP ports numbering from 5900, one for each display number, so for display 5 the TCP port would be 5905. Also, Java VNC viewers use ports numbering from 5800, again one for each display number.

VNC client setup:

  1. Install vnc viewer on the client side if not installed already.
    # up2date -i vnc
    
  2. The VNC server is identified by a hostname (or IP address) and a display number for the user as setup in the "/etc/sysconfig/vncservers" file.
  3. Connect to the VNC server via:
    $ vncviewer [options] [hostname][:display#]
    
  4. It will then prompt for the vncpasswd as set up earlier for the corresponding user.
  5. `man vncviewer` for options and other details on using "-via" for securing connections.

Related Reading:

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
SIMPLE EASY TO UNDERSTAND, STEP BY STEP!

CONGRATULATIONS! THANK YOU! I was having considerable difficulty and your instructions were fantastic! Thank you! I am looking forward to reading the information on the VNC with SSH.

Igafa.

Comment