Skip to content

Commit

Permalink
Support XAUTHLOCALHOSTNAME environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
massimo-zaniboni authored and dkochmanski committed Aug 8, 2022
1 parent 6705fda commit f5bc0ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions display.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
;;; The format of the .Xauthority file is documented in the XFree
;;; sources, in the file xc/lib/Xau/README.

;;; Stolen from the cmucl sources, with patches by Hannu Rummukainen and
;;; Scott Fahlman.
;;; Stolen from the cmucl sources, with patches by
;;; * Hannu Rummukainen
;;; * Scott Fahlman
;;; * Copyright (C) 2022 Massimo Zaniboni <[email protected]>

(defun read-xauth-entry (stream)
(labels ((read-short (stream &optional (eof-errorp t))
Expand Down Expand Up @@ -108,7 +110,7 @@
(when (or (eql protocol :local)
(and (eql protocol :internet)
(equal host-address '(127 0 0 1))))
(setq host-address (get-host-name))
(setq host-address (or (getenv "XAUTHLOCALHOSTNAME") (get-host-name)))
(setq protocol :local))
(loop
(destructuring-bind (family address number name data)
Expand Down

0 comments on commit f5bc0ab

Please sign in to comment.