Just had an email from Ben in snowy Munich pointing out that the Raspbian GUI update issued on 24/12/2014 has broken autostart.
Ben says, it seems the autostart directory name has changed to /home/pi/.config/lxsession/LXDE-pi/ from /home/pi/.config/lxsession/LXDE/
I came across this post, a comment of which, put me on track:
Hello Ken,
Firstable, I am really sorry to post something that might not concern pipresents directly, but after some researches over the web, I couldn’t get any clear answers, and thus decided to post my problem here. Well,
I’ve been working on a simple pipresent_show, involving GPIOs (buttons and leds connected to different Pins) to play videos and trigger led signal (used here just as a checkup). I embedded the launch command of my show in a simple python script, so that, once it is launched, I could “pkill” my pipresent_show using an extra button and return to the desktop. I chose to use the subprocess module, and “subprocess.Popen” function in my script. Finally, I trigger the pkill command line using a “callback” function.
This is where I get clueless (yes, cause I’m an amateur)
My script works perfectly when run from Thonny, or from a command line in LxTerminal. However, when I set an autostart file in my Lxsession/LXDE-pi , then my pipresents_show starts ok after the raspberry has finished booting to the desktop (Raspbian 9 Stretch, by the way), but my callback function is ignored as I press the designated button. All others GPIO (leds and video choice number) seem to work well. Am I missing something in my script, or does the autostart method seem to be incorrect ?
Thank you for all the great job you’ve done with Pipresents so far, I really hope the community keeps on expanding, and that PiPresents becomes a must-have 😉
Greetings from france
So I luckily solved my problem, when I changed the listening method of my GPIO input, (and then had to swap some codelines).
This page introduces 3 ways to perform this in section III-B-9.
https://deusyss.developpez.com/tutoriels/RaspberryPi/PythonEtLeGpio/
Originally, mine was the third example code and I opted for the second (a While True loop, instead of a Callback function). I feel great now 🙂
Thank you again for all of this.
Cheers
Hi Ken, I just did a fresh pi presents install on a brand new Raspberry Pi 2 B – and had another issue getting Pi Presents to autostart on power up.
Here is what I did to make it work: I am using a fresh install of NOOBS 1.3.12 (with the 3.18 Linux Kernel). I created the lxsession/LXDE-pi/ directories under /home/pi/.config/ then I created the autostart file in the LXDE-pi directory with the line:
python /home/pi/pipresents/pipresents.py -p myshowname -f
and ran: $ chmod +x /home/pi/.config/lxsession/LXDE-pi/autostart
Note that if i added a “sudo” at the start of the line pi presents was not able to find the show profile.
I hope this helps others.
If you use sudo then you have to use the -o command line option to specify the full path of the pp_home.
How does Pi Presents run on Pi2. Not sure whether to expect a small (*1.3 or large (*6) speed-up for starting videos and loading large images.
Thanks Ken, I must have missed the -o option! I’ll try to do a proper comparison test when I have a minute – for now I can say that Pi Presents runs great on a Pi2 – the whole system feels much “snappier”.