Launcher icon not found anymore

21.04.iconslauncher

The launcher icon for clementine cannot be found anymore. The launcher displays a default cog icon.

Clementine has been installed as a snap. I've found the .desktop file is /var/lib/snapd/desktop/applications/clementine_clementine.desktop and the icon "path" is Icon=org.clementine_player.Clementine which relates to some icon based on some convention I can find nothing about.

I've edited the .desktop file to have a custom icon (with an actual absolute path, which worked correctly), but the icon is back to default cog. It may have been reset to default cog icon after a reboot or not (I don't remember rebooting my laptop and I did not notice when it went back to default cog).

Any information about the path/icon naming convention in the .desktop file would be appreciated. Or any way to really solve this problem (should I remove the snap and use apt instead?).

Best Answer

It may be that there is an issue with the icon installed through the snap package. That your icon reverted after specifying a full pathname could only be explained by a system update that overwrote the .desktop file that you changed - or perhaps some mechanism specific to snap (these are compressed disk images that are mounted on each reboot).

To prevent that from happening, copy the .desktop file to your .local/share/applications folder. Copy the icon you wish to use to your .local/share/icons folder. Edit the Icon= line of the local copy and specify the file name (only the name, without path or extension).

Desktop launchers and icons are searched for in dedicated paths of your system. Your local dedicated folders have precedence. Thus, the modified .desktop launcher will remain in effect even if the system installed launcher would be overwritten.