httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Fellows <>
Subject Re: [users@httpd] Launching X-Server based apps
Date Wed, 05 Mar 2003 19:55:36 GMT
On Wed, 2003-03-05 at 14:08, Shawn W. Devlin wrote:
> Hello,
> I have a program that requires X that I need to launch from a cgi, not 
> as a cgi. The program crunches some data and generates some charts. It 
> runs without interacting with a user. I don't want the program's display 
> shown to the caller of the cgi script. The cgi script will launch the 
> app, wait for it to exit, then grab the output and send that back to the 
> user.

  Does this 'app' actually open a window on your display while running?

> When I initially set this up, the program would not run because it could 
> not attach to an X server. I used xhosts to grant the webserver 
> permission to access X. When I call the cgi script from the same box it 
> now works but it does not run when I call the cgi script from another 
> box. I believe this is because the other box has not been granted access 
> to X.

  Most likely you need to set the environment variable DISPLAY in the
  cgi script you use to invoke the app.

> I did a search and while I can find references to running X programs and 
> having the display show up on the caller's box, I can't seem to find any 
> reference to simply running an X based program from a cgi. I suppose I 
> could start an X session for each launch but that could get expensive 
> quickly.

  If it is actually openning a window on the display each time it is
  invoked, then I would be double-checking the man/info pages for
  headless operation options, or else looking for another application
  that could do the same job without needing to open a window.

> Does anyone know of a way to launch X based apps from a cgi?
Lee Fellows <>

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message