The best I could come up with is a little script that is run as the application launches, and it assigns an icon using xseticon. To find the window ID, I use xdotool and assume the newly launched application is the focused window. The application is launched with a command like this:
Code: Select all
firefox "$@" & icon-me firefox.png 25
Code: Select all
#!/bin/bash
sleep $2
ID=$(xdotool getactivewindow)
xseticon -id $ID /usr/share/pixmaps/$1
Here's xdotool provided by technosaurus (just unpack and place in /usr/bin), and a deb package of xseticon, which I think will install in all Debian and Ubuntu compatible pups: