User avatar
jacks909
Posts: 13
Joined: Tue Jan 27, 2015 3:35 pm

Raspberry pi 2 model B autolaunch python script

Fri Feb 13, 2015 11:58 am

I am unable to launch python scripts automatically from raspbian GUI for the pi 2 model B .

For the raspberry pi 1 i used to configure the autostart file of the LXDE desktop using the command

Code: Select all

sudo nano /etc/xdg/lxsession/LXDE/autostart
This method doesn't seem to work anymore on the Raspberry pi 2 model B.

Help from anyone who has successfully launched a python script from LXDE desktop for the Raspberry pi 2 model B would be very much appreciated.

Thanks guys

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Raspberry pi 2 model B autolaunch python script

Fri Feb 13, 2015 12:15 pm

I think this might be a side-effect of the new lxde GUI as of Christmas 2014, rather than an issue with the Pi2B? (But if you've just installed a new version of Raspbian to support the Pi2B maybe this is the first time you've seen the new gui?)

I haven't checked, but what happens if you create/modify the autostart file in the profile /etc/xdg/lxsession/LXDE-pi instead?

User avatar
jacks909
Posts: 13
Joined: Tue Jan 27, 2015 3:35 pm

Re: Raspberry pi 2 model B autolaunch python script

Fri Feb 13, 2015 12:35 pm

B.Goode , youre a genius buddy . That worked!! . I didnt know that there were two autostart folders. Thanks a ton!

PS: it was the latest raspbian available.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Raspberry pi 2 model B autolaunch python script

Fri Feb 13, 2015 1:00 pm

jacks909 wrote:B.Goode , youre a genius buddy . That worked!! .
Got it in one! << blushes modestly >>
I didnt know that there were two autostart folders. Thanks a ton!

PS: it was the latest raspbian available.
Quite so!

In previous (ie. prior to Dec 2014) releases of Raspbian there was only one profile at /etc/xdg/lxsession/LXDE.

I deduce - but can't refer you to documentation - that the /etc/xdg/lxsession/LXDE-pi profile was introduced in the Dec 2014 release as a way of implementing the revised ('start' at the top left and no icons) gui for lxde, whose introduction is discussed here: http://www.raspberrypi.org/changes-to-t ... interface/

Return to “Beginners”