[mcclim-devel] Problem starting McClim

Rudi Schlatte rudi at constantly.at
Wed Mar 16 10:08:12 UTC 2011


On Mar 16, 2011, at 4:39 , Michael McDonald wrote:

> 
> 
> 
> On Mar 15, 2011, at 4:35 AM, Bruce Seely wrote:
> 
>> Hi All,
>> 
>> I would like to use mcclim. I've loaded it (along with clx, flexichains, 
>> and spacial-trees), and get this error when I try to start the demo:
>> 
>> CL-USER(15): (clim-demo::run-test 'clim-demo::demodemo)
>> ; Autoloading for ACL-SOCKET:CONFIGURE-DNS:
>> ; Fast loading from bundle code/acldns.fasl.
>> Error: "Connection timed out" (errno 60) occurred while
>>       creating a local socket and connecting to a remote host 
>> "tmp/launch-4lQnm8/org.x" (67.215.65.132) on port 6000.
>>  [condition type: SOCKET-ERROR]
> 
> Your DISPLAY environment variable isn't set up correctly. It's caused by the retards at Apple breaking 20 years of X compatibility so they can be "innovative". It needs to be something like ":0.0", not "tmp/launch-4lQnm8/org.x". 

It's easy and fun to blame apple, but it's a bit more complicated.  Marvel at clx's dependent.lisp: get-default-display parses the DISPLAY variable, returning protocol, hostname etc. (this is where the new, Apple-specific value would have to be considered in a sane world, mirroring what has been implemented in xlib - and yes, translating ":0.0" into "/tmp/.X11-unix/X", as is the practice on *nix, is a hack as well).  Then, be amused at open-x-stream where the value for protocol calculated by get-default-display end up being subsequently ignored, superseded by another round of heuristics in unix-socket-path-from-host (found in depdefs.lisp).  And there, indeed, /tmp/launchfoo values for the DISPLAY variable is considered if *features* contains :darwin (the leading slash is cut off by a previous round of parsing somewhere else).

But clx code layout is deep and twisted, and I think ACL (which Bruce's backtrace indicates he's using) has different code paths; the fix might not have been applied there yet.  It should not be difficult to patch once the right location is found.

FWIW, I do blame Apple for putting the listening unix domain socket for X at /tmp/launcbarblaa instead of /tmp/.X11-unix/X - in that case, things would have continued Just Working because clx's heuristics would have accidentally done the right thing.

> I start X11 up directly (despite the retards saying you just have to run an X application). I get two xterm, one has the bogus DISPLAY and one has the real one. I kill the bogus one and then use the real one from then on.

An X application that connects to the local socket pointed to by DISPLAY will start up the X server.

> xhost +

You forgot to advise Bruce about the consequences of this.

Rudi






More information about the mcclim-devel mailing list