[Xquartz-dev] Autolaunched X11 doesn't work with fast-user-switching

Jeremy Huddleston jeremyhu at berkeley.edu
Sun Dec 16 11:05:16 PST 2007

Ahh... Our first (known) regression!  Fix it, fix it!

There are only a few small changes done to server_main.c since  
leopard's release.  Here they are:


I honestly don't see how this would make it break!  This is the only  
real change (everything else is just commenting, ifdefs, and white  

-    if (conn == NULL) return FALSE;
+    if (xcb_connection_has_error(conn)) return FALSE;

undoing that change still causes a problem.

I am noticing the 'run by launchd for fd1' appearing in my console  
log.  It seems to be listening on both unix:0 and the launchd socket  
(ie, setting DISPLAY to /tmp/launchd-... works just as setting  
DISPLAY=:0 once the server is running).

So the key is probably in just telling it to not listen to the unix  
socket if launchd picks it up.

Isn't that logic in xtrans?  I'm using the latest git of xtrans.


On Dec 16, 2007, at 06:53, Merle Reinhart wrote:

> It surprised me as well that a default clean Leopard install updated  
> to 10.5.1 worked with multiple users running the xserver.  Both from  
> within their environments were utilizing a DISPLAY of /tmp/launchd- 
> xxxxx/:0 however, xxxxx was different for each user which I'm  
> guessing is somehow why it really worked.  I tried it a couple of  
> times to make sure I wasn't just seeing something that sometimes  
> worked and sometimes didn't, but it worked every time I tried.
> As soon as I started adding the x.org update packages, it broke.
> Since it worked with the original Leopard X11, I did not file a bug  
> report at Apple, but just on macosxforge.
> If there is something specific you would like me to try and test to  
> help isolate the problem, let me know.
> Merle
> On Dec 16, 2007, at 4:45 AM, Jeremy Huddleston wrote:
>> I think the problem stems from our using the default lock file: / 
>> tmp/.X0-lock ... I don't see why the  original Leopard would've  
>> worked for you, so can you please check that out and verify?
>> I'll try to fix this up as I rework the startup stuff... if you  
>> haven't already, would you mind filing a bug for it for me, so I  
>> don't forget?
>> Thanks,
>> Jeremy
>> On Dec 15, 2007, at 20:14, Merle Reinhart wrote:
>>> The original Leopard X11 did not have this problem.  I don't have  
>>> a Leopard with the version just prior to X11-2.1.1 at this point  
>>> in time to determine if it was X11-2.1.1 where the problem  
>>> occurred or not (I can probably get there by the end of the  
>>> weekend).
>>> Merle
>>> On Dec 15, 2007, at 8:38 PM, Merle Reinhart wrote:
>>>> I've been doing a bit more testing with X11-2.1.1 and find that  
>>>> the autolaunching stuff doesn't work if one user already has the  
>>>> Xserver started.  At that point, any other user logging in via  
>>>> fast-user switching is not able to then use X11 (attempting to  
>>>> set DISPLAY to :1.0 and manually start X11.app winds up in an  
>>>> infinite loop with Xquartz still trying to talk to the server at : 
>>>> 0.0 which is owned by the other user).
>>>> At this point in time, I have not been about to find a workaround  
>>>> that would allow more than one user to utilize X11.app at the  
>>>> same time.  Could this be because launchd is explicitly hard- 
>>>> coded to look at the :0 socket when the socket should increase  
>>>> based upon the number of logged in users?
>>>> This is potentially a problem with multi-user systems where X11  
>>>> may be needed.
>>>> Merle
>>>> _______________________________________________
>>>> Xquartz-dev mailing list
>>>> Xquartz-dev at lists.macosforge.org
>>>> http://lists.macosforge.org/mailman/listinfo/xquartz-dev
>>> _______________________________________________
>>> Xquartz-dev mailing list
>>> Xquartz-dev at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo/xquartz-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
Url : http://lists.macosforge.org/pipermail/xquartz-dev/attachments/20071216/b294c209/smime-0001.bin

More information about the Xquartz-dev mailing list