Question on service activation
Thiago Macieira
thiago at kde.org
Fri Feb 23 15:52:38 PST 2007
Kevin Krammer wrote:
>> No, I don't think it should install those files. Many applications
>> installing aliases would just confuse D-Bus and would be a problem
>> with setting defaults.
>
>Then it is not an option.
What I mean is: there's only one default. You can't have Kontact,
Evolution and Thunderbird all installing aliases for
org.freedesktop.Email.
There has to be a way -- external -- that says which one is the default. I
had thought of the .service file as a way to point out which one that is,
i.e., save the config.
That specifically means the applications cannot install those files,
because they don't know what the user wants.
Ok, here comes:
1) when installing itself, none of those applications install the alias
2) when first run, it will check if it got the alias. If it didn't, it'll
check if there is a default.
3) if there is no default, it'll install a .service alias file in
~/.local/dbus-1/services, making itself the default. Then it shall call
ReloadConfig on the bus, which will cause it to obtain the name.
Question becomes: can we automate those steps #2 and #3?
I.e., "AddMeAsDefaultForAliasIfNotTakenAlready" ? We can even support
those annoying Windows-like "Hey, application FooBar isn't your default
Fooificator. Do you want to make it so?"
Desktops may choose a default for newly-created users by their own means,
either by the AddActivatableService method, or by creating the
~/.local/dbus-1/services alias file in the first run. (The latter method
would make it permanent even if the user later decided to switch
desktops, so I wouldn't recommend it)
Desktops may also choose to point the default to a tool that will ask the
user to choose a default, when first invoked. This may be a bad idea
depending on the interface's contract: if an application were to make a
method call and expect a reply, 25 seconds would be too short.
Admins may choose defaults by adding them to /etc/skel or
to /usr/share/dbus-1/services.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070224/02058554/attachment.pgp
More information about the dbus
mailing list