DBus System Activation

For the last few days I've been working on DBus system activation, extending and slightly modifying on the work David Zeuthen did a few months ago. So what is is?

You already see activation working in the session, for instance where notify-send can get dbus to start notification-daemon only when a notification needs to be shown. The bigger problem was to launch stuff on the system bus under different users. Securely.

We think we've worked out how to do this securely, but further review would be lovely. The patch is here, and I've got a SRPM also here.

So what?

  • We can launch helpers to do things as different users, for instance use a combination of PolicyKit and a system helper to set gconf defaults for all users. We can do some cool things with this.
  • We can launch some automatically, only when required. For instance, we only need to start ConsoleKit when HAL is started, and this is done automatically for us on the first method that HAL requests from the ConsoleKit service.

So, for a non-legacy system (think OLPC) we can just do:

  • kernel….udev….messagebus….login-screen

And that is it. As sugar (or another interface) requests the network state, then NetworkManager is started. This calls into HAL, so that is started. That calls into ConsoleKit, so that is started. As soon as we are on the network, we search for users, which queries avahi, so that is started. Can you see where this is headed? Parallel start-up with dependencies essentially for free.

Already, I've taken my Fedora 7 boot time from 20 seconds to 14 seconds by dropping a few service files in directory and turning off services in chkconfig. That's pretty substantial in my book. I've yet to build this for OLPC, but I'm guessing it will be a more substantial reduction.

One response to “DBus System Activation”

  1. Anonymous

    20 seconds? I'll be glad when my Fedora 7-carrying new dual-core laptop boots in under 2 minutes! I really appreciate all the work you and others do to improve my computing experience :)

Bad Behavior has blocked 2769 access attempts in the last 7 days.