Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to replace the synaptic icon (although it could be any other).

I have found the Desktop Entry, Icon Theme and Icon Naming specifications that gnome follows (somewhat?), but even though I've been reading for a while now, the time has come to ask.

In /usr/share/applications there is "Synaptic Package Manager", and it contains Icon=synaptic. Now, I kinda guess that I maybe know that the dock uses the 48x48 size of icons, but when I put both "synaptic.svg" and "synaptic.png" (because I don't know how to figure out which extension is being looked for), even a plain "synaptic" in my 48x48 theme folder (and others, and other themes... etc, even using ~/.icons to be sure it gets looked up first), guess what?

The icon doesn't change.

Not even after a lot of gtk-update-icon-cache whatevertheme both in usr/share/icons and in $HOME/.icons

I'm a bit confused. It's a freaking icon. I've sudo find / -name "*synaptic*"ed and all, (restart included), but I don't see the icon that is actually being used. There must be something that I'm missing...

So I turn to you. It can't be this crushingly impossible to find out what icon is being used. I'm open to consider attaching debuggers and/or dissemblers if necessary (that could be memorable), but I have made the decision that I'm gonna change that icon.

Would you please help me, if you can? I will thank you a lot.

This is Ubuntu 10.04 LTS, the theme is "elementary", and my computer is a pretty standard Acer laptop.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

To change the icon of an application it is often better to just use a custom .desktop file in the user's home directory rather than changing icon files in the system-wide icon themes. It is also advisable to not edit a .dektop file in /usr/share/applications as this may be reset any time (e.g. by an update).

A good approach to display a different icon, and without the need of root permissions or tampering with root directories is to just copy any application's .desktop file to ~/.local/share/applications.

We can then edit the desktop file with any editor to change the path to our custom icon:

Icon=/full/path/to/icon  # or name of icon

We have to grant this .desktop file permission "Allow executing file as program".

After logging out and log back in the settings in ~/.local/share/applications will override system wide settings and our desired icon will be displayed.

share|improve this answer
add comment

Open synaptic.desktop file using the following command:

sudo -i gedit /usr/share/app-install/desktop/synaptic:synaptic.desktop

and change the line:

Icon=synaptic

with:

Icon=/path/to/new/icon

Save the file and close it. It does not matter what extension has icon (.svg, .png, etc), the important thing is that the path to the new icon (inclusive its extension) to be introduced correctly.

That should be enough.

share|improve this answer
    
Of course. I was born dumb. Really, thanks. –  ferhtgoldaraz Oct 19 '13 at 19:40
add comment

Your Answer

 
discard

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.