hdtv101
Posts: 67
Joined: Sun May 01, 2016 9:26 pm

/boot/config.txt = DOS autoexec.bat ?

Tue Apr 13, 2021 6:29 pm

Is /boot/config.txt the place to add things to startup and I assume a startup can be automated to load files from the network and then run them?

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

Re: /boot/config.txt = DOS autoexec.bat ?

Tue Apr 13, 2021 6:47 pm

hdtv101 wrote:
Tue Apr 13, 2021 6:29 pm
Is /boot/config.txt the place to add things to startup and I assume a startup can be automated to load files from the network and then run them?

" I assume a startup can be automated to load files from the network and then run them?"

Yes.


"Is /boot/config.txt the place to add things to startup "

In general, No.




These options have been documented by another Forum user -
viewtopic.php?f=66&t=294014

klricks
Posts: 7738
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: /boot/config.txt = DOS autoexec.bat ?

Tue Apr 13, 2021 6:50 pm

hdtv101 wrote:
Tue Apr 13, 2021 6:29 pm
Is /boot/config.txt the place to add things to startup and I assume a startup can be automated to load files from the network and then run them?
No you can't use config.txt to run random commands or programs.
If you are booting to desktop then autostart can be used: viewtopic.php?f=66&t=294014
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

User avatar
thagrol
Posts: 4733
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: /boot/config.txt = DOS autoexec.bat ?

Tue Apr 13, 2021 6:55 pm

hdtv101 wrote:
Tue Apr 13, 2021 6:29 pm
Is /boot/config.txt the place to add things to startup and I assume a startup can be automated to load files from the network and then run them?
Not really.

Config.txt just configures the hardware and things like which cmdline.txt to run.

Where you run stuff at start up depends a lot on what that stuff is.

For stuff that needs the desktop use the aforementioned autostart.

For stuff that doesn't, use systemd, cron, or rc.local if you want it at boot up, ~/.profile or ~/.bashrc if you want it at login (be careful here these run at every login not just the first one after boot).

For access to network shares use /etc/fstab to mount them during boot. There's a handy guide here: viewtopic.php?f=91&t=302752
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

W. H. Heydt
Posts: 14655
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: /boot/config.txt = DOS autoexec.bat ?

Tue Apr 13, 2021 8:56 pm

hdtv101 wrote:
Tue Apr 13, 2021 6:29 pm
Is /boot/config.txt the place to add things to startup and I assume a startup can be automated to load files from the network and then run them?
/boot/config.txt is for setting parameters and optional module loads for the operating system.

GlowInTheDark
Posts: 1620
Joined: Sat Nov 09, 2019 12:14 pm

Re: /boot/config.txt = DOS autoexec.bat ?

Tue Apr 13, 2021 9:22 pm

If you had to make a DOS analogy, it would be much closer to correct to say that config.txt is like config.sys.

Note that config.sys (in DOS) doesn't really contain executables (although, in later versions of DOS, it sort of did). It's more like directives and setting parameters. As is the case with the Pi's config.txt.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

Loves Linux; loves to dance.

Return to “Beginners”