LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   php can launch openoffice? (http://www.linuxquestions.org/questions/programming-9/php-can-launch-openoffice-636808/)

tanoatlq 04-21-2008 12:21 PM

php can launch openoffice?
 
Hello,
I run openoffice impress on a linux box to run as a kiosk that
display slideshows in a loop. This on a remote machine managed
via apache-php from a windows client that upload (previous post)
a PowerPoint file that should replace that is currently displayed.
How can I make this? The system() function in php
cannot launch openoffice, so? There is a way to make openoffice
reopen the same file to change presentation or should I kill it
and how to restart it from a php script? I try with the -display
option but it does not work..

graemef 04-21-2008 05:43 PM

not certain by what you mean by system() cannot launch openoffice. The system function just issues a command on the OS so maybe the command that you gave was not quite correct. Another less likely thought is that the linux box is set up so that the user that runs the php script doesn't have the permissions to run open office.

If you google with php and open office then you will get quite a lot of options to follow.

PB0711 04-21-2008 09:08 PM

I believe doing this would be quite difficult as OO doesn't lend itself to command line options too well. I would first play with the command line and get it to open the presentation you want.
It should be something like
Code:

ooimpress /full/PATH/to_your_presentation_file
once that works then I would try the rest ie getting it to run the slide show automatically. Again as 'graemef' said 'system()' should work! All it does is to issue the command.
One more thing check that OO is in your $PATH directory for the user who is going to run OO !

tanoatlq 04-22-2008 01:16 PM

it seems that using a shell script together with sudo and xhost
the problem could be solved. :-)


All times are GMT -5. The time now is 04:59 PM.