
1. Try to compile the forwarder:

   $ make

2. Test the forwarder 
  
   $ make test
   java Forwarder 4567 5902
   ; Accepting connections on port: 4567
   C-c to abort
   make: *** [test] Error 130

The forwarder 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).

3. To use the forwarder, start a VNC server

      $ vncserver :5

   Start the forwarder on the same machine

      $ java Forwarder 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).]
