Back up your desktop before changing settings.

This script will backup and restore your current desktop settings for Q4OS. I originally created it just for myself as I wanted to test different theme settings (XPQ4 and others) but wanted to be able to reset my desktop to how it was before I messed with it.

Firstly Q4OS already has a script to restore your desktop to how it was when you installed it, instructions can be found HERE, but I wanted to be able to keep all my settings that had been adjusted since it was installed, that is things like quicklauncher icons and settings, background wallpaper, colour schemes etc, etc...

So I set about creating a small script to backup my files that I could use on all my different pc's, laptops etc and this is the result.

Q4OS installer download can be found HERE.

If you want to see the source of the python application navigate to /usr/share/daithemebackup and you can view the files located there.

To run this script go to Programs->Dai's Scripts->Theme Backup and you will be presented with a very simple application like in this image.

There are three options which are quite obvious so I won't give any instruction on usage.

The backup files are saved to the directory /home/(your username).config/daithemebackup/ and are simply numbered backup files. When you click to Restore From Backup File the folder should be automatically selected and you can simply double-click/click and select open to open the file or right click to rename/delete the file.

In addition to this I created a script that can be used from cron and is called daithemebackup_auto, this is a simple backup routine and is designed to be used without user interaction. I run a cron job when my laptop/computer starts and then I know I always have a backup of when I started in case I mess something up and need to restore my settings.

To create a cron job simply open a konsole and type crontab -e. If this is the first time you have used cron it will ask for your preferred editor, I use (and recommend) nano as it is simple to use, but if you prefer one of the other options please use that instead. Once the editor is open type in @reboot daithemebackup_auto at the bottom of the file and it will be set to run when starting. Of course you can set your cron job however you would prefer, some examples of how you can set cron can be found here. When you have finished press ctrl-x then y then enter. You should get a message saying crontab: installing new crontab and you should be all set-up.

And if you have any dificulties at all please feel free to contact me either from my homepage, or in the q4os forum, or you can just email by clicking on the email address at the bottom of this page.