activation: better support for services with multiple names
Submitted by Simon McVittie
Assigned to D-Bus Maintainers
+++ This bug was initially created as a clone of Bug #35750 +++
On Bug #35750, Will wrote:
I think that would be nice (in the future) to index activation->pending_activations on the name of the .service file, not on the bus name: then one .service file could list n service names and guarantee that it'll be run at most once at a time.
and I replied:
I disagree on the specific mechanics for this: on the session bus, best-practice (iirc) is for the .service file to be named after the bus name, and on the system bus, it's mandatory for the name to be the same. I believe the reason is something to do with the setuid helper.
One way to get the same effect would be to introduce a way for the "aliases" to omit the Exec= and say "InsteadActivate=com.example.RealName". Another would be to introduce a way for ...RealName.service file to say "AlsoActivateFor=com.example.Alias;com.example.Pseudonym;" or something. In either case, we'd want to only invoke the setuid system-bus helper for ...RealName, and track pending activations in terms of ...RealName.
I believe we used to do something similar for Mission Control (the reference implementation of the Telepathy AccountManager and ChannelDispatcher services) on Maemo, where ...AccountManager.service and ...ChannelDispatcher.service used dbus-send to send Ping to ...MissionControl5, and ...MissionControl5.service did the actual launching?
This has been brought up again in a recent mailing list thread, where I said basically the same thing.