There's a similar question on Stack Overflow, the reason my question is different is that I can't be certain that the path to an icon will always be the same (for example, some themes use SVG, some use PNG).
I would like to get a full path to an icon from a bash script knowing only its name.
What I mean by name is the one that's used in desktop entries.
For example, here's a line from a firefox.desktop file on my Ubuntu:
Icon=firefoxSomehow that's enough for my system to figure out exactly what the path to an icon is. How can I leverage this functionality in my scripts?
Just in case, I'm using Ubuntu 18.04.
01 Answer
A search for "gnome desktop file format":
- brought me here: Desktop files: putting your application in the desktop menus - GNOME
- which links to here: Desktop Entry Specification
- which, in the "Recognized desktop entry keys" chapter, links to here: Icon Theme Specification
- which is where I gave up.