RFC: Application icons/desktop files and their respective tools and specifications

IFo Hancroft lists at ifohancroft.com
Sun Jun 14 00:14:26 UTC 2020


I have noticed a couple of things trying to fix a recently installed
application's icon that wasn't working/showing up in my menu and this
brought a couple of questions and points I'd like to hear your opinions on:

1. The Desktop Entry Specifications says the name of a .desktop file
should use be a valid D-Bus well-known name, and follow the reverse DNS
convention for the for the author and dot and then CamelCase. I.e: OBS
Studio from obsproject.com should be com.obsproject.OBSStudio.desktop
(although that's a weird example as the first word in the software's
name is all capitals as it's an abbreviation).

It also says that a dash in the name is discouraged and even goes as far
as to say that when identifying a desktop file's ID, you make its full
path relative to $XDG_DATA_DIRS, remove the 'applications' part and turn
'/' into '-', i.e if you have an application called 'bar' in folder
'foo' in /usr/share/applications/ you need to turn bar.desktop into
foo-bar.desktop and that's its desktop file id.

Then why do the xdg-desktop-menu, xdg-desktop-icon tools search for the
vendor in the form of 'vendor'-'applicationname'.desktop?

2. The Icon Naming Specification mentions that an application's icon's
name should be its binary's name unless it uses a generic icon, however
there is no mention of vendor, but the xdg-icon-resource by default
looks for a vendor and it does so in the form of
'vendor'-'applicationname'.'extension'.

Should there be a vendor, like should the tool be looking for vendor?

If it should - should it use the current form or should it use the same
form as the name of a desktop file as mentioned in the Desktop Entry
Specification (except the uppercase part as the Icon Naming
Specifications clearly says lowercase only)?

3. The AppStream Specification allso says the id in the file (which is
also used for the file name before the extension) should be in the form
of com.obsproject.obsstudio (all lowercase) but again the tool looks for
the vendor prefix separated from the name with '-'.

TL;DR:

1. The Desktop Entry, Icon Naming and AppStream Specifications each want
the name in a certain way, but the applications in xdg-utils
implementing them want the names in a way that isn't correct according
to the specifications.

2. The Icon Naming Specification doesn't mention a vendor but the
xdg-icon-resource tool looks for one

P.S.

When using any of the mentioned tools, to install a file (.desktop for
the xdg-desktop-menu or xdg-desktop-icon, a .png or .svg for
xdg-icon-resource, etc) do the applications do more than find the
correct folder on the system and put the file there (I mean besides
validating the name format)?

Also, same question for the update and for the remove commands?

Best Regards,
IFo Hancroft


More information about the xdg mailing list