wmIsRunning bit in the server

Jeremy Huddleston jeremyhu at freedesktop.org
Mon Aug 25 13:20:38 PDT 2008


On Aug 25, 2008, at 11:48, Owen Taylor wrote:

> On Mon, 2008-08-25 at 11:29 -0700, Jeremy Huddleston wrote:
>> How can I query from within the server if a WM is running on the
>> server?  I have a thread on the server that needs to wait until
>> xinitrc has "finished" (ie, the window-manager is running) before it
>> should continue.  I know that if you try to run a second WM on a
>> server with one already, it will fail, so this leads me to believe
>> that there are bits in the server itself which I can query to figure
>> this out.  I grepped a bit looking for something but couldn't find
>> it.  Could someone point me in the right direction?
>
> If you read the ICCCM, you'll see that the window manager being  
> running
> is defined by the ownership of a (per-screen) X selection, which it
> would be possible to notice within the server.

Ok... so now just to figure out how to notice that within the server...

> However, making anything in the server depend on "xinitrc is finished"
> or "window manager is running" is clearly wrong.

Well, this is for a special situation that's really OS-X specific.   
The server is triggered to start when an X11 client connects to the  
$DISPLAY socket.  This triggers startx to run and start the server  
which accepts the initial connection from this socket.  We want to  
only accept that connection after the wm is running (yes, it's a  
kludge) because we want xinitrc to process ~/.Xresources... otherwise  
the user's xterm isn't as pretty as they want it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080825/d505ddb2/attachment.bin>


More information about the xorg mailing list