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

Matthias Klumpp matthias at tenstral.net
Fri Oct 9 14:17:07 UTC 2020

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


[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