MetaVNC server for Linux w/ XFree86 4.3
=======================================

This package includes two versions of VNC servers that are derived
from xf4vnc (http://xf4vnc.sourceforge.net);
- traditional Xvnc server
- vnc module for XFree86

Also, this package includes the following helper application to enable
MetaVNC specific features.
- window monitor


HOW TO BUILD
------------

1) extract this file

% tar xvfz metavnc-unix-<version>-src.tar.gz

2) change directory to metavnc-unix-<version>

% cd metavnc-unix-<version>

3) build libvncauth

% cd libvncauth
% xmkmf
% make
% cd ..
  (This step is necessary prior to step 4) and 5))

4) build windowmonitor

% cd windowmonitor
% xmkmf
% make
% cd ..

5) build Xserver

 5-1) standalone version (Xvnc)
   % cd xc
   % cd config/cf
   % cp host.def.Xvnc host.def
   % cd ../..
   % make World
   (Xvnc will be generated at programs/Xserver)

 5-2) module version (vnc.so)
   % cd xc
   % cd config/cf
   % cp host.def.module host.def
   % cd ../..
   % make World
   (vnc.so will be generated at exports/lib/modules)


HOW TO SET UP
-------------

1) Start Up VNC Server

Basically, this step is just the same as xf4vnc. If you prefer to use
Xvnc, just run vncserver script as traditional vnc servers. If you
prefer to use vnc.so, then you need to edit the
/etc/X11/XF86Config. Example of this file is included as
XF86Config.vnc. 

The following steps are necessary to modify your /etc/X11/XF86Config.

   1. Add the followings to the "ServerLayout" section.

        InputDevice    "vncMouse" "ExtraPointer"
        InputDevice    "vncKeyboard" "ExtraKeyboard"

   2. Add the followings to the "Module" section.

        Load  "vnc"

   3. Add the following sections.

Section "InputDevice"
        Identifier  "vncMouse"
        Driver      "rfbmouse"
EndSection

Section "InputDevice"
        Identifier  "vncKeyboard"
        Driver      "rfbkeyb"
EndSection

   4. Add the followings to the "Device" section.

        Option      "usevnc" "on"
        Option      "useraccept" "off"


2) Start Up windowmonitor

2-1) What is the windowmonitor

The windowmonitor acts two roles;
  1. a part of the meta window manager (need GNOME or KDE)
    - open application
    - minimize/maximize/restore/close windows
  2. a part of the clipboard feature (if using GNOME or KDE)
    - forward clipboard texts

NOTE: Since the current win32 viewer does not support the meta window
manager, you don't have to install the windowmonitor.  But it is still
useful to install the windowmonitor if you use the clipboard features.

The windowmonitor is implemented as a kind of vnc client. Usually you
need an authentication process. By specifying a vncpassword file using
a '-passwd' option, keyboard interaction can be omitted.

IMPORTANT: You have to run the windowmonitor as a X client of the X
server provided by the metavnc server.

2-1) Prepare launcher.xml

Currently, you have to prepare the launcher config file (lancher.xml)
to expose the program menu.

The following is an example of launcher.xml;

  <?xml version="1.0" encoding="UTF-8"?>

  <menu>
    <folder name="Internet">
      <launcher path="/usr/bin/mozilla" name="Mozilla Internet Browser" />
      <launcher path="/usr/bin/mozilla -mail" name="Mozilla E-mail" />
      <folder name="More Internet Programs">
        <launcher path="/usr/bin/konqueror" name="Konqueror" />
      </folder>
    </folder>
    <folder name="Game">
      <launcher path="/usr/bin/freecell" name="Free Cell" />
    </folder>
    <folder name="Office">
      <launcher path="/usr/bin/oowriter" name="Word Processor (Open Office)" />
      <launcher path="/usr/bin/oocalc" name="Spread Sheet" />
    </folder>
  </menu>

In the future, the windowmonitor should import the program menu from
window managers.

2-2) Auto-start the windowmonitor

Using the autostart feature of GNOME or KDE is a nice way to start the
windowmonitor.
The following is an example how to auto-start the windowmonitor on GNOME;

   1. Launch "Preferences" - "More Preferences" - "Sessions" from the start menu.
   2. Click the "Startup Programs" tab and add the command.
   3. The startup command should be "/usr/bin/windowmonitor -launcher ~/.vnc/launcher.xml", or whatsoever.

The following is an example how to auto-start the windowmonitor on KDE;

   1. Create a startup script to launch the window monitor. For example, "/usr/bin/windowmonitor -launcher ~/.vnc/launcher.xml".
   2. Put the script in ~/.kde/AutoStart/.
