Use xwininfo
(consulte man xwininfo
), no pacote x11-utils
. Para demonstrar, executei xwininfo -all
em uma janela de terminal e, após o aviso, cliquei nessa janela. A primeira parte do que foi dito é:
$ xwininfo -all
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x4600007 "unity - How can I find out what app is running (actual name, not published name)? - Ask Ubuntu"
Root window id: 0x7d (the root window) "QupZilla"
Parent window id: 0x2403a37 (has no name)
1 child:
0x4600008 (has no name): () 1x1+-1+-1 +65+51
Absolute upper-left X: 66
Absolute upper-left Y: 52
Relative upper-left X: 0
Relative upper-left Y: 0
Width: 1696
Height: 1148
Depth: 24
...
Também há xlsclients
e xprop
(veja o man page
) que podem ser úteis.