-
Notifications
You must be signed in to change notification settings - Fork 39
csm-manager.c: Add functionality to restart the cinnamon-launcher on-demand #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to restart the cinnamon-launcher on-demand in order to ensure cinnamon-session runs in the correct login session, which helps prevent polkit authentication issues. Key changes include adding new XML properties and methods for session and restart operations, introducing a new API to retrieve the login session ID in various system backends, and wiring a new DBus method to trigger the restart.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cinnamon-session/org.gnome.SessionManager.xml | Added SessionId property and RestartCinnamonLauncher method |
| cinnamon-session/csm-systemd.c | Implemented csm_systemd_get_login_session_id |
| cinnamon-session/csm-system.h | Extended system interface for login session ID retrieval |
| cinnamon-session/csm-system.c | Exposed login session ID via the system interface |
| cinnamon-session/csm-session-fill.c | Exported login session ID post session activation |
| cinnamon-session/csm-manager.h | Declared export function for login session ID |
| cinnamon-session/csm-manager.c | Added restart_cinnamon_launcher logic and DBus handler implementation |
| cinnamon-session/csm-consolekit.c | Provided stub implementation for consolekit login session ID |
| cinnamon-session/csm-app.c | Modified app restart behavior to only trigger via DBus if cinnamon.desktop |
cinnamon-session/csm-systemd.c
Outdated
| ret = sd_pid_get_session (getpid (), &pid_session); | ||
|
|
||
| if (ret < 0) { | ||
| g_printerr ("can't get logion session id for cinnamon-session. errno: %d\n", -ret); |
Copilot
AI
May 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in error message: 'logion' should be corrected to 'login'.
| g_printerr ("can't get logion session id for cinnamon-session. errno: %d\n", -ret); | |
| g_printerr ("can't get login session id for cinnamon-session. errno: %d\n", -ret); |
on-demand. This allows cinnamon to be restarted under the correct login session to prevent blocking of polkit authentication.
d45db1b to
78ec351
Compare
correct login session when registering. Compare Cinnamon's session id with cinnamon-session's (which should never change), and have cinnamon-session restart us if there is a mismatch. Ref: #12669, #12728. See: linuxmint/cinnamon-session#184.
correct login session when registering. Compare Cinnamon's session id with cinnamon-session's (which should never change), and have cinnamon-session restart us if there is a mismatch. Ref: #12669, #12728. See: linuxmint/cinnamon-session#184.
correct login session when registering. Compare Cinnamon's session id with cinnamon-session's (which should never change), and have cinnamon-session restart us if there is a mismatch. Ref: #12669, #12728. See: linuxmint/cinnamon-session#184.
This allows cinnamon to be restarted under the correct login session to prevent blocking of polkit authentication.