What process a window belongs to?
Windows managers add some properties to windows and one of them is '_NET_WM_PID(CARDINAL)' which stores what PID created that window. In order to get that PID, we just have to execute the command below and click on the window we want to read info from :]
$ xprop |grep WM_PID _NET_WM_PID(CARDINAL) = 2717 $ ps ax | grep firefox 2717 ? Sl 387:39 /usr/lib/firefox-3.0.6/firefox
Lenguaje:
bash

Comentarios
fontanon:
Puede ser un buen recurso para algún tipo de scripting.
"No existen los hechos, solo las interpretaciones" La verdad es conquista de la voluntad de poder. (Nietzsche)
rcmorano:
A mí me ha sido útil por ejemplo, para averiguar a quién pertenecian ventanontes de aviso que me han saltado en Jaunty y que no había visto nunca jeje