finding process id of a window

Alexander Gottwald Alexander.Gottwald at s1999.tu-chemnitz.de
Tue Mar 29 10:35:01 PST 2005


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.

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.

bye
        ago
-- 
 Alexander.Gottwald at s1999.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723



More information about the xorg mailing list