pipresents-gapless
pipresents-gapless copied to clipboard
How to start the show by clicking on a link on a locally stored webpage?
This may be a silly question but I can't find any info how to start the show by simply clicking on a link on locally hosted website? I am trying with PHP with "echo shell_exec('python /home/pi/pipresents/pipresents.py -p Art -f -b') to no avail. The above show is working flawlessly when I type this command straight into the terminal but I need to trigger it via a html link or a button. Thank you!
You may need to specify the complete path of the profile and python e.g.
/usr/bin/python /home/pi/pipresents/pipresents.py -o /home/pi -p myprofile
See Section 6.6 of the manual where autostart has a similar solution
Thanks for getting back to me! Your suggestion did not affect anything. After playing with permissions and assigning www-data user to Video group the script is now returning "Pi Presents must be run from the Desktop" message. Does it mean the slideshow can not be started by clicking a link on a locally stored webpage?
pp_manager is using the ps -A -o cmd command to see whether there is a copy of PP running to update its status.The running copy does not have to be started by pp_manager. It looks like there is a copy of pipresents running that has been started without specifying the -p option. PP_manager is not forgiving in this area. If you start the Task Manager from Accessories>Task Manager and select the View Full Command Line option you will see what commands are currently being executed.
Thanks for getting back to me! Your suggestion did not affect anything. After playing with permissions and assigning www-data user to Video group the script is now returning "Pi Presents must be run from the Desktop" message. Does it mean the slideshow can not be started by clicking a link on a locally stored webpage?
This message is the result of
if "DESKTOP_SESSION" not in os.environ:
pp_manager.py can do it and is running a web server which is a part of Remi so it can be done. Look at pp_manager.py line 1406 to see how it is done. I suspect its a php thing.