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 |
There was a problem hiding this comment.
Pull request overview
Adds integration with the systemd user manager so Cinnamon's session lifecycle drives cinnamon-session.target (which pulls in graphical-session.target / graphical-session-pre.target). New csm-util helpers export the user environment to org.freedesktop.systemd1.Manager, start the target when the session enters the running phase, and stop it on exit. A user unit file and the necessary Meson plumbing are installed alongside.
Changes:
- New
csm-utilhelpers to export environment and start/stop systemd user units, with a small denylist for session-specific variables. - Wire
cinnamon-session.targetinto session startup (main.c,csm-manager.crunning phase) and shutdown (csm-manager.cexit phase). - Install
data/systemd/user/cinnamon-session.targetvia a new Meson subdir, withsystemduserunitdirresolved fromlibsystemd's pkg-config.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| meson.build | Defines systemduserunitdir from libsystemd pkg-config with a prefix-based fallback. |
| data/meson.build | Adds subdir('systemd/user') to include the new unit install. |
| data/systemd/user/meson.build | Installs cinnamon-session.target into the user unit dir. |
| data/systemd/user/cinnamon-session.target | New target with Wants/After/PropagatesStopTo on graphical-session{,-pre}.target. |
| cinnamon-session/csm-util.h | Declares new export/start/stop helpers. |
| cinnamon-session/csm-util.c | Implements env export to systemd SetEnvironment and StartUnit/StopUnit wrappers; adds session-var denylist. |
| cinnamon-session/main.c | Calls the new env export and starts cinnamon-session.target at startup. |
| cinnamon-session/csm-manager.c | Starts the target on entering RUNNING and stops it in do_phase_exit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2499aa9 to
ea6f631
Compare
|
this need changes also to Debian packaging part, I not remember for sure if dh-sequence-systemd is not needed also in the old compat 11 but one thing needed for sure is the adding to .install, in d/rules have after will be useful check the generated packages, that I now see were skipped. need to check the generated .postinst to know if are missed part that may require additional build-dep or add in d/rules. |
ea6f631 to
4c7d2f1
Compare
Missing file added to debian/cinnamon-session.install |
1517a45 to
89d7d5c
Compare
|
you need to add |
89d7d5c to
6111a17
Compare
|
Can confirm, this makes xdg-desktop-portal work here on Fedora 44. |
|
@leigh123linux latest changes seem wrong; from a quick look |
6d48017 to
80ce0b0
Compare
80ce0b0 to
e5ff0c1
Compare
|
The issue reported seems still present, the take of the systemduserunitdir variable is wrong after https://github.com/linuxmint/cinnamon-session/compare/89d7d5c3cdd7685a3e0261136fa928f561bc28ba..6111a1738ea426ee0449254eb9fe36e0cfe83108 |
Uh oh!
There was an error while loading. Please reload this page.