[gnome-session.wiki] Update Session Saving Brain Dump
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session.wiki] Update Session Saving Brain Dump
- Date: Mon, 17 Jan 2022 17:11:50 +0000 (UTC)
commit eb7b1a987a5d1fa8731e405d764695727935e858
Author: Ray Strode <halfline gmail com>
Date: Mon Jan 17 17:11:49 2022 +0000
Update Session Saving Brain Dump
Session-Saving-Brain-Dump.md | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/Session-Saving-Brain-Dump.md b/Session-Saving-Brain-Dump.md
index 197d9c7..ca2f95b 100644
--- a/Session-Saving-Brain-Dump.md
+++ b/Session-Saving-Brain-Dump.md
@@ -1,12 +1,18 @@
-This page is a landing ground for ideas concerning session saving in GNOME since `systemd --user` support
was added to gnome-session
+This page is a landing ground for ideas concerning session saving in GNOME.
-- [[_TOC_]]
+Broadly speaking, there are two main parts to application session handling: Ensuring applications are
started at session login, and ensuring applications save and restore their state.
-## The old way and why it's no longer viable
-In
+[[_TOC_]]
-## Architecture of the `systemd --user` set up
+## Application Starting
+- When thinking about applications, we should consider flatpaks first, since, ideally, they would be the
main way a user runs applications.
+ - Flatpak'd applications can use the [autostart flag of the RequestBackground xdg-portal
API](https://flatpak.github.io/xdg-desktop-portal/#gdbus-method-org-freedesktop-portal-Background.RequestBackground)
to get automatically started at session login.
+ - Under the hood, this API just writes out an [autostart desktop file]
(https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html) which is started by
gnome-session.
+ - systemd has [support for loading autostart desktop files]
(https://github.com/systemd/systemd/pull/15226) now, too, but we aren't currently using it. There's [a
branch] (https://gitlab.gnome.org/GNOME/gnome-session/-/tree/benzea/systemd-condition-evaluator) that gets us
closer to using it, though.
-## Canned sessions
+- There's not yet a general API for requesting an application gets started when the starts. There's a
request for [adding one to GLib] (https://gitlab.gnome.org/GNOME/glib/-/issues/2445) though the API is yet
to be determined. We should figure that out and probably make it use the xdg-portal api transparently under
the hood for flatpaks.
-## flatpak and portal for restarting
\ No newline at end of file
+## Application Saving
+- There are some aspects of session saving the application can't directly control. For instance, the
workspace an application is started on or its global position. Applications will need some way to request
mutter opaquely track that information on a surface by surface basis, and then upon app start up the
application could request that mutter put specific surfaces "back the way they were before". Samsung has one
proposal for such [a protocol]
(https://lists.freedesktop.org/archives/wayland-devel/2018-February/037236.html).
+
+- Other bits of state, such as app widget state need to be saved and restored as well. There's a GTK
proposal for doing that [here]()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]