Specifying sensible device types to use an application on in the desktop file

Guido Günther agx at sigxcpu.org
Fri Oct 9 16:02:58 UTC 2020

Hi Matthias,
On Fri, Oct 09, 2020 at 04:17:07PM +0200, Matthias Klumpp wrote:
> Am Fr., 9. Okt. 2020 um 13:29 Uhr schrieb David Edmundson
> <davidedmundson at kde.org>:
> >
> > In terms of prior art within Plasma we have:
> > `X-KDE-FormFactor`
> >
> > Values are "desktop", "handset", "tablet", "mediacenter". Though arguably it's expandable freeform text.
> > Then this acts as a filter just like the OnlyShowIn key does.
> >
> > It shows there's clearly a valid use case.
> I should note that there is an ongoing effort to get this information
> into the AppStream XDG specification. We already have support for
> specifying which user input controls an app supports[1] and screen
> sizes are next. We initially had discussion about defining things like
> "handset" "tablet" "phablet" "watch" etc. but that was deemed far too
> inflexible and not future proof, in addition to not even single
> vendors having a clearly defined standard on what a specific form
> factor even means.
> So within AppStream, apps will highly likely in addition to defining
> their user input methods also be able to set preferred screen sizes
> with an upper and lower limit.
> Having this in the desktop-entry files as well is certainly an option
> too, but I do wonder, especially given that we can generate some
> desktop-entry files from metainfo files already, whether it would make
> sense to define this in AppStream and have desktop environments just
> read this information from the AppStream cache (counterargument to
> this of course being that DEs would then have to support two formats
> to launch some apps, which is a bit less elegant).

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).

 -- Guido

> Cheers,
>     Matthias
> [1]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-control
> -- 
> I welcome VSRE emails. See http://vsre.info/

More information about the xdg mailing list