
1. Download and install CMU Common Lisp from 
   http://www.cons.org/cmucl/download.html

2. Adjust the Makefile.  Change 
	
   "CMUCL=lisp" to reflect the command, you use to invoke CMUCL.

3. Attempt to compile the forwarder:

   $ make

4. Test the forwarder 

   $ forwarder.sh 4567 5905
   ; Loading #p"/raid/home/helmut/vnc/lisp/forwarder.x86f".
   accepting connection on port: 4567
   ; type C-c to interrupt the forwarder
   C-c
   Interrupted at #x4011723E.
   
   Restarts:
     0: [CONTINUE] Return from BREAK.
     1: [ABORT   ] Skip remaining initializations.
   
   Debug  (type H for help)
   
   ("Foreign function call land")
   0] quit

The forwarder.sh scripts takes two port numbers as arguments.  The
first argument, 4567 in the example, is the port of the forwarder.
The viewer connects to this port (the TUNNELPORT parameter of the
viewer).  The second argument, 5905, is the port of the VNC server
(usually a 59xx port).

5. To use the forwarder, start a VNC server

      $ vncserver :5

   Start the forwarder on the same machine

      $ forwarder.sh 4567 5905

   And start the viewer (at your option on a different machine)

      $ java -cp VncViewer.jar VncViewer HOST <vnc-host> PORT -1 TUNNELPORT 4567

   
If you want to use the forwarder behind an Apache, add these lines to
your httpd.conf:

  RewriteEngine on
  RewriteRule  ^/get-session-id-([0-9]+)$  http://%{HTTP_HOST}:$1/get-session-id  [P]
  RewriteRule  ^/vnc-session-([0-9]+)(.*)  http://%{HTTP_HOST}:$1/vnc-session$2  [P]

and set the USE_APACHE parameter to "Yes", e.g., 

  $ java -cp VncViewer.jar VncViewer HOST localhost PORT -1 TUNNELPORT 4567 USE_APACHE Yes

[This will only work if Apache runs on port 80 (hardwired portnumber).]
