How can I start XServer in Linux through apache user triggered by Perl script running in background?
I am trying to launch MS Office through WINE using a Perl script hosted by apache
and and triggered by other application. I am getting the following error message in
log files "Application trying to create a window but no driver could not be loaded. Make sure that your X server is running and that $DISPLAY is set correctly".
If I run the script directly on shell prompt using root user then WINE starts
XServer properly and execute MS MSoffice in addition to that if I set xhost +local:apache on shell prompt then also it works fine.
How can I start the XServer from apache user?
It is an exceedingly bad idea to start a X server per httpd worker. If you insist on doing this though, use Xvfb.
My recommendation would be to have a separate daemon handle the document conversion/creation, and use a message queue to pass it jobs.