Changing application icon in window buttons XFCE panel item

13,653

Solution 1

I think the only way is to change the "icon set", in XFCE it's under the

"Settings Manager" -> Appearance -> Icons

(I'm not sure how to create a new custom icon set though, that's probably answered in another question or website somewhere)


Or maybe I missed the icons that you want changed... the minimize - maximize - close buttons?

They can be chanced with other themes in the

"Settings Manager" -> "Window Manager" -> Style

Settings page (and you can re-arrange & pick the visible buttons too).

Solution 2

use xseticon, e.g. for a window named htop

xseticon -name Htop /usr/share/pixmaps/htop.png

put it in a shellscript (make it executeable) and point your .desktop file's Exec= line to it

xterm -T Htop -e htop 
sleep 1;
xseticon -name Htop /usr/share/pixmaps/htop.png 

Solution 3

sorry for necroposting but I think this is relevant.

So I think the issue here arises from the fact that the icon name and the program name differ in .desktop file.

For example, I have my own app I am developing and I wrote a .desktop file for it. At the start, my Exec line contained the path to the executable at /usr/bin and Icon line had a path to /usr/share/pixmaps/. However the name of the executable was slightly different than the icon name itself. The program, when installed, shows the icon in Whisker menu and if I put the shortcut file on desktop, however no icon was shown when the program was running, only that blank icon - white window thingy.

Once I named my icon exactly like my executable name the icon started showing in the window buttons plugin on xfce panel.

I've tested this with Skype and Slack which show their icons correctly when installed because as mentioned before, the entries in .desktop files for Exec= and Icon= lines have the same name. Then I proceded to rename those icons and as expected their icons no longer showed in window buttons.

I'm on Xubuntu 20.04.1, Xfce 4.14.3.

Hopefully this helps someone!

Share:
13,653

Related videos on Youtube

Donovan
Author by

Donovan

Updated on September 18, 2022

Comments

  • Donovan
    Donovan over 1 year

    I changed the icon for some applications by editing their .desktop item and specifying the new icon. This works, because the new icon is shown correctly in the whisker menu (in the list of favorite applications, for example).

    However, when the application is open, the icon shown in the xfce panel (in the window buttons item) is still the old one. Is there a way to change it also there?

  • Donovan
    Donovan over 9 years
    Thanks for your answer. I did change the set, but some applications (for example Spotify) kept their old icon. So changing the desktop item fixed at least menus, but not the window buttons icons.
  • Xen2050
    Xen2050 over 9 years
    I tried a few different icon sets in Linux Mint XFCE too, it's got about a dozen different sets, but some programs (like pidgin) don't seem to change for any of them (not even the high-contrast B&W one), not sure why, maybe they're not "popular" enough to whoever makes the icon sets
  • Xen2050
    Xen2050 over 9 years
    Think I got the settings for the theme for those buttons - there's about 100 different Themes in Mint XFCE, but I haven't added them manually before, probably in some package somewhere
  • Donovan
    Donovan over 9 years
    No, I meant the application icon with the name in the side that is in the panel when the application is open.
  • edison23
    edison23 over 2 years
    xseticon isn't in *ubuntu repos but I found some instructions in the tools original (?) repo: github.com/xeyownt/xseticon
  • Scott
    Scott about 2 years
    One thing he left out was you need a & after the xterm line or xterm stays active and the next two lines of the shell command will never execute
  • saulspatz
    saulspatz about 2 years
    I'm tried to follow your advice, but it didn't work for me. Please look at askubuntu.com/questions/1401203/… I tried copying the icon into my my directory as freecell.png, but then it didn't even display on the desktop: I just gor a gear icon. Can you help?