Bug 64734

Summary: Terminate autolaunched X11 session bus when no longer needed
Product: dbus Reporter: sworddragon2
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED MOVED QA Contact: D-Bus Maintainers <dbus>
Severity: enhancement    
Priority: low CC: msniko14, ralf.habacker
Version: 1.5   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description sworddragon2 2013-05-18 09:05:27 UTC
Just a little notice before: I'm using dbus 1.6.10 but the bugtracker doesn't provide a selection for version 1.6. Now to the issue:

I'm using Ubuntu and I'm noticing that due to dbus some dbus-related-processes are spawned if I'm opening a major process (for example a text editor with root permissions). There are 2 types:

1. dbus itself: On opening the application with root permissions dbus starts 2 major processes for root which hasn't existed before for him: dbus-launch and dbus-daemon.

2. External applications that are defined in service files: I'm very often seeing that a major process is triggering the spawning of processes defined in these service files.


Now to the problem and my feature request: If I'm closing all major processes the user-dependend dbus-processes from #1 and the external processes from #2 will still remain. Over time this will bloat up my system with processes that could be safely closed. dbus should track this and if all related major processes are closed dbus should remove the processes from #1 and #2. To prevent in this case a lot of forking there could be maybe an idle timeout (which would be ideally configurable).
Comment 1 Simon McVittie 2013-05-20 10:13:20 UTC
(In reply to comment #0)
> I'm using Ubuntu and I'm noticing that due to dbus some
> dbus-related-processes are spawned if I'm opening a major process (for
> example a text editor with root permissions).

I believe the current advice is "don't run GUI applications as root". If it happens to work, great, but it isn't a well-supported use-case.

> 1. dbus itself: On opening the application with root permissions dbus starts
> 2 major processes for root which hasn't existed before for him: dbus-launch
> and dbus-daemon.

For reference, this is "autolaunching"...

> 2. External applications that are defined in service files: I'm very often
> seeing that a major process is triggering the spawning of processes defined
> in these service files.

... and this is "service activation".

> Now to the problem and my feature request: If I'm closing all major
> processes the user-dependend dbus-processes from #1 and the external
> processes from #2 will still remain. Over time this will bloat up my system
> with processes that could be safely closed.

This is a valid feature request, but it's unlikely to be implemented.
Comment 2 Simon McVittie 2017-02-13 14:56:48 UTC
*** Bug 99751 has been marked as a duplicate of this bug. ***
Comment 3 GitLab Migration User 2018-10-12 21:15:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/82.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.