in reply to Nobody runs programs?

It's not a question of nobody being able to execute StarOffice. The cannot open display error means that when you run the StarOffice macro, it tries to open up a window in XFree. The X session you see on your desktop is owned by your user. However, nobody does not (and should never) have an X session running, nor the permission to start one. What's the point in an X GUI from a CGI script? If you absolutely must have the functionality you describe from a CGI script, you can set $ENV{DISPLAY} in your script appropriately (probably to ":0"), and then play around with the xhosts command from your X session, although this may not even work, I have not messed around extensively with xhost. If it does end up working, you will probably get a window to pop up on your desktop every time someone hits your CGI script. Is this really what you want?

blokhead

Replies are listed 'Best First'.
Re: Re: Nobody runs programs?
by heezy (Monk) on Oct 23, 2002 at 17:56 UTC

    No way! I don't want a window popping up on my screen each time someone submits a file for processing!

    There must be a way to make Star Office think it has access to a GUI but then supress anything the GUI does (StarOffice will not output anything from the macro)

    I'll explain a bit about what this is for...

    User selects a tar file of Star Office files to upload for processing +from a HTML form... || \ / \/ ... these are validated by a Perl CGI script and then placed in a dire +ctory on the web server for conversion... || \ / \/ ... the CGI script performs a system call to the star office macro to +convert all files in this directory... || \ / \/ ... the star office macro creates .html and .pdf output from these fil +es... || \ / \/ ... files are uploaded to website in the new (correct) file format.

    This "PERL->Macro" stage is the only part the doesn't work!!

    Thanks for everyones help so far but I'm still stuck!

    M

      So, when you run it from your terminal window, is StarOffice actually doing anything (popping up windows, logo, etc)??

      What happens if you're at a non-X console and try to run it (eg, kill X and try it just from the command line)??

      If it's not popping anything up in X, it Star Office may just be looking for the display variable to be set as a prerequisite (eg, it *thinks* it's going to be displaying something, but the macro really doesn't display anything at all). In that case, you may be able to get away with xvfb, the X virtual frame buffer. It basically creates a dummy xserver listening on whatever display you tell it to. Then, you can specify a display variable as posted above, and let it do it's thing, without having to keep a regular X session open all the time for nothing.

      Disclaimer: I haven't really played with xvfb myself, I have no idea how much memory it takes, it's limitations, etc.

        Star Office produces absolutly no graphical output at all when you run a macro from the command line, no windows, no logo nothing. (which of course is a very good thing)

        xvbf Sounds good I'll look into it, if anyone has any experience with it, guides on how to/not to use it, URLs etc.. I would be greatful for them.

        Thanks

        M