Ubuntu – How to add icons to the hicolor icon theme manually

iconsthemesUbuntu

I am running Ubuntu 12.04 32-bit.

My problem:

I'm trying to manually add an icon to hicolor (default) icon theme.

The only icon I have a 32×32 version of this icon.

I've tried going about this by simply adding a .png file in the /usr/share/icons/hicolor/32x32/apps/ folder.

But, when I try to reference that icon in a .desktop file, like so:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Some App
Name[en_US]=Some App
Icon=icon-name
Exec=app-executable
Comment[en_US]=Description.

The .desktop's icon just shows up blank.

I have logged out and rebooted several times.

What do I do?

Best Answer

In your case do you need to update the icon cache of the hicolor theme with the following command:

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

But you can add icons (to the hicolor theme) without touching system files adding your icon to $HOME/.local/share/icons/hicolor/32x32/apps, and thus is not necessary to update the icon cache to take effect, just stop the file manager (Nautilus) with:

nautilus -q

And launch it again