Add graphical session support#204
Conversation
|
Thanks, integrating and manage the cinnamon session from systemd I think will be a good improvement, like other DEs already done. |
9ac875a to
2499aa9
Compare
I haven't tested if it handles failures gracefully , there isn't much to fail.
Does that restart cinnamon-session-binary? |
|
Cinnamon have internal launcher, cinnamon-killer-daemon and probably also other part without a systemd service, these not affect the session part as "another level"? looking for example gnome-shell have systemd services, for example this: https://salsa.debian.org/gnome-team/gnome-shell/-/blob/debian/latest/data/org.gnome.Shell@.service.in?ref_type=heads |
This pull request adds integration with systemd user units to improve session management in Cinnamon. The main changes introduce new helper functions for starting and stopping systemd units, export the user environment to systemd, and ensure that systemd user targets are started and stopped appropriately during session lifecycle. Additionally, systemd unit files for Cinnamon session are now installed as part of the build.
Systemd integration and environment export:
csm-util.cand declarations incsm-util.hfor starting (csm_util_start_systemd_unit), stopping (csm_util_stop_systemd_unit), and exporting the session environment (csm_util_export_systemd_activation_environment) to systemd via D-Bus. These functions ensure that the Cinnamon session can signal systemd to manage its lifecycle and environment correctly. [1] [2]main.cto export the environment to systemd and start thecinnamon-session.targetunit at session startup, with error handling if the export fails.csm-manager.cto start thecinnamon-session.targetunit when entering the running phase and stop it during session exit, ensuring systemd is kept in sync with the session state. [1] [2]Build system and unit files:
cinnamon-session.targetand updated Meson build scripts to install it to the correct directory, handling systemd's install path via pkg-config if available. [1] [2] [3] [4] [5]These changes ensure that Cinnamon session integrates smoothly with systemd for user session management, allowing better coordination of session services and environment propagation.