Specifying sensible device types to use an application on in the desktop file
matthias at tenstral.net
Tue Oct 20 04:48:08 UTC 2020
Am Fr., 9. Okt. 2020 um 18:03 Uhr schrieb Guido Günther <agx at sigxcpu.org>:
> I was thinking about appstream but my understanding is that as of today
> the desktop file is the canonical place for such information but it
> clearly would make sense to get that information from the appstream
> metadata (and if only at package build time where the appstream and
> desktop file are in the same source tree anyway so there's no need
> to maintain that in two places - if there's agreement about
> the specs).
The desktop-entry spec would very much be the right place for it as
well, but it would also duplicate information in the AppStream
metadata. Desktop-entry files can already be generated from metainfo
files (`appstreamcli make-desktop-file`) since metainfo files contain
*most* of the information that also is in desktop-entry files. There's
some stuff from desktop-entry files though that makes zero sense in
metainfo files (like the "Desktop Action" stuff), and some stuff from
metainfo files that makes no sense in desktop-entry files (like long
descriptions of apps).
AppStream specifies all metadata about an application that you need to
know before you install it, desktop-entry files contain all the
information that is needed for launching the app from a shell and
integrating it into the UI.
However, if AppStream would already do what you want (and it pretty
much needs to do that, as this is metadata you definitely want to know
before installing an app), the question is whether you could just
query the metainfo data instead of adding a new desktop-entry field.
I see good arguments for both ;-)
I welcome VSRE emails. See http://vsre.info/
More information about the xdg