In a tab of a terminal emulator (lxterminal), I try to find out its window id by clicking in the tab and the process which "owns" the window (I am still not sure what is the word to describe the relation between a window and a process, so I use "own"), both by
$ xwininfo -int | grep -Po '(?<=Window id: )[0-9a-zA-Z]+' 31457283 $ xdotool getwindowpid 31457283 1480 $ ps aux | grep -i 1480 t 1480 0.1 0.3 473204 31240 ? Sl Nov21 23:18 lxterminal
$ xdotool selectwindow 35652689 $ xdotool selectwindow getwindowpid window 35652689 has no pid associated with it.
xdotool give me different window ids, and thus different process results?