Xvnc Fedora setup howto

From Wsms

Jump to: navigation, search

How to set up an Xvnc server on Fedora Core 5.

see also: Xvnc_Fedora_setup_noauth

These are specific instructions for setting up a read-only vnc server so that people (students) can see what you (the teacher) are doing on your machine.

I found a paucity of specific documentation on this topic. After experimenting for a day or so, I'm saving my notes here so that others won't have to go through the same pain.--Ggeller 21:57, 26 October 2006 (PDT)

Contents

Server

On the server end, install vnc-server:

[root@arthur ~]# yum -y install vnc-server

Add the following to your /etc/X11/xorg.conf:

Section "Module"
    ...
    Load "vnc"
EndSection

Section "Screen"
        ...
        Option      "SecurityTypes" "VncAuth"
        Option      "UserPasswdVerifier" "VncAuth"
        Option      "PasswordFile" "/etc/vnc/passwd"
        Option      "rfbport" "5900"
        Option      "AlwaysShared"
        Option      "AcceptKeyEvents" "0"
        Option      "AcceptPointerEvents" "0"
        Option      "httpPort" "80"
        Option      "httpd" "/usr/share/vnc/classes/"
EndSection

The above assumes that you are not already running a http server on port 80. Just use a different value for httpPort if you already have apache or something running.

Create /etc/vnc and run vnspasswd:

[root@arthur ~]# cd /etc
[root@arthur etc]# mkdir vnc
[root@arthur etc]# cd vnc
[root@arthur vnc]# vncpasswd passwd
Password:
Verify:

Make sure ports 80 and 5900 are open for incomming connections. Logout of your X session and log back in to restart the X server.

Client

There are many different clients available. I tested a java applet using Firefox and the vncviewer application.

using a browser

On the client system, open a java-enabled browser and point it to the IP for your server:
Image:20061026-010-vbc.png
Note that arthur is a machine on my local network that is defined in my /etc/hosts file.

Click OK and login with the vnc password you set on the server:
Image:20061026-020-vnc.png
Then you see the vnc viewer applet in all its glory showing the display from the server.
Image:20061026-030-vnc.png

using vncviewer

Install vncviewer:

[root@hayes ~]# yum -y install vnc

Run vncviewer:

[ggeller@hayes ~]$ vncviewer

VNC Viewer Free Edition 4.1.1 for X - built May 26 2006 06:14:57
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.

It pops open a dialog asking for a server. Type in the server name or IP address:
Image:20061026-040-vnc.png
Then it asks for the password:
Image:20061026-050-vnc.png
Finally, you get to see what the server is doing:
Image:20061026-060-vnc.png

notes

See https://twiki.cern.ch/twiki/bin/view/Main/IchiroVncX11 for more hints and information. There is some other documentation at http://www.realvnc.com/products/free/4.1/x0.html.

You can turn off authentication with:

Section "Screen"
  ...
  Option "SecurityTypes" "None"
EndSection

I set the color depth on the server to 8 bits (256 colors) because that is what the java vnc viewer seems to like. The vncviewer application is happy with other bit depths.

My complete /etc/Xll/xorg.conf is:

Section "ServerLayout"
        Identifier     "single head configuration"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        FontPath     "unix/:7100"
EndSection

Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "fbdevhw"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
        Load  "vnc"
        Load  "dri"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Sony Multiscan 17sf"
        HorizSync    31.0 - 64.0
        VertRefresh  50.0 - 120.0
        Option      "dpms"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        VendorName  "Videocard vendor"
        BoardName   "ATI Technologies Inc RS482 [Radeon Xpress 200]"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     8
        Option      "SecurityTypes" "VncAuth"
        Option      "UserPasswdVerifier" "VncAuth"
        Option      "PasswordFile" "/etc/vnc/passwd"
        Option      "rfbport" "5900"
        Option      "AlwaysShared"
        Option      "AcceptKeyEvents" "0"
        Option      "AcceptPointerEvents" "0"
        Option      "httpPort" "80"
        Option      "httpd" "/usr/share/vnc/classes/"
        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
                Modes    "800x600" "640x480"
        EndSubSection
EndSection

Section "DRI"
        Group        0
        Mode         0666
EndSection
Personal tools