Proposal for an intent-apps spec
Thomas Kluyver
thomas at kluyver.me.uk
Thu May 6 09:12:47 UTC 2021
Hi David,
On Thu, 6 May 2021, at 09:35, David Faure wrote:
> > Of course, a launcher may
> > have a hardcoded default for specific interfaces it recognises - e.g. KDE
> > might pick Konsole for org.freedesktop.Terminal1 - but it should be
> > prepared to handle interfaces it doesn't know.
>
> Not sure what you mean. The only (DBus) interface that we expect to use for
> this is org.freedesktop.Terminal1. Maybe you meant "implementation" rather
> than "interface"? In that case I agree, see below.
I did mean 'interface' :-) . I was just trying to say that the launcher (/desktop) wouldn't have a hardcoded default for every interface it has to handle. That's probably self-evident, and your edit resolves this concern.
> > - Pick the default in a simple, consistent manner (e.g. first desktop file
> > sorted by name), and make it obvious how the user should set their
> > preference if they don't like it.
> > - Pick an arbitrary default, and then
> > write it as the preference in XDG_CONFIG_HOME, so the same application will
> > be used until the user picks another one (or uninstalls that one).
>
> Or Eli's suggestion of a GUI to ask the user.
>
> In my opinion, all three possibilities make sense, but should only be
> recommendations for an implementation specific behaviour. We don't need to
> actually specify this part.
Yup, I agree - this is a recommendation rather than a specification. I like what you've written for this now. Given the confusion with the equivalent case in mime-apps, I might add a sentence like:
"However, whatever we do should give a consistent result, e.g. it should not depend on the order of an unsorted list of files from a directory."
I'm not sure about the last sentence you've now added:
"A similar algorithm, apart from stopping at the first success, can be used to list all available implementations of the intent."
I don't think it can, because, there's no reason to think that a given implementation is listed in any intentapps.list file. As things stand, to find all implementations, you would have to scan all desktop files. It would be possible to build a cache like mimeinfo.cache, but that's a separate concern from selecting the preferred application.
Best wishes,
Thomas
More information about the xdg
mailing list