Separate the frontend and backend for package administration completely and communicate using dbus.


Installing a package should not block the UI of the application being used, be it gnome-app-install or synaptic.

Using dbus for the communication with the package management system, allows us to write package manager system neutral frontends. Furthermore the frontends can be written in all languages that have dbus bindings - no bindings for apt or smart are needed anymore.

Use cases

  • Jim wants to install a package, but also wants to keep browsing through the catalogue. As he has dialup, he knows it is going to take a while for it to download.



We write two small helpers: package-manager-progress and package-manager-daemon.

The frontends communicate with them via dbus. So if you want to e.g. install a package in gnome-app-install, g-a-i calls the method InstallPackage of the session dbus interface of package-manager-progress. Since probably p-m-progress isn't running at the moment it will be launched by dbus by dbus activation automatically. p-m-progress shows a gtk.StatusIcon in the notification bar and a progress window if you click on the status icon.

In turn p-m-progress calls a another dbus method of the p-m-dameon to actually perform the installation, since p-m-progress still runs as normal user. We can allow all users of the group admin to write to the dbus object - the whole security part is already implemented in dbus and also used for e.g. network-manager. Again p-m-daemon would be launched by dbus-activation.

The frontends check for a listening pm-daemon and if it currently performs some actions we disable all OK and APPLY buttons in user interface. In the long term we could think about adding a package action queue.

P-m-daemon could be a python programme using the apt python bindings or an enhanced smart that would be aware of dbus.

The inital wish list item:

There is currently work done on a long task manager (progress viewer) for GNOME. If available it could be used by p-m-progress in a GNOME session alternatively:


  • Add dbus communication to smart
  • Add ability to communicate over dbus to gnome-app-install, etc.
  • Use the hopefully coming long task manager for the progress visualisation.


pm-daemon.conf : Allow all admin users to write to the system dbus object of the package manager (located in /etc/dbus-1/system.d)

org.ubuntu.PackageManager.service : A dbus activation configuration for package-manager-daemon (located in /usr/share/dbus-1/services/)

Data preservation and migration

Unresolved issues

  • How to represent the queued packages/applications in the user interface of the frontends?
  • Sudo'ed applications cannot to use the current session dbus.
  • How to route the console stdout|stdin through dbus? Or using another ipc?

BoF agenda and discussion


BackgroundPackageInstallation (last edited 2008-08-06 16:24:37 by localhost)