Subject: Re: slime+cmucl installation process is horribly complicated
From: (Rob Warnock)
Date: Fri, 12 Dec 2008 20:20:55 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Raymond Toy  <> wrote:
| >>>>> "Rob" == Rob Warnock <> writes:
| Rob> Probably some other CMUCL_vs_OS-X issue. At least with recent CMUCLs
| Rob> (19c or later) it parses the DISPLAY variable just fine, well enough
| Rob> for Hemlock to work with SSH forwarded X connections (where a typical
| Rob> "DISPLAY" is "localhost:11.0", say).
| I don't have OSX handy right now, but if you have an xterm, the
| DISPLAY variable is not the typical <host>:0.0.  It's something like
| /var/tmp/<stuff>, which, I think is a socket or something.  The
| current clx can't make sense of that.

Though it certainly could be taught to, without much effort.
After all, XLIB::GET-DEFAULT-DISPLAY already contains code to
translate $DISPLAY values of ":x.y" & "unix:x.y" to use the
:LOCAL transport protocol:

    > (xlib::get-default-display "localhost:2.3")

    ("localhost" 2 3 :INTERNET)
    > (xlib::get-default-display "unix:2.3")

    ("unix" 2 3 :LOCAL)
    > (xlib::get-default-display ":2.3")

    ("" 2 3 :LOCAL)

and [for CMUCL, at least] :LOCAL (or :UNIX) transport gets converted
in XLIB::OPEN-X-STREAM to the canonical X-Windows-on-Unix socket file
reference, to wit:

    (make-pathname :directory '(:absolute "tmp" ".X11-unix")
		   :name (format nil "X~D" display)

So adding a test in the :LOCAL case for the display name *already*
being an absolute path to a socket file should be trivial. You'd
also have to extend the parsing in XLIB::GET-DEFAULT-DISPLAY, which
currently blows up on display names like "/var/tmp/.X11-unix/X0".


p.s. I don't have a Mac to test it on, or I'd do it myself.

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607