Get an X window ID

Alan Coopersmith alan.coopersmith at sun.com
Thu May 17 11:46:45 PDT 2007


Daniel Stone wrote:
> On Thu, May 17, 2007 at 11:00:33AM -0500, Pat Kane wrote:
>> Are you allowed to change Xlib and the X server?
>>
>> If so then this hack might help.
>>
>> A while ago I needed to know, from inside the X server,
>> the PID of a process that created an X connection.
>>
>> I used spare pad bytes in the  xConnClientPrefix initial
>> connection setup message to pass the PID from the client
>> to the X server.  Note that clients might not be on the
>> same machine so you also need the hostname of the client.
> 
> NetWM already allows you to use properties to encode the pid and
> hostname of clients as window properties.

Should we have Xlib or xcb automatically set these so that
we don't have to wait for every application and toolkit to
be modified to do so?

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering




More information about the xorg mailing list