Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

cinnamon-session exits silently (exit 0) when org.gnome.SessionManager is already owned on the shared user bus — parallel graphical session (xrdp)

オープン
#222 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
40/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, linux
領域
desktop

調査の方向性

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)

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

  1. 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.
  2. 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/cinnamon-session のほかの issue

linuxmint/cinnamon-session の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。