Re: NET_WM_PID is broken (was: NET_WM_PID and client leader)



On 2 Aug 2001, Havoc Pennington wrote:

> 
> Mathias Hasselmann <mathias hasselmann gmx de> writes:
> > On 2 Aug 2001, Havoc Pennington wrote:
> > 
> > > Is it required to set _NET_WM_PID on all toplevels, or only the client
> > > leader window? What are people doing now?
> > 
> > 	Apropos _NET_WM_PID: This hint is broken since the current spec
> > since doesn't distinguish between local and remote clients. Imagine what
> > happens if your X server, session manager has the process id 4311 and your
> > window manager manages a client coming from another machine unfortunatly
> > having _NET_WM_PID set to 4311 (since the client's process id on the
> > remote machine is 4311). In the case that your window manager implements
> > the _NET_WM_PING protocol and the remote client stops processing
> > _NET_WM_PING client messages your X session will die.
> > 
> > 
> > 	To get arround this problem we could force all _NET_WM clients to
> > set the WM_MACHINE_NAME hint in a well defined manner. Or we would have to
> > introduce yet another _NET_WM hint describing the client's host. Third
> > solution: We could forbid remote clients to set the _NET_WM_PID hint.
> > 
> 
> You are supposed to use _NET_WM_PID in conjunction with
> WM_MACHINE_NAME, see the paragraph at the end of "Implementation
> notes." I think this is a quality-of-implementation issue.


	Hmm... When was this paragraph added?

	Unfortunately there is no guarantee that the WM_CLIENT_MACHINE is
set and AFAIK the content of this property is not very well defined.
Specially on a machine with multiple DNS names: How do i test that
WM_CLIENT_MACHINE describes the current machine? Ok, i could think of
using system("ssh kill ${_NET_WM_PID}") instead of calling the kill
function directly?

	But what happens when WM_CLIENT_MACHINE is not set? Since the spec
doesn't request WM_CLIENT_MACHINE you are allowed to confuse the window
manger by creating windows having _NET_WM_PID but not WM_CLIENT_MACHINE
set without violating the spec.


	IMHO the spec should request explicitly that WM_CLIENT_MACHINE is
set to a well defined value.


Ciao,
Mathias
-- 
WWW:           http://www.informatik.hu-berlin.de/~hasselma/
PGP/GnuPG:     1024-Bit DSA: ID 55E572F3, 1024-Bit RSA: ID EAAF7CF1





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]