Page 1 of 1
"Quick Setup" Variables from CLI?
Posted: Tue Sep 27, 2022 8:40 pm
by Neo_78
Is there a way to set the variables that are provided via the "Quick Setup" script on the desktop from the command line?
- system language
- keyboard language
- time zone
I am trying to automate the initial FatDog setup of those variables with a bash script.
Thanks for your feedback!
Re: "Quick Setup" Variables from CLI?
Posted: Tue Sep 27, 2022 9:17 pm
by don570
I'm no expert but I think that a change of system language needs a restart of X,
whereas a change of clock can be done with a command.
Shinobar was the first to experiment with this script called 'first run'
https://oldforum.puppylinux.com/viewtopic.php?p=438875
_________________________________________
Re: "Quick Setup" Variables from CLI?
Posted: Wed Sep 28, 2022 8:40 am
by Clarity
FATDOG doesn't have or use FirstRUN. It has, instead, a collection of Control Panel utilities; one of which is the set for the things you ask about.
Your question stem from the "Quick Setup" icon on the FD desktop.
If you right click on the icon, and follow thru to is properties page, you'll see the following:
- FD812-script.jpg (92.19 KiB) Viewed 850 times
Hope this is helpful.
Re: "Quick Setup" Variables from CLI?
Posted: Wed Sep 28, 2022 6:30 pm
by Keef
You could look into 'setxkbmap'for the keyboard
The LANG variable sets the locale ("system language") eg 'export LANG=en_GB.utf8'
You can set these easily enough from the terminal, but they will only last for the session - won't survive a reboot.
Have a look in ~/.fatdog/
You could write your variables directly to here, which is probably what you want (in which case, the first bit I wrote is a bit redundant).
The timezone is set by symlinking your preferred zone from /usr/share/zoneinfo/ to etc/timezone.
Code: Select all
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
Re: "Quick Setup" Variables from CLI?
Posted: Wed Sep 28, 2022 9:49 pm
by Neo_78
Thanks @don570 @Clarity @Keef.
Just to clarify: the idea is to write a bash script with fixed values to set the timezone, locale, keyboard layout, etc. for subsequent image remastering instead of having to use Fatdog's Quick Setup script. You can then use the script to automatically set the correct language, keyboard layout, time etc. instead of having to visually set those values in the menu. (Considering that one always uses the same, fixed values).
It should also restart X as this seems to be required for those changes to take effect. In the remastered image, those changes will then be persistent.
restart X
Posted: Thu Sep 29, 2022 7:58 pm
by don570
It should also restart X as this seems to be required for those changes to take effect.
I believe so too. As mentioned in prior post it is possible to set the language for a terminal session.
For example...
__________________________________________
Re: "Quick Setup" Variables from CLI?
Posted: Thu Sep 29, 2022 11:32 pm
by Clarity
Question: Would adding Puppy Linux's FirstRUN to FATDOG cover your objective in a single screen?
I, kinda, agree that this would be preferable to the FATDOG icon...but its developers might not see that as the audience they want.
But, is that what you are seeking; namely a single screen albeit a script that sets all of this in a single 'clear' effort like FirstRUN does?
Re: "Quick Setup" Variables from CLI?
Posted: Fri Sep 30, 2022 9:42 pm
by Neo_78
I think the current visual quick setup menu is fine.
I just don't want to run it manually every time I setup a new system. So the idea is to run a separate script and set the same, fixed, pre-pogrammed values automatically without any interaction or input.
Re: "Quick Setup" Variables from CLI?
Posted: Fri Sep 30, 2022 10:10 pm
by Clarity
I think, you are suggesting a 'capture' of answers upon a first use such that a future program could use that capture in future setups...if referenced. Hope I am seeing this correctly.
Re: "Quick Setup" Variables from CLI?
Posted: Sat Oct 01, 2022 3:01 pm
by chiron
I would do the whole procedure once via the GUI, then create a savefile and see which files were created and their contents. Take the files, put them into a package and install said package at first startup, or use an sfs-file.
Re: "Quick Setup" Variables from CLI?
Posted: Sat Oct 01, 2022 3:38 pm
by dr__Dan
Following on from Chiron: A possible route to get the needed file locations and contents: Start up with no savefile and shutdown immediately, creating a save file. Start again with no savefile, run the Quick Setup and add your information, then shut down again, creating a different savefile. Start up and use Meld on the two save files. It should show the needed locations, and the script to write to them shouldn't be too complicated. From reviewing the init scripts, it looks like if it is placed in /etc/rc.d/rc.local it should set the variables before X starts, so you won't need to restart X.
Re: "Quick Setup" Variables from CLI?
Posted: Sat Oct 01, 2022 7:31 pm
by don570
I save my data to a folder however as Dr Dan says it is possible to use save-files.
Multiple save-files are possible, so one save-file could be used for French language, another for English etc.
This would reduce effort of setting up a keyboard for a specific language.
__________________________________________________________________________________
Re: "Quick Setup" Variables from CLI?
Posted: Sat Oct 01, 2022 9:25 pm
by Neo_78
Good idea @chiron and @dr__Dan. The thing is I am using FatDog remastered in RAM-only mode, so no restart.
Maybe the developer team could shed some light on the required variables that could be set from cli or the files that need to be adjusted? Preset configuration files could then be put in place with cp
in the script.
Re: "Quick Setup" Variables from CLI?
Posted: Sat Oct 01, 2022 9:40 pm
by dr__Dan
Perhaps on a different computer, just to get the needed data? I was supposing that the info would be added to your remastering.
Dan
Re: "Quick Setup" Variables from CLI?
Posted: Sun Oct 02, 2022 1:17 am
by Clarity
@dr__Dan I agree. But this, in agreement, would also work, as well:
A pristine boot of FD, use the desktop Icon for setup,
then immediately shutdown saving the session in its folder.
Upon reboot, choose RAM only (pristine again) and
upon desktop, open the save-session folder that was saved to see the changes.
This way, the ONLY contents would be those changes he is seeking. From there, a script/screen-app/package could use any files found from the prior pristine boot's session.
Re: "Quick Setup" Variables from CLI?
Posted: Sun Oct 02, 2022 6:39 am
by dr__Dan
@Clarity, my purpose in suggesting two save files, one with no changes and one with only localization setup is to cull out the various files and directories that are automatically created in a new savefile, which Meld would differentiate nicely. We are in agreement.
@Neo_78, I'm not understanding how running in RAM prevents shutting down. I've seen that you are running a remastered Fatdog64, and that you are working towards a goal of security, as you have been from your first posts. If you really can't do this, PM me and I will do it on my end and pass the results to you.
Dan
Re: "Quick Setup" Variables from CLI?
Posted: Sun Oct 02, 2022 6:11 pm
by Neo_78
Thanks @dr__Dan. This is not so much about security but rather about automating the whole customization process for remastering / final image creation. Will try your suggestion.