I would like to find out if it’s possible to “save session” in a terminal and so in turn I’ll insert this in a script and add it to my crontab to schedule a save.
I am referring to the Desktop Session > Session Restore > Manually Saved. I would like this command to create this Manually saved session so that it is used when I logon again. Excuse me if my explanation here is perhaps overly descriptive, but I saw there were posts regarding Kate and Konsole session which isn’t what I am looking for.
My situation is that due to power failures, I don’t get to log out, that’s why I changed that setting you were referring to to manual instead of at log out. I must just remember to save the session every now and then (which I don’t always remember), hence my thought if I can do this on a schedule using crontab, but I can’t see what command to run to save the session.
altho, my experience with “unplanned restarts” is that it always seems to bring me back to where i was when it happened.
perhaps my clementine audio player will need to be restarted or any open libre office documents will need to go thru the “recovery” step, but i’ve not lost any work as far as i know.
but if you tried it and it’s not doing what you need, i hope you find a better solution.
I may be remembering incorrectly but I had it set to session restore on last logout, but that irritated me a bit because it seemed to be doing as it says but my actual session had a different set of applications (hence this post), although it could be a bit complex and individual for each person depending on what applications used as well, considering that not all applications apply this X11 functionality as per the redirect explanation in that post @bedna quoted.
I’ll post my results now, however upon seeing your post I also did a quick test to include librecalc which didn’t reopen. All good though, I’ll accept as many applications being restored as I can, as long as it also excludes applications that I closed.
Like you say the choice of applications that do their own auto-recovery is great to prevent data loss which kate and libreoffice do so that’s great.