Change Icon of a manual Launcher

Asked by JayBofMA on 2011-04-28

I would like to use an applications icon on Docky, but Ubuntu uses a system icon for a manually created launcher. Is there a way to change the icon like there is in Cairo?

Question information

Language:
English Edit question
Status:
Solved
For:
Docky Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Dyer
Solved:
2011-04-29
Last query:
2011-04-29
Last reply:
2011-04-29
Samuel Hsu (yshsu168) said : #1

The docky will use the sample_app icon specified in /usr/share/applications/sample_app.desktop.
Take skype for example, you can manually edit the /usr/share/applications/skype.desktop to set the desired icon.

Robert Dyer (psybers) said : #2

Ignore what he said.

For any manually created launchers, you need to edit THAT launcher. These typically reside in ~/.local/share/applications - you don't want to edit the global one, as it might get overwritten when that package updates.

JayBofMA (jayburrill) said : #3

Yes, I found the instructions from samuel to be of no help....

JayBofMA (jayburrill) said : #4

Robert - Interstingly enough I find a .desktop file for one of my custom launchers. But thsi seems to be one that I created before using Docky, and not one that I created more recently. And although the file includes an entry for an Icon, that Icon is not used by Docky; Docky still uses the Economy Theme icon for a launcher.

JayBofMA (jayburrill) said : #5

I found Cairo a little difficult to position the way I like (Display 0 to right) when Display 0 is to the left of Display 1 and they are of different resolutions; Cairo seems to center on the larger dimension. So I switched to Docky, which is a little better in that respect. But I have several apps for which I need custom launchers (SQL Developer and soapUI for instance), and I can't have them all using the default icon.

Best Robert Dyer (psybers) said : #6

If the custom launcher(s) are in ~/.local/share/applications and have the Icon= set to what you want, but Docky still shows the generic app icon, then what that means is Docky is not able to match the windows for those applications to the launcher. Please file a bug *for each application* and make sure to include:

- the (custom) launcher for the app
- output of: ps -ef | grep <app> (where <app> is the executable name)
- output of: xprop | grep WM_CLASS (after you run this youll have to click on the app's window)

JayBofMA (jayburrill) said : #7

OK.... I was able to get around this by creating a launcher in the Applications menu. Then I was able to drag/copy that launcher onto Docky. I am not sure why, but when I created the launcher on the Desktop, Ubuntu/Elemantary used the default icon. But when created on the Applications menu, it seemed to take on the correct icon (as in a manual install of Eclipse or SQL Developer.) In the end, I see that I can get to having a launcher on Docky as I like it. So sorry for the back and fourth. I see no need to create a bug. IMHO this is a user issue as opposed to a bug. Now to just apply a different icon to SQL Developer as the one shippped is ugly ;-)

Thanks for your help Robert.

Robert Dyer (psybers) said : #8

Docky only looks for launchers in the standard paths (/usr[/local]/share/applications, ~/.local/share/applications). Thus if it is on the desktop Docky won't see it and use it.

I had the same problems a few weeks ago, but was able to solve it by editing the icon path for the desktop launcher file. In my .desktop files I noticed I had two lines specifying which icon to use for the launcher. One at the bottom that said "Icon=" and that pointed to the icon I wanted to use. Then there was another line that said "Icon[en_US]=" that pointed to the default launcher icon. By editing this path to the icon I wanted to use (which, by the way, is in /home/pictures) I was able to get docky to use the correct icon.

Hope that helps!

Joel