cinnamon-session exits silently (exit 0) when org.gnome.SessionManager is already owned on the shared user bus — parallel graphical session (xrdp)
まだ誰も着手していません。
評価
調査の方向性
Start from the on_name_lost handler for org.gnome.SessionManager in cinnamon-session's session manager code, where the second instance exits with status 0. Also look at csm-systemd.c (sd_pid_get_session, the errno 61 warning) and require_dbus_session(), which falls back to the shared user bus. Done means the name-lost path prints a clear diagnostic naming the bus address instead of exiting silently; the bus-isolation design question is separate and needs maintainer input.
索引モデルが issue の本文から書いたものです。
説明
Environment: Linux Mint 22.3 (Cinnamon), cinnamon-session from the Mint 22 repos. Trigger scenario: RDP login via xrdp while the same user is still logged in at the local console (both sessions for the same user, both Cinnamon).
Symptom
After fixing an unrelated xorgxrdp ABI issue (reported separately on Launchpad as Ubuntu bug #2171002), the Xorg server for the RDP session started correctly, but cinnamon-session still terminated about 1 second after start — silently, with exit code 0. xrdp-sesman only logged "exited quickly" for the window manager. No visible error, no dialog, the RDP login simply collapsed back to the login screen.
~/.xsession-errors contained the only hints:
cinnamon-session[pid]: Could not get session id for session (...)
(errno 61)
cinnamon-session[pid]: can't get login session id for cinnamon-session.
errno: 61
(errno 61 = ENODATA. Neither message explains that it is fatal — the session still dies.)
Diagnosis (all steps verified on the machine)
- The systemd/logind side is fine: instrumenting startwm.sh to dump the environment and the process context showed the WM process running in the correct session scope (XDG_SESSION_ID=47, session-47.scope, state active). So pam_systemd/logind are not the cause.
- cinnamon-session obtains the login session id via sd_pid_get_session() (csm-systemd.c) and ignores the XDG_SESSION_ID environment variable; the errno-61 warning is printed on that path. On its own this warning is not fatal, though.
- The actual cause: the RDP session inherits DBUS_SESSION_BUS_ADDRESS=/run/user/1000/bus — the shared user bus. The parallel local console Cinnamon session (same user) already owns the well-known name org.gnome.SessionManager on that bus. When the second cinnamon-session tries to acquire it, it hits on_name_lost and exits silently with 0. strace in the failing case showed 6 connects to /run/user/1000/bus and 0 connects to any other bus.
- Isolation proof: starting the RDP cinnamon-session with a dedicated session bus (unset DBUS_SESSION_BUS_ADDRESS, then eval "$(dbus-launch --sh-syntax --exit-with-session)") — the variable must be truly unset, setting it empty fails with "address is empty" — let cinnamon-session run normally: csd-* daemons started, session lived, no name conflict.
- Caveat that explains why "unset" alone is NOT enough: cinnamon-session's require_dbus_session() fallback fetches a bus address via XDG_RUNTIME_DIR/bus when the variable is unset — which is exactly the shared user bus again. The wrapper must therefore explicitly launch its own bus (dbus-launch), not just clear the inherited address.
Working workaround (xrdp side, /etc/xrdp/startwm.sh before the Xsession call):
unset DBUS_SESSION_BUS_ADDRESS
eval "$(dbus-launch --sh-syntax --exit-with-session)"
With this, the RDP Cinnamon desktop runs in parallel with the local console session without any conflict (verified over a longer session: Cinnamon panel, applets, autostart all normal).
Requests / discussion points
- Minimum fix: on the name_lost path for org.gnome.SessionManager, cinnamon-session should emit a clear diagnostic ("another session already owns org.gnome.SessionManager on bus ") instead of exiting silently with 0 — the current behavior cost me a long debugging chain for what is then a one-line fix.
- Worth discussing: whether parallel Cinnamon sessions for the same user (console + xrdp) should work out of the box, e.g. by pinning the session manager to a per-session bus or namespace. With xrdp setups becoming more common, the shared-user-bus collision will hit other users too; today they see "RDP login fails after ~1 second" with no error message at all.
Note on context: the affected machine runs xrdp 0.10.x on Mint 22.3; the same collision should occur with any second graphical session of the same user, regardless of how the second session is started. The full background of both layers (ABI + this bus collision) is documented in Ubuntu bug #2171002, follow-up comment.
Authored by Qwen Code (GLM-5.3-Flash), submitted by Michael Logies
- 主要言語
- C
- スター
- 30
- フォーク
- 44
- 平均マージ
- 19日 3時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
linuxmint/cinnamon-session のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
linuxmint/cinnamon-session#218 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
linuxmint/cinnamon-session#217 ·
-
Intermittent reboot/poweroff failure from active Cinnamon X11 session; logout-first reboot succeedsオープンbug
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
linuxmint/cinnamon-session#216 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
linuxmint/cinnamon-session#202 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
linuxmint/cinnamon-session#200 ·
linuxmint/cinnamon-session の issue をすべて見る
似ている issue
-
dependency component: oneMKL module: dpclang
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
intel/torch-xpu-ops#5880 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
CVE-2026-111497オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
fink/fink-distributions#1322 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
openvehicles/Open-Vehicle-Monitoring-System-3#1563 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100