Do you know which technique?Yes, but you need to use one of the techniques from the ... the sticky pdf on 'a beginners guide to running a program at start up' and 'can't make head nor tail of it' .Is it possible to just plug the Pi into 5v and have the file run so the unicorn hat shows the tree?
I assume I need 'basic usage, section 4.2.3, but /etc/rc.local doesn't exist so I need section 4.2.5?
If I try to put something in /etc as I think it is saying (use a text editor to build a file called rc.local and put it in /etc) it tells me /etc is a read only document and won't save there.
I must be doing something wrong but apart from the incorrect English, see line one of 4.2.5 for one example 'you will need to do this a root or with sudo.'
Yeah, yeah there's a typo. "a" should be "as". But it's grammatically correct otherwise. Don't ask for a correction as that won't happen (see EOLing My Guides)
Linux is inherently multi user and much more secure than windows. Because of this certain directories and files cannot be written to (some cannot be read either) without what Windows calls Admin rights. Your normal user doesn't have those rights (and should not). root is the Linux admin/super user.
To get root/superuser rights you either:
- Login as root. Not possible as by default root has no password and password logins for root are not permitted over ssh anyway.*
- Become root by running either sudo su or sudo -i
- Run a single command by prefixing it with sudo e.g. sudo nano /etc/rc.local
So, assuming what you want to run does not require the desktop, does not require the network, can be run by root, and you're happy using rc.local despite its disadvantages here's one way forward:
- Open a terminal
Code:
sudo nano /etc/rc.local- See 4.2.5 for a template and steps to take after saving it.
- See the rest of 4.2 for details on running your program. I strongly advise applying 4.2.4.2 as without it troubleshooting will be very difficult. If you program is designed to keep running in the background see 4.2.4.1
And please, before coming back saying "it doesn't work" see section 9.
*: Logins over ssh as root are possible once you have set up key based logins. But you need root rights to do that...
Statistics: Posted by thagrol — Thu Jul 10, 2025 11:31 pm