Ubuntu 12.04, xfce4. I run commands from the command line, not from a launcher. (This shouldn't make a difference, but some replies have assumed I want to click on a launcher and that's not the point.)
What I want: when I run the program /usr/bin/zathura (a PDF viewer), I'd like to see the icon zathura.png appear for each window in the windows menu (the menu triggered by middle-mouse on background, or the one triggered by control-Tab to cycle through windows).
This isn't happening! Instead I'm getting a generic icon.
What I've done:
Placed the icon
zathura.pngin/usr/share/app-install/icons(which already contains the iconokular.png, which shows properly when I run okular).Added the line
Icon=zathurato the file/usr/share/applications/zathura.desktop(again in imitation of a similar file, okular.png). NOTE: following Tim's suggest I've replaced the imitativeIcon=zathuraby a full pathname. The file, in its entirety, is this:[Desktop Entry] Version=1.0 Type=Application Name=Zathura Comment=A minimalistic document viewer Exec=zathura %f Terminal=false Categories=Office;Viewer; Icon=/usr/share/app-install/icons/zathura.png Keywords=PDF;PS;PostScript;DjVU;document;presentation;Restarted the window manager (logged out and back in).
Made not the slightest difference!
I then set out to try to break the okular icon to see if I can find where the icon gets associated to an executable. I can't break it! For instance, if I copy /usr/bin/okular to /usr/bin/fooooo and call that new executable, the window thus created still gets the okular icon, even though there is no fooooo.png or fooooo.desktop, or any .desktop with Name=fooooo or Exec=fooooo.
Where is the association between the executable and the icon made?
NOTE: The point is not for the icon to appear on the desktop.
It makes no difference to me whether it appears there or not.
(My desktop shows the contents of my home directory.)