Script to setup a new system after a fresh install


I am trying to build a script that can bring my system to my preferences in terms of applications installed, repositories assigned, desktop settings, network folders etc.

The main idea here was to be able to easily bring the system back to my preferred state after a clean installation or an upgrade. Here with my limited knowledge I thought a shell script should be sufficient.

I have been pretty much been able to generate the script to add repositories, install applications etc. I got stuck when I had to setup the system settings like Fonts, Colors themes etc.

Can someone help me with how to change the System settings in KDE via command line. The best I could come to was find kcmshell4 but am stuck here it can start individual modules but I find no way of how to change them through commands.


Re"setting" your KDE4-settings is not needed. Just keep your /home. So far for user-controlled settings.

Other settings can be kept by performing an upgrade. A copy of /etc should provide you with (almost) all system settings.

IMHO you’re choosing the wrong path. Upgrading to the next version is described well, that would bring what you need. Writing a script can be done, but you’re hanging from the trees if there’s changes in f.e. naming conventions that you do not know of.

Thanks for the insightful reply about making a copy of home and etc. Next time I will definitely try the upgrade option and see how that is, I know I dont have a logical reason here but was always somehow comfortable with a clean install instead of an upgrade.