Skip to content

global: Don't create a scope for D-Bus activated applications - #13926

Open
Fantu wants to merge 1 commit into
linuxmint:masterfrom
Fantu:app-scopes
Open

global: Don't create a scope for D-Bus activated applications#13926
Fantu wants to merge 1 commit into
linuxmint:masterfrom
Fantu:app-scopes

Conversation

@Fantu

@Fantu Fantu commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

When an application is started through D-Bus activation, the launch context reports pid 0: the process is spawned by the bus, not by us. Passing that on to gnome_start_systemd_scope() creates an empty scope that never has any process in it and stays active forever:

app-cinnamon-org.gnome.DiskUtility-0.scope  loaded active running  Application launched by cinnamon

It is also pointless, since a D-Bus activated service already runs in its own unit. gnome-shell has the same guard in shell_global_app_launched_cb() for the same reason.

This has no visible effect today, only because gnome_start_systemd_scope() never gets far enough to create anything — see linuxmint/cinnamon-desktop#275. It does as soon as that is fixed, which is why it is worth landing the two together.

Testing

Mint 23, Cinnamon 6.7.4 with the cinnamon-desktop fix applied. Launching a DBusActivatable=true application from the menu creates no scope, while regular launches keep getting theirs:

  app-cinnamon-debian-xterm-18470.scope  loaded active running  Application launched by cinnamon
  app-cinnamon-nemo-18782.scope          loaded active running  Application launched by cinnamon

When an application is started through D-Bus activation the launch
context reports pid 0, since the process is spawned by the bus, not by
us. Passing that on to gnome_start_systemd_scope() creates an empty
app-cinnamon-<id>-0.scope that stays active forever, and is pointless
anyway: the activated service already runs in its own unit.

gnome-shell has the same guard for the same reason. This has no visible
effect today only because the scope is never created; it does as soon as
that is fixed in cinnamon-desktop.

Assisted-by: Claude Code:claude-opus-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant