Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 39740 invoked by uid 500); 6 Mar 2003 19:29:21 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 39674 invoked from network); 6 Mar 2003 19:29:17 -0000 Received: from host067-234.kpn-gprs.nl (HELO mobile.webweaving.org) (62.133.67.234) by daedalus.apache.org with SMTP; 6 Mar 2003 19:29:17 -0000 Received: from localhost (localhost [127.0.0.1]) by mobile.webweaving.org (8.12.7/8.12.2) with ESMTP id h26J2YMX000773 for ; Thu, 6 Mar 2003 20:02:34 +0100 (CET) Date: Thu, 6 Mar 2003 20:02:34 +0100 (CET) From: Dirk-Willem van Gulik To: users@httpd.apache.org In-Reply-To: <3E664B13.4040605@recognia.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] Launching X-Server based apps On Wed, 5 Mar 2003, Shawn W. Devlin wrote: > 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. > > 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. .. > Does anyone know of a way to launch X based apps from a cgi? You will need to set up the DISPLAY variable in your script. Then you will need to allow the user which runs as apache access to the screen you specify in the DISPLAY variable. Do a 'man xhost' to see some info on this (though there are several other methods). If you want the screen used by your cgi to be 'private' to apache - you may want to use a virtual screen buffer, like Xvfb - which do not run against the normal vga/screen card - but simply run 'headless'. Typical settings are DISPLAY=:0.0 for your normal screen and DISPLAY=:1.0 for a Xvfb attached to screen 1. Dw --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org