Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a package for a custom application and cannot get my applications icons to display. Here is my desktop file, which is installed in /usr/share/applications:

[Desktop Entry]
Name=Map Creator

I have copied images to the following locations:

  • /usr/share/icons/hicolor/32x32/apps/ntfmo-map-creator.png
  • /usr/share/icons/hicolor/48x48/apps/ntfmo-map-creator.png
  • /usr/share/icons/hicolor/scalable/apps/ntfmo-map-creator.svg

I have rebooted, but still nothing. Do you have to register the icons or something?

[EDIT] Ok, I got it to work by running sudo rm -f /usr/share/icons/*/icon-theme.cache, but that seems a little draconian. Is that the "correct" solution? Does my package need to run that after it installs? Seems a little much....

share|improve this question
I think you are supposed to call gtk-update-icon-cache as per… – fossfreedom Oct 4 '11 at 19:15
up vote 10 down vote accepted

Add gtk-update-icon-cache /usr/share/icons/hicolor to your debian/postinst file:


gtk-update-icon-cache /usr/share/icons/hicolor

exit 0
share|improve this answer
OK, thanks, this is working. Although I also noticed that ubuntu automatically updates the cache when icons are added as part of a package, but not when you manually drop them in. – Dave Oct 5 '11 at 12:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.