Summary: | Periodic auto-saving of session state so state isn't lost if there's a crash or power loss | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | ian |
Component: | Session Management | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | CONFIRMED --- | ||
Severity: | wishlist | CC: | dinth, jeffbai, kde.org, kde, kde, kilrae, logixoul, maze, mcjason, med.medin.2014, missive, nate, noacco, o.freyermuth, plasma-bugs, subscriber, zmogas |
Priority: | VHI | ||
Version: | 5.27.5 | ||
Target Milestone: | 1.0 | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
ian
2003-07-07 21:49:22 UTC
There is an "Save Session" entry in the K menu if you choose the "Restore manually saved session" option in the "Session Manager" control center module. retitling, as the first part which the old title refers to is already implemented. *** Bug 61254 has been marked as a duplicate of this bug. *** *** Bug 100385 has been marked as a duplicate of this bug. *** *** Bug 130050 has been marked as a duplicate of this bug. *** solved in work/soc_ksm, i'll close this when I merge it OK, so what does "solved" actually mean? I've noticed that there have been several wishes for the implementation of a recover crashed session feature, however until not this has not actually been done. The only thing that was done in kde was to add a feature "Save Session" which was only available when the session manager was set to restoring a manually save session, which for me is not really satisfactory. When I made this wish 3 years ago, I wanted a feature which would enable the recovery of a crashed session. Is this now implemented? That means, when I have a session open which is not manually saved, and then the session prematurely ends, do I get an option to restore that session at my next login? Do I get options to select which crashed session I want to restore? That is, if I had a crash today, one two weeks ago, and one three months ago, can I select which one of these I want to restore?It would also be nice to get an extra option in the KControl control centre to manage prematurely ended sessions (this is something I thought of right now as I was writing my question about what "solved" is). The user would be able to see a list of sessions with start and approximate premature end times, and within each session entry they would see a list of windows that was open. The user would then be able to choose if to maintain that session as a possibility to restore, or can choose to discard the records for that session. The session list the user sees here would translate roughly into the list of possible sessions to restore at login which contains the list of prematurely ended sessions.And now I'm really thinking... The addition of a feature in KControl where a crashed session can be restored immediately in the current session. Say for example the user logs in to an empty session and heads for the control centre to look at their list of prematurely ended sessions. When they are looking at the details of each session, they get the option to immediately restore that session with the additional option of if the current session should be replaced or added to. To replace a session means that all current windows and applications would be forcibly closed and the selected session restored. To add to a session means that the prematurely ended session would have all its windows restored in addition to the currently open windows of the current session.Now I'm wondering if I should put my ideas about prematurely ended sessions management into a new wishlist item - should I do that?ThanksIan AUTOSAVE SESSION HACK Heres a hack to get sessions a way autosaved. You need: 1. Startup script to change loginmode in ksmserverrc 2. Cronjob which save your current sessions 3. Logout script to change loginmode in ksmserverrc and show logoutwindow Plan: On startup we change loginmode from restorePreviousLogout to restoreSavedSession and autosave the current session via cron. If your computer crashes, kde loads your saved session on next login. If you logout normally, we need to switch back to restorePreviousLogout to have the most actually session on next login (this can't be done with a shutdown script because it is executed at the end of the logout process). So we have to override the normal logout process or create a shortcut with a custom logout process. Commands (change the paths according your installation) 1. STARTUP COMMAND to put in your ~/USER/.kde/Autostart/ folder #!/bin/bash sed -i 's/loginMode=restorePreviousLogout/loginMode=restoreSavedSession/g' '/home/michael/.kde/share/config/ksmserverrc' 2. AUTOSAVE SESSION to use it with cron #!/bin/bash DCOPSERVER=`cat /home/USER/.DCOPserver_YOURHOSTNAME_:0 | grep local` export DCOPSERVER /opt/kde3/bin/dcop ksmserver ksmserver saveCurrentSession 3. LOGOUT COMMAND make a menu entry which links to your script and give it a shortcut #!/bin/bash sed -i 's/loginMode=restoreSavedSession/loginMode=restorePreviousLogout/g' '/home/michael/.kde/share/config/ksmserverrc' /opt/kde3/bin/dcop ksmserver ksmserver logout 1 -1 3 Maybe someone could pack this togheter and post it on kde-apps.org Useful links http://docs.kde.org/stable/de/kdemultimedia/kmix/dcop-examples.html http://lists.kde.org/?l=kde-core-devel&m=102019069316875&w=2 http://www.spinics.net/lists/kde/msg00429.html Hello, I have technical notes about this bug listed at http://fulldecent.blogspot.com/2010/08/technical-notes-about-kde-ksmserver.html from my original attempt to fix it. *** Bug 392003 has been marked as a duplicate of this bug. *** *** Bug 251496 has been marked as a duplicate of this bug. *** *** Bug 223285 has been marked as a duplicate of this bug. *** *** Bug 311605 has been marked as a duplicate of this bug. *** *** Bug 271586 has been marked as a duplicate of this bug. *** *** Bug 186316 has been marked as a duplicate of this bug. *** *** Bug 441905 has been marked as a duplicate of this bug. *** *** Bug 122375 has been marked as a duplicate of this bug. *** Woah thus bug is old! Is it really so hard to have a timer task run that does the equivalent of the manual save session button? Is there a command line way to trigger that function that I could add to a cron job? If not, could a command line way to activate it be added as a bit of a stopgap for this issue? |