wmIsRunning bit in the server

Owen Taylor otaylor at redhat.com
Mon Aug 25 11:48:09 PDT 2008


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.

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

- Owen





More information about the xorg mailing list