how to: Autorun a python script when a raspberry pi boots - the easy way!(not using cron)

preview_player
Показать описание
In this video i show you how you can autorun a python script when the raspberry pi boots and logs in. This method is way easier than the other alternative which is cron.

added later: make sure to add an & at the end of the line an it will run your script and boot.
Рекомендации по теме
Комментарии
Автор

No offense but you should probably warn people that this is what the code will do during the video, I personally do not read the description of a video before I watch it

grahamloy
Автор

Thanks, I love it when someone can help with exactly what you want to do.

michielhorn
Автор

Thanks, that's really the best tutorial on this topic !!! It works amazing!

evbrobocup
Автор

hey thanks for sharing man, yours is the easiest and fastest, though I need to specify it's python 3 for Raspberry Pi.

henryzhong
Автор

holy shit this worked. thank you! I've been trying to find a way to do this for several days now.

Smomid
Автор

Doesn't work with my raspberry pi 0w. Maybe because its not python3? it boots ok (I am on the pi not through some socket) but won't run. I tried putting the same script in the .bashrc file and it doesn't work either although if I then launch a command window it runs immediately so the script is being read ok but its not running on reboot.

tonyrjohnsong
Автор

Well, here’s another stuck one for the list... stuck in service mode... can’t seem to get in through terminal either. I’m a beginner, so this is quite a challenge and learning experience...

wclintdavis
Автор

I had added two symbols #&&" and now I can not log into desktop!

AndrazSpan-strojevodja
Автор

I added the "&" at the end of the line and now my raspberry pi won't boot into the desktop.

Brandon_
Автор

Hey, everything worked perfectly fine. However, when I run the script the script comes smaller than my screen. I use 5 inch screen and when i boot the pi up it does not fill the whole screen. Do you have any idea on how to fill up the screen soon as it boots up?

kyungbaekim
Автор

Mine did nothing I added the "&" still nothing

rickbrown
Автор

i already tried my file in thermo.py n run sudo reboot but cannot open the raspbianOS? just blank... why?

faizaqil
Автор

Thanks, my script perfectly runs on reboot! My only problem now is I can't seem to stop the script and raspberry pi terminal is gone....any ideas?

spartakum
Автор

My pi is now asking for a password to login but the default password 'raspberry' doesn't work, how can I get back in?

oliverwootton
Автор

after I did this, the raspberry didn t boot anymore, I couldn t even not log in via putty. Is there any possibility to undo this?

Partypol
Автор

Well, now my pi won't run either. Great advice bro. Any idea on how to get me back up and running?

philsherman
Автор

If you dont want to log in you can set it to auto login

GeorgeInAShed