which process display a given window?

Frantisek Hanzlik franta at hanzlici.cz
Wed Aug 3 04:53:57 UTC 2011


Bryn M. Reeves wrote:
> On 08/01/2011 11:39 AM, Frantisek Hanzlik wrote:
>> How generally I can state which process display it?
>> I would expect, when right-clicking on window top title bar, some
>> item as e.g. "window properties" - where would be possible find info
>> about process displaying this window. But there isn't nothing of the
>> kind. Thus, is there other way discovering this?
>>
>> I forgot mention, I'm now in F15 using XFCE (but IMO in Gnome window
>> manager has not capability too).
> 
> In f15 the gnome and xfce window managers both seem to set a window manager hint
> that includes the process ID so you can probably get this by running xwininfo
> and clicking the suspect window:
> 
> $ xwininfo -wm
> 
> xwininfo: Please select the window about which you
>           would like information by clicking the
>           mouse in that window.
> 
> xwininfo: Window id: 0x2200005 "bmr at bmr:~"
> 
>   Window manager hints:
>       Client accepts input or input focus: Yes
>       Initial state is Normal State
>       Displayed on desktop 0
>       Window type:
>           Normal
>       Process id: 2157 on host bmr.fab.redhat.com
>       Frame extents: 1, 1, 28, 2
> 
> $ pga 2157
>  2157 ?        Sl     0:05 gnome-terminal
> 24640 pts/0    S+     0:00 grep --color=auto 2157
> 
> Regards,
> Bryn.

Tim, Patrick, Bryn - thanks for valuable tips. xwininfo and xprop
are both capable return PID and hostname of window controlling process,
which is all I need.

Btw, my cryptic process was LXDA Policykit Authentication Agent
(/usr/libexec/lxpolkit). I not know why it is launched from XFCE session,
maybe some relict from my previous experiments when I was searching some
replacement for Gnome 2.x.
Fortunately, this applet is well described in XFCE Preferences menu
(in contrast with crippled ones as "load color profiles", "unlock
 certificates" and other weird named applets, for which is problem
locate destination file), thus wasn't problem disable it.

Franta H


More information about the users mailing list