finding process id of a window
Owen Taylor
otaylor at redhat.com
Fri Apr 1 13:13:15 PST 2005
On Tue, 2005-03-29 at 20:35 +0200, Alexander Gottwald wrote:
> Jaymz Julian wrote:
>
> >
> > On Tue, Mar 29, 2005 at 07:24:46PM +0200, Jochen.Baier at stud.uni-karlsruhe.de wrote:
> > [code to read _NET_WM_PID stripped]
> >
> > Shouldn't this code be modified to give no result on remote apps? (which,
> > by my reading of it, it will give instead a bogus PID that may be something
> > else on the current machine)? I guess checking WM_CLIENT_MACHINE is the local
> > machine would suffice.
>
> There is ambiguity too. Two hosts on different networks with same name and
> IP are connected with an ssh tunnel.
>
>
> NET1 NAT NAT NET2
> Host abc | | Host abc
> | SSH tunnel |
> xterm ---------------------------> xserver
> | |
>
> the WM_CLIENT_MACHINE fails but the client is on a different host.
Could happen, frequently not worth worrying about.
> There is another problem with the pid issue:
> The actual pid of the conneting client is the pid of the forked sshd and there
> may be more clients connected through the ssh tunnel.
_NET_WM_PID, like WM_CLIENT_MACHINE is set by the app, not by the
server, so will be the ID of the real client, not of the SSH tunnel.
Regards,
Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20050401/63d9479c/attachment.pgp>
More information about the xorg
mailing list