Expand os-release spec with LOGO

Lennart Poettering mzkqt at 0pointer.de
Mon Oct 8 09:37:03 UTC 2018


On So, 07.10.18 15:39, hellcp at opensuse.org (hellcp at opensuse.org) wrote:

> Hi,
> 
> A few months ago a discussion happened about changing display logo for Gnome
> depending on os-release file [1].
> 
> However spec [2] doesn't cover DEs wanting to add items to it, just OSes,
> which
> will still not be great, if support would have to be extended to SUSE_LOGO,
> DEBIAN_LOGO, UBUNTU_LOGO etc.
> 
> KDE does this by having that stuff specified in /etc/xdg/kcm-about-distrorc
> [3],
> which is not great, because again, it's kind of info that easily could be in
> os-release for every DE and app that might need it. Both DEs require
> information
> about logo location, would be nice to provide it once, for all that might
> require
> it in the future.
> 
> Suggestion I would give about it would be to allow for either full path or a
> name to be used with xdg-icon standard.

The man page (which is also the spec) os-release(5) is maintained as
part of systemd btw, it's probably better to discuss this request in a
github issue.

The request generally makes sense to me, but I am a bit unsure about
how this should actually look like.

What value should the field take? Some options:

1. An embedded base64 blob? (probably not, might grow too large; also
   doesn't support multiple resolutions)

2. A path to some SVG or PNG file? (Not sure, might not be a good fit,
   as the path to a single bitmap probably wouldn't cover the
   necessities for multiple resolutions that well. Also, instead of
   embedded a file path in the os-release file, I think it would be
   more natural to simply define /{usr/lib|etc}/os-logo.{png|svg} or so
   instead, i.e. standardize the name and expect the same search path
   logic as for /{usr/lib|etc}/os-release itself.

3. A "named icon" according to the icon naming/theming specs?
   [https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
   and
   https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html]
   (this would solve the resolution problem, but maybe might be a bit
   overkill, a logo is not an icon after all, and "themed logos" are a
   weird concept...)

Maybe a combination of option 3 and the os-logo.{png|svg} idea could
work, so that downstreams can choose whether they want the
comprehensive solution or the easy and slightly sloppy one.

This also reminds me of this:

https://blog.verbum.org/2008/07/28/etcfavicon-png/

Which to my knowledge never got much traction but still makes me
wonder whether any new spec should cover that use case too, since it's
so very similar.

I'd be willing to merge something like this for os-release(5) if this
makes sense to everyone. Please prep a PR adding this to the xml
docbook of systemd:

https://github.com/systemd/systemd/blob/master/man/os-release.xml

(if we go the os-logo.{png|svg} route then I figure this should have a
new man page of its own)

Lennart

-- 
Lennart Poettering, Red Hat


More information about the xdg mailing list