Where does FVWM find icons for applications in WindowList?

I have a program (KEditBookmarks, if it matters) that doesn’t ship with an icon, but I want to have an icon display for it in the list of windows in the WindowList popup.

I created an icon (KEditBookmarks.png) and put a copy in both /usr/share/icons and /usr/share/pixmaps. I edited the .desktop file to specify “Icon=KEditBookmarks.png”, which works for that, and changed the “NoDisplay” key to “false”. But I can’t get FVWM to notice. I also tried changing the “Name” key in the .desktop file from “Bookmark Editor” to “KEditBookmarks” to match the icon name, and that didn’t help. Obviously, I’ve run update-desktop-database, logged out, and logged back in again.

I’ve exhaused my Google skills looking for some hint at where FVWM might look to find such an icon. I even tried looking at the source code, but I really don’t know what I’m looking for there. I’ve studied the freedesktop Desktop Entry Specification and Icon Theme Specification documentation, but if the answer was in there, I didn’t understand it. Obviously, I may be searching for the wrong question, but I’m afraid I’m stumped.

Could anyone please give me a hint about how FVWM finds and uses icons for the WindowList popup and how I can get it to use an icon for a particular application? Thank you!

The WindowList menu uses MiniIcons. Some programs have an inbuilt ewmh icon, which is used by default. Or you can explicitly declare you own miniicon.

First, make sure KEditBookmarks.png is in your ImagePath. If you store KEditBookmarks.png in ~/.fvwm/images, then your declared ImagePath might be…

ImagePath +:/usr/share/icons ImagePath +:/usr/share/pixmaps ImagePath +:/usr/include/X11/bitmaps/ ImagePath +:$[FVWM_USERDIR]/images
Then declare a Miniicon style for KEditBookmarks, something like…

Style KEditBookmarks MiniIcon KEditBookmarks.png

Where I have assumed “KEditBookmarks” will match with the class name of your window. Lastly, if KEditBookmarks already has an EWMH icon and you want to override it, then you might write…

Style KEditBookmarks EWMHMiniIconOverride, EWMHDonateMiniIcon, MiniIcon KEditBookmarks.png

Hope that helps…

Success! That was immensely helpful, thank you! KDE has some weird naming conventions, but I was able to use the xprop utility to learn the proper window class name (“keditbookmarks” even though the window title calls itself “Bookmark Editor”). That was the hardest bit, and it was only hard because using xprop didn’t occur to me until I hurled a bunch of trial-and-error guesses at it, duh. I knew FVWM can do anything. Again, thank you very much.

You can also use the module FvwmIdent to figure out info like that about windows.