Page 1 of 1

Change Boot to CLI setting via script

Posted: Fri Mar 13, 2020 2:53 pm
by kurorah
I have a network of 40 or so pis that are set up to download updates I make to a script in dropbox and run it. These Pis are all set to boot to GUI and I need a command or a file to edit to change all of these in bulk without running through raspi-config on each of these devices.

Any help would be appreciated! Thank you!

Re: Change Boot to CLI setting via script

Posted: Fri Mar 13, 2020 4:34 pm
by B.Goode
Welcome to the Raspberry Pi forums.
kurorah wrote:
Fri Mar 13, 2020 2:53 pm
I have a network of 40 or so pis that are set up to download updates I make to a script in dropbox and run it. These Pis are all set to boot to GUI and I need a command or a file to edit to change all of these in bulk without running through raspi-config on each of these devices.

Any help would be appreciated! Thank you!

The shell/CLI version of the raspi-config utility is a shell script, so it can be examined to determine what action it undertakes in response to each of the menu options. You could then replicate the corresponding actions in your own script. Alternatively, I believe it has a no-interface option that is used by the GUI implementation - perhaps you could call those routines yourself?

Re: Change Boot to CLI setting via script

Posted: Fri Mar 13, 2020 5:32 pm
by DirkS
As @B.Goode says.

You can find the 4 commands that modify the behaviour through raspi-config at https://github.com/raspberrypi-ui/rc_gu ... _gui.c#L57 (4 commands)