yassinphilip yassinphilip - 22 days ago 8
Linux Question

Linux Desktop app: How can I check a package icon?

Apparently, one can refer to a program's icon solely by its name, like here:

zenity --question --text "Hello <b>world</b>" --icon-name "baobab"


Try replacing
baobab
with
gnome-terminal
and the icon will change, you may even drop the quotes. Obviously there is some kind of abstraction at work here (I like those) with a database. (I know about .desktop files, and the xdg tools]1. But is there a CLI to display (of even more hefpul: don't display it if not found, throwing an error)) those icons in such a way, like
eog baobab
? (doesn't work.) I want to do that, display the icon of the program I' displaying, sometimes said programs come from larger packages, so I have no real way to know if it's installed.


  • How can I know that the icon has not been found (important)?

  • How can I get a list of all those "installed" icons?

  • How can I test like
    chk_icon "baobab" ; $?=0
    OK

  • How can I test like
    chk_icon "installed stuff" ; $?=0
    OK



Thanks!

Answer

I was able to add a new recognized icon name by copying my icons to the various /usr/share/icons/gnome directories, by size, and THEN running sudo gtk-update-icon-cache /usr/share/icons/gnome without which the icon will still not be recognized.