invoking tcl/tk scripts from a browser

Georgios Petasis petasis "at" iit.demokritos.gr
Thu, 23 Aug 2001 12:07:10 +0000


On ??? 23 ??? 2001 01:13, you wrote:
> I have many tcl/tk scripts that I would like put on my webserver and invoke
> via a browser: netscape et al.
>
> I would like to do this with as few mods to the code and as transparently
> for the webuser as possible, possibly invoking the tcl/tk script from a cgi
> script. The problem of course is that there is no X DISPLAY for tcl/tk in
> this mode.
>
> Is VNC the right package to allow that to happen? Anybody done it?
> Suggestions? Problems?
>
> Thanks, Scott
>
Yes, VNC can be used for that.
Just have a vnc running constantly, and set the DISPLAY variable
in the cgi script, before wish is started (or use -display wish argument).
Also, in some systems a special x-server is available, called
framebuffer (i.e. linux). This is an x-server that is not associate
with a graphics card...

However, it sounds strange that you need to run a graphical
application from within cgi. You have to particurarly take care
that your tcl/tk script exits when the processing has been done.
This is not true by default for tk scripts: If windows are oppened,
wish does not exit after the computation finishes, but rather when the main
window (".") is destroyed or "exit" called...

George
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------