Score:0

how do i run a programs from boot on raspberry pi?

ng flag

I have an rgb led attached to my raspberry pi 4 for small "decoration". And you guessed it, I want a python script to run from boot until poweroff. On raspberry pi OS, we have /ect/rc.local file which a shell script which runs from boot, but on ubuntu I can't find that file. Do I have to create that file and use it as normal or do I need to do some other procedure? If the second option is correct, what is the procedure? I am using 21.10.

in flag
Is this a service that you want to run for as long as the Pi is running? Or is this something that you want to have run once (or at set intervals)? Could you [edit] your question to also include which version of Ubuntu you are running on the Pi? This will make it easier to offer a correct solution the first time
user135142 avatar
ng flag
@ArturMeinild , sort of, but is there a way to do that by editing a file? so that if the pi is gone and needs to be replaced, i just have to swap the sd card.
Terrance avatar
id flag
Were you really looking for `/ect/rc.local`? Or was that a typo? Looking on my system I have `/etc/rc.local` and not `/ect/rc.local`.
user135142 avatar
ng flag
@Terrance , a typo
user135142 avatar
ng flag
found the answer here - https://askubuntu.com/questions/9853/how-can-i-make-etc-rc-local-run-on-startup/9880#9880 .
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.