You are not logged in.

#1 2016-09-15 09:59

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Backing up your desktop settings

I have updated a script that was originally posted HERE and altered it slightly and added some dialog boxes for information and bundled it up into a Q4OS installer (attached) for easy installation and use. I have also posted a page on my website for information on usage which can be found HERE, this will also keep the latest version (in case of updates).
Thank you for reading and I hope some of you might find this useful smile

Dai

Update 13-Feb-2017:

I have now added this package to github (HERE) to allow users to examine the code before downloading. You could also download direct from github but it will not give you the installation file so you will have to locate the files in the correct locations yourself.

Update 29-Dec-2017:

I have adjusted the theme backup to now work on Scorpion, I have only done minimum testing but it appears to be working correctly although I have disabled the revert to Q4OS default desktop at the moment until I am sure it will work as expected, hopefully it will be available in a future release.
This new Version (0.0.3-0) will not install (without some trickery) on Orion so I will leave the old version available for Orion users.
I have not yet updated github with the new code but if you want to have a look just go to the "executables" as they are simple python files.

As always any comment/criticism/feature request would be most welcome. smile

Last edited by Dai_trying (2017-12-29 16:51)


Attachments:
esh setup_daithemebackup_0.0.2-11_all.esh, Size: 39.81 KiB, Downloads: 1,447
esh setup_daithemebackup_0.0.3-0_all.esh, Size: 39.92 KiB, Downloads: 1,280

Offline

#2 2016-09-16 07:15

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

That looks like a good idea - will give it a whirl.

BTW the link to your website reports http://error404.000webhost.com/?

Offline

#3 2016-09-16 08:05

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

Thanks bin, I've fixed the link smile

Offline

#4 2016-09-16 08:44

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,535
Website

Re: Backing up your desktop settings

Nice work Dai, thank you for developing and sharing.

Offline

#5 2016-09-16 10:10

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

Thanks guys, but the thanks should go to you for maintaining this great little distro smile

Offline

#6 2016-09-18 20:55

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

You're welcome smile

Offline

#7 2016-09-18 22:46

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

I haven't really put too much on it as I need some inspiration (and time) but as and when I find something worth putting up I will. I'm guessing a full UEFI install tutorial will be one that would be useful smile

Offline

#8 2016-09-28 09:13

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

If you use XPQ4 - which I do and it does a really good job - then you'll know that if you change look you wind up with everything set to default. This can be a pain if you're just showing someone how flexible Q4 can be in its interface!!!!

Dai, your tool is an absolute godsend as it allows me to have a number of different setups configured that I can use when messing with demos - saves hours of trying to remember what I did where.

Good job! Thank you.

Offline

#9 2016-09-28 09:42

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

Thanks bin, I'm glad to hear it's being used, I am thinking of making a variant that creates a backup at regular intervals (set by user) and keeps the last x backups so if I forget to run it before changing something I know I will have a recent backup to be able to restore. That way I can forget about it until I do something wrong with the desktop. smile

Offline

#10 2016-09-28 10:33

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

One option would be to run it on startup and increment the backups with date and time in file name? That would provide a quick and dirty fallback.

Offline

#11 2016-09-28 11:11

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

I was thinking something along those lines too wink

The only problem would be too many backups in a short period of time, but I'll figure something out wink

Last edited by Dai_trying (2016-09-28 11:12)

Offline

#12 2016-09-28 12:13

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

It's tricky - I guess most folks get their desktop right and then leave it alone - so a cron job once a month would probably do.

If you're a fiddler then you'd be aware of the value of a backup while you're fiddling - only got to get it wrong a couple of times and you'll remember!!

Personally the only request I would have would be the ability to rename the backup on creation - if it could be incremented on save without intervention that's great, but don't mind typing it if necessary. I have already found myself just quickly running it before log off most times and then going "b****r got to delete the old one first."

Offline

#13 2016-09-28 13:33

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

All duly noted, and I'll post here when I have something for you smile

Offline

#14 2016-09-30 17:04

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

Just to add a further plug for this utility - I had to do a rebuild on a different hard drive and no matter what I couldn't get the appearance of fonts across GTK2 3 and TDE right. I've done it many times but apart from a few brain cells I was missing something. No problem - just copied across backup of old settings and restored to new drive - all fonts and appearance back to what they should be!!!

Offline

#15 2016-09-30 18:13

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

Nice! cool I'll be working on that script to add more functionality as soon as I'm finished with the one I'm doing now (udev script to disable touchpad when external mouse plugged in)

Offline

#16 2016-10-01 06:50

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

The mouse thing sounds like a good idea especially with the aircraft carrier size pads they have these days - so easy to catch accidentally.

When you get time, one thing I found the backup script missed was the keyboard shortcuts khotkeysrc - probably not many folks use it.....

