Change icon for an application from the command line

command lineiconswindow-managerx11

Is there a way to change the icon of an application's window from the command line?

For instance, I'd like to have separate icons for Firefox windows under different profiles (different processes), change the icon of the terminal if it runs tmux, etc.

By 'icon' I mean the small picture shown by window switcher, typically invoked with Alt+Tab. In particular, I'm interested for this to work under xfwm4, but a more general solution would only be welcome.

Apparently, neither xdotool nor wmctrl are capable of this.

Best Answer

xseticon allows you to do exactly that.

Related Question