using wine from a cgi

Shachar Shemesh wine-devel at shemesh.biz
Tue Mar 2 07:27:40 CST 2004


Fabian Cenedese wrote:

>>       I have apache on redhat linux & the latest version of wine.  I'd like to make a perl cgi script that uses a windows program to do some processing for a web page.  The script does what it is supposed to do (wine starts & the windows program runs AOK)  when run from the command line as root, but when it runs under user apache from a www request, I don't think wine even starts.  I have a feeling that it is because user apache does not have a home directory for wine to put its .wine directory - but I don't know how to fix that.
>>       Has anyone succeeded in getting a perl script called by a cgi request to apache to run a windows program under wine?  If so, how?  Does anyone know that it is impossible?
>>    
>>
>
>You can try installing wine as the user with which it will run later. As wine
>simulates a Windows environment it needs a registry (with some default keys)
>and a configuration where the "Windows drives" are configured. This will
>be done in the installation but only for the current user. So you need smthing
>like sudo apache ./tools/wineinstall or so.
>
>bye  Fabi
>
>  
>
Also, it will probably be a good idea to run the wineserver in a way 
that will not shut it down when the last wine exec ends. As CGIs come 
and go all the time, if you have to start the wineserver over and over, 
you will be wasting time.

The command line is "wineserver -p"

             Shachar

-- 
Shachar Shemesh
Lingnu Open Systems Consulting
http://www.lingnu.com/




More information about the wine-users mailing list