|
#1
| |||
| |||
| I'm trying to use a Mac Mini as a Digital Signage display driver, and also as a controller for the display. I'm using Python and a Keyspan USB Serial adapter driven by PHP scripts to control the display, and all that is working really well. What I can't seem to figure out is how to get the GUI to open a PowerPoint Slideshow in the GUI via PHP. I'm running Apache as the logged in GUI user, I can do an "open powerpoint.pps" in the shell and that works, but the same command in PHP ( exec("open powerpoint.pps") ) does not work. Maybe I can get automator to watch a folder or file, and when the file timestamp changes, provoke the action? Then a new file upload, or an exec command that copies and rewrites the existing file should do it. But, does anyone know a better way than that, maybe how to get a PHP script to directly provoke some action in the logged in GUI user? Thanks, |
|
#2
| ||||
| ||||
| Possible This actually should be possible, provided 1. You wrap the open command in a shell script 2. httpd has execute permission for the shell script 3. httpd has read permission for the document, including the entire path to the document For instance, if you write a shell script at /tmp/open.sh that looks like this: Code: #!/bin/sh /usr/bin/open /tmp/my-presentation.pps Code: <?php
exec("/tmp/open.sh");
?>
__________________ Matt (billbaloney) 1.67GHz "October 2005" G4 Aluminum 1.5 GB RAM, OS 10.5.2 Lots of other things around Helen Marie Holford Industries Last edited by billbaloney; March 13th, 2007 at 02:26 PM. Reason: Code markup change for readability |