Offline

#17 2016-10-01 09:41

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

Yes I have posted it Here so you can try it if you like smile

I will add the khotkeysrc file to the list and update it very soon thank you.

Offline

#18 2016-10-16 20:08

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

I have changed this script into a python script and given it a simple GUI and also added a simple "auto" script for use with cron or any other automation system.
The gui looks like this...
EfmSomT.png
and being such a simple interface should be easy to use without instruction.
I have also added a script to use with cron (or used from the command line) called daithemebackup_auto which will simply create a backup archive without any interaction.
To use this with cron simply type into a konsole

crontab -e

If this is the first time you have used cron it will ask for your preferreed 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.
When the editor is open scroll down to the end and add a line something like

@reboot daithemebackup_auto

This will perform a backup whenever the system is started and is how I use the script as it gives me good backup point (IMO).
You can adjust your cron settings to suit how often you want a backup file creating, a good source for cron examples can be found HERE

I have placed the new installer in the first post. Please remember to un-install the previous package first.

Thanks for reading and I hope you find this useful.

Dai

Offline

#19 2016-10-17 06:50

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

Brilliant bit of work Dai - installed and working.

Thank you!

Offline

#20 2016-10-17 07:48

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

Thanks bin, I'm glad you like it. cool

Offline

#21 2016-11-17 07:30

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,350

Re: Backing up your desktop settings

Dai, just a quick note re 2.6

I have just reinstalled Q4 and done a config restore from a 2.4 backup - I still think this is one of the most useful utils for Q4 - such a time saver.....

Noticed a couple of things
In Control Panel>Appearance and Themes>Window Decorations - On the Window Decoration Tab there are 4 checkboxes starting with Coloured Window Border.
These values were not included in the backup done by 2.4 - not sure if you've included in 2.6?

In the same area the Style>Toolbar tab contents went back to default.

Also I found that under System Administration the File Paths were not picked up.

Sorry, not picking holes, just thought it worth mentioning for next time you're looking at it.

Thanks very much for all the hard work you're doing on various projects for Q4.

Offline

#22 2016-11-17 10:53

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

I appreciate the feedback bin, and will try to find where the relevant information is stored, I would guess that it is a file that is not currently included in the default desktop restore file. It will not be a problem to simply add any file that holds settings to the backup application in the same way I added the khotkeysrc file (once they are located). I will have some time to look over this and will report back if I find something, in the mean time if you find where the info is stored please post and I will update the app accordingly.

And a note to any users of any of my scripts, please let me know if you find anything wrong or missing as it will help to improve it.

Thanks again bin. smile

Found:-

User Directories = ~/.config/user-dirs.dirs

The settings for themes are held in individual <theme>rc files I could probably archive all rc files in the ~/.trinity/share/config directory and that should cover all theme settings (I would think).

Last edited by Dai_trying (2016-11-17 11:27)

Offline

#23 2016-11-17 11:45

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

I just looked in the default desktop restore file and have noticed the standard theme files are already incorporated into my app, Do you use a different theme?

I am thinking at this point that it might be better to have a settings / config file that can be used to add custom entries to the archive to cater for custom theming but this would mean the user would have to know what files to add... and add them... what do you think bin?

Also to make it easier to trace which files are responsible for holding settings you could let your machine sit for a minute and then make a change to some theme setting and save / apply it. Then in a terminal use his command to find files changed in the last minute.

find . -type d -name .cache -prune -o -mmin -1 -type f -print

Just do this from your home directory to get your changes, if you do this from the root directory it will spew out many permission errors and list a lot of system resource files that will not be of relevance, after all it's your personal settings you want and they should all be stored in your home directory.

Offline

#24 2016-11-17 14:01

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

Added user directories (0.0.2-7)
Working on a solution for custom config files...

Offline

#25 2016-11-17 15:40

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,994

Re: Backing up your desktop settings

New Version 0.0.2.8 will also archive ALL files ending in rc including (but not limited to) .bashrc .conkyrc .xcompmgrrc and basically any file in any directory under your home directory with this ending. It may transpire that there are some files that would not be desirable to have archived for transferring to other systems (32 bit / 64 bit or specific video related files etc). I can add a blacklist of files to not archive if this is the case, please let me know.

If you want to see the files that are different in the new archive you can use this code snippet, just change the two filenames to the ones you would like to compare.

diff <(tar ztf "themebackup_001.tar.gz" | sort) <(tar ztf "themebackup_002.tar.gz" | sort)

this will hide filenames that are present in both files so you only see the files that are present in one or the other file (denoted by the < or > for which archive holds which file < being in the first and > being in the second).

Last edited by Dai_trying (2016-11-17 16:04)

Offline

Board footer

Powered by FluxBB