Autostart with the new Raspbian GUI

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:

http://www.raspberrypi-spy.co.uk/2014/05/how-to-autostart-apps-in-rasbian-lxde-desktop/#comment-108433

This entry was posted in Uncategorized. Bookmark the permalink.

5 Responses to Autostart with the new Raspbian GUI

  1. Bertrand says:

    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

  2. benlightmiller says:

    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.

    • KenT says:

      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.

      • benlightmiller says:

        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”.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s