diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-02-24 12:24:30 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-02-24 13:11:50 +0100 |
commit | da35acf91d9d198c8dc61dc356825c867772eec9 (patch) | |
tree | e11c900877483920815b553a1e45ad1e4e7277d4 /gnu/packages | |
parent | 03b93ed70e8904f583f092e65f174690f20bf5bf (diff) | |
download | guix-da35acf91d9d198c8dc61dc356825c867772eec9.tar.gz |
gnu: lsh: lshd now supports X11 forwarding.
Reported by myglc2 <myglc2@gmail.com>. * gnu/packages/lsh.scm (lsh)[inputs]: Add XAUTH. [arguments]: Modify 'XAUTH_PROGRAM' macro in 'server_x11.c'.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/lsh.scm | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gnu/packages/lsh.scm b/gnu/packages/lsh.scm index 90631e3fe5..3b6487f38c 100644 --- a/gnu/packages/lsh.scm +++ b/gnu/packages/lsh.scm @@ -29,7 +29,8 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages readline) #:use-module (gnu packages gperf) - #:use-module (gnu packages guile)) + #:use-module (gnu packages guile) + #:use-module (gnu packages xorg)) (define-public liboop (package @@ -100,7 +101,11 @@ basis for almost any application.") ("liboop" ,liboop) ("zlib" ,guix:zlib) - ("gmp" ,gmp))) + ("gmp" ,gmp) + + ;; The server (lshd) invokes xauth when X11 forwarding is requested. + ;; This adds 24 MiB (or 27%) to the closure of lsh. + ("xauth" ,xauth))) (arguments '(;; Skip the `configure' test that checks whether /dev/ptmx & ;; co. work as expected, because it relies on impurities (for @@ -128,7 +133,18 @@ basis for almost any application.") ;; Same for the 'lsh-authorize' script. (substitute* "src/lsh-authorize" (("=sexp-conv") - (string-append "=" sexp-conv)))) + (string-append "=" sexp-conv))) + + ;; Tell lshd where 'xauth' lives. Another option would be to + ;; hardcode "/run/current-system/profile/bin/xauth", thereby + ;; reducing the closure size, but that wouldn't work on foreign + ;; distros. + (with-fluids ((%default-port-encoding "ISO-8859-1")) + (substitute* "src/server_x11.c" + (("define XAUTH_PROGRAM.*") + (string-append "define XAUTH_PROGRAM \"" + (assoc-ref inputs "xauth") + "/bin/xauth\"\n"))))) ;; Tests rely on $USER being set. (setenv "USER" "guix")))))) |