I've installed Eclipse from the Ubuntu Software Center and things are working as expected apart from one little thing, the icon in the Unity launcher. As you can see from the image below the icon is the default one and it should be the one shown on the desktop as this is the one I prefer. I've done an updatedb, located all eclipse.png files and replaced them with the new one and still the default icon shows. Is there some kind of cache that the launcher uses? Thanks in advance.
I have the feeling that Unity indeed "caches" the icon used. But I guess the real problem is that you forgot to change something in the application launcher or icons.
To identify where the launcher is stored , first open Eclipse. Alter that, in a terminal use the following command:
Your mouse cursor should change to a cross. Then click on any part of the Eclipse window. You should get a lot of text (like the ASCII version of the icons used). There find for
NET_WM_DESKTOP_FILE. In my case I get the following:
_NET_WM_DESKTOP_FILE(STRING) = "/home/<myusername>/.local/share/applications/eclipse_android.desktop"
Then just open that file (you may need root permission) and check you are really using the correct icon.
Also note that the Eclipse icon probably should be stored in many different sizes, so you will need to replace everyone. Using
apt-file I get the following:
$ apt-file search eclipse.png eclipse-platform-data: /usr/share/icons/hicolor/16x16/apps/eclipse.png eclipse-platform-data: /usr/share/icons/hicolor/256x256/apps/eclipse.png eclipse-platform-data: /usr/share/icons/hicolor/32x32/apps/eclipse.png eclipse-platform-data: /usr/share/icons/hicolor/48x48/apps/eclipse.png eclipse-platform-data: /usr/share/pixmaps/eclipse.png
As those files probably will be rewritten in any Eclipse update, probably it is easier if you place your custom icon in
/usr/share/icons for example, and just replace the
Icon stanza (from the Eclipse .desktop) with the full path to that icon.
If the problem is indeed caching, then I really don't know how to fix it.
As I know (and see in 13.04) Unity doesn’t use cache for app icons and if you change an app icon, the change will be shown in few seconds.
To change the icon permamently, simply put the SVG or PNG into
~/.icons – create one if it doesn’t exist. The name of SVG/PNG should be the same as in .desktop file, in this case eclipse.