How can I change the icon of an application in the Unity launcher?

For Ubuntu 11.10


The first thing you would need to do is take a .png icon file that you would like to use and copy it to the respective ~/.local/share/icons/hicolor/ directory. This will contain the following directories (which are the dimensions of the icons) : 16x16/apps/ 32x32/apps/ 48x48/apps/

I downloaded a free 16x16 free icon sampler and picked a 16x16 icon called Alien.png

I took the Alien.png file and copied it to ~/.local/share/icons/hicolor/16x16/apps, When you copy yours, you can do that through either the GUI or terminal.

From there you would need do the following in a terminal (you may need sudo to copy this over):

cp /usr/share/applications/pidgin.desktop ~/.local/share/applications/

Next edit the pidgin.desktop file:

vi ~/.local/share/applications/pidgin.desktop

Look for the line that says:

Icon=pidgin

This will need to change to the new icon name without the .png prefix...

Icon=Alien

Save your changes... Then logout and log back in.

Please let me know if this helps or if you need more assistance.


The way that I did it was go to /usr/share/applications/<whatever app your looking for> then right click to properties click on the icon on the left and select the image that you want to be the icon.

You will have to sudo nautilus to edit the icon. Then just exit and search the program in Unity and it will show up with the selected icon.


For Ubuntu 12.04


In addition to the excellent answer given by itnet7, I would like to add that in Ubuntu 12.04 I had to also add ~/.local/usr/applications/icons/hicolor/64x64/apps in order for Unity to see the icon.

To resize your custom icon, you can use the excellent imagemagick package.

sudo apt-get install imagemagick

Then run the command mogrify -resize 64x64! myImage.png in order to get your custom icons nicely scaled down to the desired resolutions.

If you run the command below after creating the desktop icon and locked the application to your launcher, it will update unity without a need for a reboot.

unity --replace & 

as described here: application locked to launcher without icon

Tags:

Icons

Unity