Showing a file in the file manager
stefbon at gmail.com
Fri May 20 14:31:37 PDT 2011
2011/5/20 Kevin Krammer <kevin.krammer at gmx.at>:
> On Friday, 2011-05-20, Jannis Pohlmann wrote:
>> On Fri, 20 May 2011 22:57:57 +0200
>> Stef Bon <stefbon at gmail.com> wrote:
>> > Ok, I understand. I'm not very familiar with dbus.
>> > But then still somewhere has to be defined that the app which is
>> > assigned to open the url.
>> > That depends on what. The environment?
>> With D-Bus that depends on which application is installed that
>> implements the D-Bus interface in question. I don't really
>> know what happens if several such applications or services are
>> installed. The decision which one to start depends on D-Bus
>> in that case.
>> Applications can hard-code which of the alternatives to use but the
>> entire (or at least an important) point of standardized APIs is to avoid
> For interfaces that many applications could provide and which might differ on
> a per-user basis due to personal preferences, an alternative mechanism to D-
> Bus activation will have to be provided.
> For example by performing a query for preferred service similar to what xdg-
> mime can do and then launching that explicitly or by asking a central broker
> like service to launch the preferred service for a given interface.
I think the best sollution here is that not the desired app is
launched, but some wrapper script.
That will read the preferences for the environment, choose the
preferred app and launch it.
That will take the decision off from dbus, to the wrapper script.
But then we're back at where we began, a script to launch...
Maybe another sollution: make the current scripts try to look to dbus,
if there is the configuration present for the default app for file
browser, launch that one.
If dbus is not present, or the configuration of default apps is not
available here, do the default what now happens.
More information about the xdg