1

I would like to change the window icon of an already existing application on Lubuntu. By window icon, I mean the one that appears in the window title bar, and in lxpanel. By existing application, I mean one that is already running. I don't want to edit the source code of the application itself. I'm running Lubuntu 17.10 with LXDE, Openbox 3.6.1, and xdg-desktop-icon 1.1.0 rc3.

Usually, it seems that icons for applications are described by name, and then looked up in a database managed by xdg-desktop-icon and xdg-icon-resource. The process by which icons are looked up is specified in the FreeDesktop.org specification, and there's some handy scripts to get the icon filepath here.

There are a few tools which may do what I want. The first is xseticon. Unfortunately, it's unmaintained. I don't see a pre-compiled version anywhere and I'm not eager to spend time figuring out a build environment for dubious old code.

The other tools are xdotool and wmctrl. I think either of these should work:

xdotool search --name Geany set_window --icon-name help-contents
wmctrl -r Geany -I help-contents

Neither has any visible effect. However, wmctrl does change the value of _NET_WM_VISIBLE_ICON_NAME according to obxprop, and it seems like it sets WM_ICON_NAME according to its code.

Am I using xdotool and wmctrl properly? As I play with obxprop, it seems like WM_ICON_NAME is equivalent to the window title rather than the icon name. I don't see a way to do this with OpenBox configuration files. Is there another tool to do this?

  • --icon-name is, as you remark yourself at the end, indeed not intended for changing the icon. It is intended to contain a string, the WM_ICON_NAME property of a window, to label the application when it is minimized. Typically, the label will be shorter than WM_NAME, the "regular" Window title. – vanadium Sep 22 '18 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.