Bug 200341 - Allow to restore full plasma config from checkpoints
Summary: Allow to restore full plasma config from checkpoints
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-15 18:59 UTC by anton
Modified: 2018-06-08 20:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anton 2009-07-15 18:59:53 UTC
Version:            (using KDE 4.2.95)
OS:                Linux
Installed from:    SuSE RPMs

I have recently lost all my plasma configuration. Just switched off computer as usual, then when switched in on again received default desktop and panel configuration.

I suppose my plasmarc file have been somehow corrupted or destroyed, but I do not know how this could happen. I had enough disk space in home directory. 

I do not think I will ever find the reason of this fail, but in any case it was not very pleasant to restore all my plasmoids as they were. So I think the only good way to save one in any similar situation is to have automatic history of plasmarc files. 

For example I could open gui with list of dates and to load plasma config from any day (from yesterday in my case) and to get my plasmoids and panel back.
Comment 1 FiNeX 2009-07-18 01:55:13 UTC
It should be interesting a backup of the whole ~/.kde directory, not only plasma settings.
Comment 2 anton 2009-07-19 22:04:36 UTC
Probably a simpler solution (almost without UI) might be making plasma save/load config algorithm more reliable.

When save:
1. Copy existing plasmarc config file to something like plasmarc-bakXXX2
2. Only after that rewrite existing plasmarc file
3. Remove previous plasmarc-bakXXX1 file (previous backup file) - only after making sure the new config is completely safe in 2 files.

Do not perform 2nd and 3rd steps if the 1st one fails - most likely the new file will not be successfully created too - this might easily happen for example if there is no free space in /home directory. If there were a problem on the 1st or the 2nd step, show warning dialog to user "Failed to save plasma config" and 2 buttons "Retry" and "Cancel", so the user would be able to go to file manager and free few bytes in his home dir or something.

When load:
1. First try plasmarc file as usual
2. If failed to load (file is missing or zero length or corrupted) try the most recent backup file (plasmarc-bakXXX2) instead.
3. Only if there were no backup file or even it is corrupted create new default plasmarc file.


As I can see, with such algorithm at least one copy of the most recent successful plasma config file would always be safe even if something evil would happen during the save process.



This might also be applied to other apps - for example I remember problems on my old kde3 desktop with desktop sessions - I had "save session on logout" option set and several times I did logout when my /home directory did not have any free space on it - kde tried to save its session and failed, but before it failed it did kill the old session file, so on login I received empty desktop and had to reopen all applications again (the worst thing is multiple konqueror windows with multiple tabs with different sites on each).
Comment 3 Diego 2010-06-28 15:53:14 UTC
It could be interesting to see something similar to what is being done for the panel:
http://aseigo.blogspot.com/2010/04/solving-little-problem-with-slightly.html
Comment 4 Nate Graham 2018-06-08 20:25:32 UTC
Hello!

This feature request was filed for KDE Plasma 4, which reached end-of-support status in August 2015. KDE Plasma 5's desktop shell has been almost completely rewritten for better performance and usability, so it is likely that this feature request is already implemented in Plasma 5, or is no longer applicable.

Accordingly, we hope you understand why we must close this feature request. If the requested feature is still desired but not implemented in KDE Plasma 5.12 or later, please feel free to open a new ticket in the "plasmashell" product after reading https://community.kde.org/Get_Involved/Bug_Reporting

If you would like to get involved in KDE's bug triaging effort so that future mass bug closes like this are less likely, please read https://community.kde.org/Get_Involved#Bug_Triaging

Thanks for your understanding!

Nate Graham