For some unexpected reasons the gnome session might stop abruptly
System freeze
No more power on laptop
Suspend and wake up might not be optimal on some laptops with following symptoms:
Blank inactive screen (but fan and/or keyboard light on)
No keyboard or mouse response (which prevent logging from another tty)
No detectable activity from laptop (but is still turned on)
Thus system or laptop needs to be restarted loosing or crashing the gnome session
What are the gnome system tools/infos to help recover from a gnome session at the time of the crash ?
**Active windows**
** Active Applications**
** Opened documents**
** Content of each workplace**
** etcâŚ**
Preserving application state over sessions is a [hard] feature that we have been wanting for long. There are various application-specific caveats to this, but my current bet is that we will start seeing this feature once we have defined a standardized API for applications to serialize/store their state. This is a work in progress starting with Draft: GApplication: Add RestartData property, and setter (!683) ¡ Merge requests ¡ GNOME / GLib ¡ GitLab
@felipeborges
Thank you for your reply and your time.
Iâm a Linux/Open-source enthusiast user but no developper. For itâs potential of freedom, privacy and security, my goal is to help the every day desktop user to be able to switch easily away from closed source OS and Desktop Managers .
Thus even with as a stable environment as Gnome (I use Fedora) a crash workaround would be a big Need to Have until the long term âPreserving application state over sessionsâ is reached
Maybe addressing partially the issue by getting as a short term start the infos not from each application but from the Window Manager:
-Does the WM (Wayland,XWayland is by defaut on Fedora if I get this point right ) access the infos on which application has window(s) open and on which workplace ?
Does the WM access the infos on which application has window(s) open and on which workplace ?
âAccessâ is a bit misleading here â workspaces are managed by the WM, so this is its own state, not some external state it has to access somehow.
That state is lost with the session though, i.e. it isnât serialized to disk, mostly because thereâs nothing useful that can be done with that information.
There is no (generic) way to request x windows from an app, and the WM has no knowledge about what each window represents (document, file location, set of tabs, âŚ), so thereâs no way to restore any state from âapp x has n windows on these workspacesâ.
And is seems to pretty well show all my active applications, and even currently active firefox tab or current title of Libreoffice Writer open document, mixing âclassâ and âtitleâ infos
Wouldnât it be possible to get a daemonized script or a gnome extension to log the results of get_window_actors in such a script every few seconds into a file which could be called back after a crash ?
It might do the job even if crude.
In a similar fashion, after a crash would offer a GUI recovery , like LibreOffice does offer to recover files or Firefox itâs browsing session after a crash
That would work for just restarting applications but probably wonât do so well for restoring application state exactly as it was. For Wayland, a KDE developer just did a talk on this at XDC last month: Addressing wayland robustness - media.ccc.de
I havenât seen if anyone was actively working on this in GTK or gnome-shell though.
Is there a command line to get from the Window Manager, specifically Wayland XWayland and X the workplace identification in which a window is open (associated with itâs application for example ) ?
gets you a list of open windows with some properties like title and associated app, but not the workspace.
(It also requires setting global.context.unsafe_mode = true in GNOME 41)
Youâd need an extension to override the implementation to provide the additional information you want, but at that point it would be better to just write out the restore file from the extension itself.
@fmuellner and all the other participants (Iâm limited by 2):
Thank you for your feedbacks.
Iâm really out of my depth here. (as 'where to put global.context.unsafe_mode = true in the command youâve just explained)
I do sense that to correctly address this short term solution , it REALLY needs
(1) MORE awareness that some users/people like me discuss/like/need this workaround
(2) MORE involvement from skilled users/developpers willing to help
(3) Project Management to get FIRST a working Script and then a Gnome Extension DESIGNED for the broadest use cases which are EXPRESSED by users and compatible with overall Gnomeâs design directions.
Regarding (1) this topic is also mentioned in another topic with more visibility and momentum here: with @fmuellner and @ebassi proposing and sharing useful insights (and as a side note also there.
(And surely there might be other forums outside discourse.gnome.org debating it tooâŚ)
Regarding (2) or (3) I have the will to lead this workaround toward a simple yet efficient script/extension solution. But my know-how on coding or which tools to use is much to limited, say the least .
So from this step forward, what should be the next moves to :