Help, my app icon is missing!

I was in this situation recently: An application icon would not show up in GNOME shell, even after I double- and triple-checked that I did all the right things:

  • Installed the desktop file with the right name in /usr/share/applications
  • Installed the icon with the right name in the hicolor icon theme
  • Make sure that Icon key in the desktop file has the right name
  • Restart GNOME shell (this is necessary due to a bug where GNOME shell will not reliably pick up  desktop file changes)

Still, I just get the generic executable icon: missing-icon1

GNOME shell to the rescue

I asked GNOME shell maintainer Florian Müllner for help. He said: GNOME shell is probably picking up a stale desktop file from somewhere.

But from where ? I checked all the locations listed in XDG_DATA_DIRS to no avail.  At this point, I was getting desperate,  so I went back to Florian. He said: Just use looking glass to find out! If you don’t remember, looking glass is a pretty handy debugging console that is built right into GNOME shell. You open it by typing the command

lg

Into the Alt-F2 run dialog.

missing-icon2This brings up the looking glass. Here is how it helped me solve my problem:

missing-icon3I switched to the window tab, then clicked on the application in question, and hit the ‘Insert’ button. That binds the object to a variable named r(x) (for some number x)  in the Javascript evaluator.

Going there, I then typed the command

r(3).app_info.get_filename()

And that showed the problematic desktop file:

missing-icon4I removed that file and restarted the shell once more, and now everything is working as it should:

missing-icon5Thanks, looking glass!

10 thoughts on “Help, my app icon is missing!”

      1. I see, thanks. Thing is I wanted to get some info about an “untracked” app (I guess it’s some binary with a embedded icon), to see if I could change its icon (Mathematica 11 in this case).

  1. And my main question out of all of this is…”Gnome Recipes”? This is the first I’ve heard of such a thing what’s the status, I can’t seem to find anything on it. I’ve been looking for a good replacement for Gourmet Recipe Manager, and have even considered starting a project myself, but it hasn’t been a priority.

  2. > Restart GNOME shell (this is necessary due to a bug where GNOME shell will not reliably pick up desktop file changes)

    Out of interest, is there a BZ# for this? I ran into it recently, and figured it out, but doing this is somewhat disruptive, so it would be very nice to have a more targeted way to apply changes from .desktop files.

Comments are closed.