Fauveboy
Posts: 82
Joined: Sun Jan 26, 2014 8:09 pm

Launching a script/application on boot?

Sat Feb 22, 2014 9:56 pm

I was looking for a way to launch scripts or applications when the raspberry pi boots i.e pure data -nogui flag patches. Is there a place I can go online to learn how to do this or is it simple enough to be explained here online?

Thank you for reading

gandar
Posts: 215
Joined: Sat Feb 01, 2014 5:45 pm

Re: Launching a script/application on boot?

Sat Feb 22, 2014 10:12 pm

+1. I am equally interested in this.

Looking forward to a reply.

Bazzer
Posts: 9
Joined: Sun Jan 05, 2014 11:13 am

Re: Launching a script/application on boot?

Sat Feb 22, 2014 10:19 pm

I think you want to look at init.d and rc scripts.

Google is probably you best friend to find something like:
http://www.ghacks.net/2009/04/04/get-to ... directory/

Also have a look what you already have under /etc/ and /etc/rc*

Is this the sort of thing you are after?

EL3PHANTEN
Posts: 7
Joined: Sun Feb 23, 2014 3:21 pm

Re: Launching a script/application on boot?

Sun Feb 23, 2014 3:48 pm

make your script executable

$ nano /storage/.config/autostart.sh

add this
#!/bin/sh
python /yourDirectory/yourscript.py

Fauveboy
Posts: 82
Joined: Sun Jan 26, 2014 8:09 pm

Re: Launching a script/application on boot?

Sun Feb 23, 2014 5:01 pm

Thank you,
so the screen looks a bit like this from what Im also learning from this video http://www.youtube.com/watch?v=4bFgB1XTQXI. at the moment when the pi loads it goes straight to the desktop gui and to open the application i need (Pure Data) I just type pd into the terminal. Is it as simple as that in the rc.local directory ? just type the letters pd at the bottom?

Return to “Python”