Jump to content

exec() open application for local user


m3bik

Recommended Posts

I'm working on a light use/kiosk system. I have apache2 and php5 installed on Ubuntu 10.04 and I have the browser open the localhost web page by default. I would like to include a link on this page to open oowriter (open office writer) for the end user on the machine.

 

I've tried

 

exec('oowriter');

 

with no luck. I've also tried setting the DISPLAY value before the command like

 

exec('DISPLAY=:0 oowriter');

 

with no success. I don't mind have the www-data user in the sudoers file if I have to sudo the command or something, but is this possible to do?? I'm not having any luck at all!

Link to comment
https://forums.phpfreaks.com/topic/252729-exec-open-application-for-local-user/
Share on other sites

Well I've verified that the error reporting is turned on, but I don't actually get any errors when loading the webpage..

 

I have tried adding the www-data to the video group with no luck. I've also tried adding the www-data user to the user group running on the desktop, but still nothing.

 

I do have success running "php ./myfile.php" in the command line. It does open the application on the local user's screen.. but for some reason when I access the page on the web, I get nothing :(

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.