> -----Original Message-----
> From: bohan [mailto:[EMAIL PROTECTED]]
> hi,
> i wonder if it is possible to fire up Xvnc servers via xinetd 
> when someone requests, not the rfbport, but the http port ?

Why?
If you want a webserver, there are better, leaner, nicer and for other
reasons easyer tools. The webserver in vnc, only serves files: the index.vnc
with updated parameters and the files for the java viewer, vncviewer.jar and
vncviewer.class. It does not need to serve more and I hope it is not capable
to do anything more.

If you want to use vnc, you like to have the vnc protocol there. If you like
to use the vnc-inetd configuration in a webserver: I did it as follows:
First setup vnc as on
http://www.sourcecodecorner.com/articles/vnc/linux.asp.
Then copy your .../vnc/classes/index.vnc to .../vnc/classes/vnc_800x600.
Edit this vnc_800x600 file so it is hardcoded to use the vncserver at 5951
(there is a port=... parameter, make that port=5951)

Now start a vncserver with the vncserver script. You must be able to see
your vncserver session at vncviewer machine:1 and at http://machine:5801.
Now go to http://machine:5801/vnc_800x600 and you should see a complete new
session as if on vncviewer machine:51.

And now the horror part: Do not, by no means reload the page!!! Don't browse
to an other page, Don 't even resize the browser window.... Every reload of
the page will start a new session in which you have to login and restart all
over. It's even worse: the old sessions have gone to the bitbucket, just
crashing all apps running in there.

The reason for this is the connection between the viewer and inetd: If the
browser reloads, the javaviewer restarts. Hence on the close of the old
javaviewer, the connection with inetd gets lost so inetd cleans the
connection and kills Xvnc, which in turn just crashes the apps.

> 
> in xinetd configuration, instead of:
> 
> {
>     ...
>     port = 5900
>     server_args = -inetd -httpd /usr/local/vnc/classes -httpport 5800
-query localhost
> }
> 
> which doesn't respond to http requests on port 5800 unless 
> someone requested the rfb port 5900 just before,
> i have tried to use:

You should not do that: if you have more sessions parallel, they fight all
for port 5800. Better have just 1 app at that port.

> 
> {
>     ...
>     port = 5800
>     server_args = :0 -rfbport 5900 -httpd /usr/local/vnc/classes -httpport
5800 -query localhost
> }
> 
> but it doesn't work

Thats because the way inetd works: It just hooks STDIO from the app to the
port. The -inetd parameter to Xvnc is there to say don't use the rfb port,
just use STDIO. Hence Xvnc does not know to which port it is hooked. You can
be sure it is NOT to the port you started with, it's a free range for inetd
to use.

btw: STDIO is short for stdin and stdout: keyboard and terminal for most
user programms.


CBee
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to