Menu

#22 Garnet doesn't correctly talk to X11 on Mac

demos
closed-fixed
nobody
None
5
2015-07-28
2015-07-28
No

On both SBCL and ACL, Garnet can't talk to X run by Xquartz. It doesn't accept the use of a unix domain socket as a value for $DISPLAY. E.g.

The display specification "/private/tmp/com.apple.launchd.EauNyeZmg1/org.macosforge.xquartz:0" is invalid: bad display number

Related

Bugs: #22

Discussion

  • Robert P. Goldman

    Looks like a bug in GET-DISPLAY-NUMBER invoked by VERIFY-DISPLAY-CAN-BE-OPENED.

     
    • Fred Gilham

      Fred Gilham - 2015-07-28

      On Tue, 28 Jul 2015 at 10:21:33 PDT,
      Robert P. Goldman wrote:

      Looks like a bug in GET-DISPLAY-NUMBER invoked by VERIFY-DISPLAY-CAN-BE-OPENED.


      [bugs:#22] Garnet doesn't correctly talk to X11 on Mac

      Status: open
      Group: demos
      Created: Tue Jul 28, 2015 05:20 PM UTC by Robert P. Goldman
      Last Updated: Tue Jul 28, 2015 05:20 PM UTC
      Owner: nobody

      On both SBCL and ACL, Garnet can't talk to X run by Xquartz. It
      doesn't accept the use of a unix domain socket as a value for
      $DISPLAY. E.g.

      The display specification
      "/private/tmp/com.apple.launchd.EauNyeZmg1/org.macosforge.xquartz:0"
      is invalid: bad display number

      I don't have a mac, so I can't check this out, but a fix that occurs
      to me is:

      (defun get-display-number (display)
      ;; The display number is everything from the colon to the period (if
      ;; it is present).
      (let ((colon-position (position #\: display)))
      (unless colon-position
      (error "The display specification \"~A\" is ill-formed: missing colon" display))
      (let ((display-number
      (ignore-errors
      (parse-integer
      (subseq display
      (1+ colon-position)
      (position #. display :start colon-position))))))
      (unless (numberp (print display-number))
      (error "The display specification \"~A\" is invalid: bad display number" display))
      display-number)))

      Any chance you could give this a look?

      --
      Fred Gilham fred@sunbot.homedns.org
      just make me lighter
      make me lighter still
      'til the yellow of the sun takes me
      [oh what Lazarus saw! I cannnot bear this anymore!]
      -- Linshuang Lu

       

      Related

      Bugs: #22

  • Robert P. Goldman

    I modified your proposed fix a little, and then it worked (on ACL, anyway).

    Somewhat unpleasantly, there are two definitions of GET-DISPLAY-NUMBER, one in src/gem/x.lisp and one in garnet-loader.lisp. That seems bad, but I can see why it's necessary to bootstrap. I fixed them both.

    Fixed in [r96]

     

    Related

    Commit: [r96]

  • Robert P. Goldman

    • status: open --> closed-fixed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.