GNU bug report logs - #22514
Missing environment variables when logging in via SSH

Previous Next

Package: guix;

Reported by: myglc2 <myglc2 <at> gmail.com>

Date: Mon, 1 Feb 2016 04:44:01 UTC

Severity: normal

Merged with 22175

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22514 in the body.
You can then email your comments to 22514 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#22514; Package guix. (Mon, 01 Feb 2016 04:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to myglc2 <myglc2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 01 Feb 2016 04:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: emacs INFO pages have "?"s instead of "'"s
Date: Sun, 31 Jan 2016 22:21:48 -0500
In emacs INFO pages, single quotes "'" appear as question marks "?" and
'echo $LANG' returns a blank line.

I am running guixSD on a headless server & logging in via the iTerm2
terminal emulator running on Max OS X... e.g. 'ssh' & 'emacs -nw'

When I log into an identical server running Debian 8, emacs INFO "'"
quotes are normal and 'echo $LANG' returns "en_US.UTF-8".

ITerm is set to UTF-8 and xterm-256color.

I am running the configuration shown below built earlier today as shown
further below.

Note: I also tried the alternate form, '(locale "en_US.utf8")', which is
commented out in the config, and observed the same behavior.

Many Thanks - George

config.9.scm:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin)
(use-package-modules disk ssh rsync wget screen)
(use-package-modules emacs)
(use-package-modules guile)
(use-package-modules version-control)
(use-package-modules graphviz)

(operating-system
  (host-name "g1")
  (timezone "America/New_York")
  (locale "en_US.UTF-8")
  ;; (locale "en_US.utf8")

  ;; Assuming /dev/sdX is the target hard disk, and "root" is
  ;; the label of the target root file system.
  (bootloader (grub-configuration (device "/dev/sda")))
  (file-systems (cons (file-system
                        (device "g1sd")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  ;; This is where user accounts are specified.  The "root"
  ;; account is implicit, and is initially created with the
  ;; empty password.
  (users (cons (user-account
                (name "glc")
                (comment "g l c")
                (group "users")

                ;; Adding the account to the "wheel" group
                ;; makes it a sudoer.  Adding it to "audio"
                ;; and "video" allows the user to play sound
                ;; and access the webcam.
                (supplementary-groups '("wheel"
                                        "audio" "video"))
                (home-directory "/home/glc"))
               %base-user-accounts))

  ;; Globally-installed packages.
  (packages (cons*
	     glibc-utf8-locales
	     parted
	     openssh
	     rsync
	     wget
	     screen
	     emacs
	     ;; emacs-flycheck
	     emacs-w3m geiser git-modes guile-emacs guile-for-guile-emacs magit paredit
	     git git-manpages magit
	     graphviz
	     %base-packages
	     )
	    )

  ;; Add services to the baseline: a DHCP client and
  ;; an SSH server.
  (services (cons* (dhcp-client-service)
                   (lsh-service #:port-number 22)
                   %base-services)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


root <at> g1 ~# guix pull

Starting download of /tmp/guix-file.wq8eGI
From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
 master.tar.gz                               1.8MiB/s 00:05 | 9.7MiB transferred
unpacking '/gnu/store/z7fyrgm8f03ns5ils40cw0p1480ddh99-guix-latest.tar.gz'...
Guix already up to date
root <at> g1 ~# guix system reconfigure config.9.scm
substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
The following derivation will be built:
   /gnu/store/s70k68pvgnc72vzbqldfns0qinh4563k-grub.cfg.drv
/gnu/store/gla18i7ii7krc548j0yskg834i6d8fxv-system
/gnu/store/wx2piqvbys781q2k4f2k6gpjp0dpf2xb-grub.cfg
/gnu/store/6jdnd5c830qggwdmrkfl6kgz79jxymzy-grub-2.00
activating system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/z9c8lfifwbgcwrlsvhr10s6vjbnkjz43-etc...
usermod: no changes
usermod: no changes
usermod: no changes
making '/gnu/store/gla18i7ii7krc548j0yskg834i6d8fxv-system' the current system...
Installation finished. No error reported.
root <at> g1 ~# exit
exit

Process shell finished





Information forwarded to bug-guix <at> gnu.org:
bug#22514; Package guix. (Mon, 01 Feb 2016 18:07:02 GMT) Full text and rfc822 format available.

Message #8 received at 22514 <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: 22514 <at> debbugs.gnu.org
Subject: Re: bug#22514: emacs INFO pages have "?"s instead of "'"s
Date: Mon, 01 Feb 2016 13:03:43 -0500
myglc2 <myglc2 <at> gmail.com> writes:

> In emacs INFO pages, single quotes "'" appear as question marks "?" and
> 'echo $LANG' returns a blank line.

Note/clarification: the problem is only with user accounts. root emacs
INFO "'" quotes are normal and 'echo $LANG' returns "en_US.UTF-8".

> I am running guixSD on a headless server & logging in via the iTerm2
> terminal emulator running on Max OS X... e.g. 'ssh' & 'emacs -nw'
>
> When I log into an identical server running Debian 8, emacs INFO "'"
> quotes are normal and 'echo $LANG' returns "en_US.UTF-8".
>
> ITerm is set to UTF-8 and xterm-256color.
>
> I am running the configuration shown below built earlier today as shown
> further below.
>
> Note: I also tried the alternate form, '(locale "en_US.utf8")', which is
> commented out in the config, and observed the same behavior.
>
> Many Thanks - George
>
> config.9.scm:
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> ;; This is an operating system configuration template
> ;; for a "bare bones" setup, with no X11 display server.
>
> (use-modules (gnu))
> (use-service-modules networking ssh)
> (use-package-modules admin)
> (use-package-modules disk ssh rsync wget screen)
> (use-package-modules emacs)
> (use-package-modules guile)
> (use-package-modules version-control)
> (use-package-modules graphviz)
>
> (operating-system
>   (host-name "g1")
>   (timezone "America/New_York")
>   (locale "en_US.UTF-8")
>   ;; (locale "en_US.utf8")
>
>   ;; Assuming /dev/sdX is the target hard disk, and "root" is
>   ;; the label of the target root file system.
>   (bootloader (grub-configuration (device "/dev/sda")))
>   (file-systems (cons (file-system
>                         (device "g1sd")
>                         (title 'label)
>                         (mount-point "/")
>                         (type "ext4"))
>                       %base-file-systems))
>
>   ;; This is where user accounts are specified.  The "root"
>   ;; account is implicit, and is initially created with the
>   ;; empty password.
>   (users (cons (user-account
>                 (name "glc")
>                 (comment "g l c")
>                 (group "users")
>
>                 ;; Adding the account to the "wheel" group
>                 ;; makes it a sudoer.  Adding it to "audio"
>                 ;; and "video" allows the user to play sound
>                 ;; and access the webcam.
>                 (supplementary-groups '("wheel"
>                                         "audio" "video"))
>                 (home-directory "/home/glc"))
>                %base-user-accounts))
>
>   ;; Globally-installed packages.
>   (packages (cons*
> 	     glibc-utf8-locales
> 	     parted
> 	     openssh
> 	     rsync
> 	     wget
> 	     screen
> 	     emacs
> 	     ;; emacs-flycheck
> 	     emacs-w3m geiser git-modes guile-emacs guile-for-guile-emacs magit paredit
> 	     git git-manpages magit
> 	     graphviz
> 	     %base-packages
> 	     )
> 	    )
>
>   ;; Add services to the baseline: a DHCP client and
>   ;; an SSH server.
>   (services (cons* (dhcp-client-service)
>                    (lsh-service #:port-number 22)
>                    %base-services)))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>
> root <at> g1 ~# guix pull
>
> Starting download of /tmp/guix-file.wq8eGI
> From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
>  master.tar.gz                               1.8MiB/s 00:05 | 9.7MiB transferred
> unpacking '/gnu/store/z7fyrgm8f03ns5ils40cw0p1480ddh99-guix-latest.tar.gz'...
> Guix already up to date
> root <at> g1 ~# guix system reconfigure config.9.scm
> substitute: updating list of substitutes from 'http://hydra.gnu.org'... 100.0%
> The following derivation will be built:
>    /gnu/store/s70k68pvgnc72vzbqldfns0qinh4563k-grub.cfg.drv
> /gnu/store/gla18i7ii7krc548j0yskg834i6d8fxv-system
> /gnu/store/wx2piqvbys781q2k4f2k6gpjp0dpf2xb-grub.cfg
> /gnu/store/6jdnd5c830qggwdmrkfl6kgz79jxymzy-grub-2.00
> activating system...
> setting up setuid programs in '/run/setuid-programs'...
> populating /etc from /gnu/store/z9c8lfifwbgcwrlsvhr10s6vjbnkjz43-etc...
> usermod: no changes
> usermod: no changes
> usermod: no changes
> making '/gnu/store/gla18i7ii7krc548j0yskg834i6d8fxv-system' the current system...
> Installation finished. No error reported.
> root <at> g1 ~# exit
> exit
>
> Process shell finished




Changed bug title to 'Missing environment variables when logging in via SSH' from 'emacs INFO pages have "?"s instead of "'"s' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Tue, 02 Feb 2016 14:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#22514; Package guix. (Tue, 02 Feb 2016 14:26:02 GMT) Full text and rfc822 format available.

Message #13 received at 22514 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22514 <at> debbugs.gnu.org, request <at> debbugs.gnu.org
Subject: Re: bug#22514: emacs INFO pages have "?"s instead of "'"s
Date: Tue, 02 Feb 2016 15:24:40 +0100
[Message part 1 (text/plain, inline)]
retitle 22514 Missing environment variables when logging in via SSH
merge 22513 22175
thanks

myglc2 <myglc2 <at> gmail.com> skribis:

> In emacs INFO pages, single quotes "'" appear as question marks "?" and
> 'echo $LANG' returns a blank line.
>
> I am running guixSD on a headless server & logging in via the iTerm2
> terminal emulator running on Max OS X... e.g. 'ssh' & 'emacs -nw'

This bug is due to <http://bugs.gnu.org/22175>, which appears to be
fixed by the patch below (I tested it in a VM.)

Could you confirm that it works for you?  You would need to apply the
patch with ‘patch -p1 bugfix.patch’ in a fresh checkout of Guix, and to
run ‘./configure && make && ./pre-inst-env guix system reconfigure’ from
there.

TIA,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/system.scm b/gnu/system.scm
index b4264fe..59fc20c 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -465,6 +465,17 @@ else
   export PATH=\"$HOME/.guix-profile/bin:$PATH\"
 fi
 
+# Since 'lshd' does not use pam_env, /etc/environment must be explicitly
+# loaded when someone logs in via SSH.  See <http://bugs.gnu.org/22175>.
+# We need 'PATH' to be defined here, for 'cat' and 'cut'.
+if [ -f /etc/environment -a -n \"$SSH_CLIENT\" \\
+     -a -z \"$LINUX_MODULE_DIRECTORY\" ]
+then
+  . /etc/environment
+  export `cat /etc/environment | cut -d= -f1`
+fi
+
+
 # Allow Aspell to find dictionaries installed in the user profile.
 export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\"

Merged 22175 22514. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Tue, 02 Feb 2016 16:38:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#22514; Package guix. (Wed, 03 Feb 2016 04:25:02 GMT) Full text and rfc822 format available.

Message #18 received at 22514 <at> debbugs.gnu.org (full text, mbox):

From: myglc2 <myglc2 <at> gmail.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 22514 <at> debbugs.gnu.org, request <at> debbugs.gnu.org
Subject: Re: bug#22514: emacs INFO pages have "?"s instead of "'"s
Date: Tue, 02 Feb 2016 23:22:22 -0500
ludo <at> gnu.org (Ludovic Courtès) writes:

> retitle 22514 Missing environment variables when logging in via SSH
> merge 22513 22175
> thanks
>
> myglc2 <myglc2 <at> gmail.com> skribis:
>
>> In emacs INFO pages, single quotes "'" appear as question marks "?" and
>> 'echo $LANG' returns a blank line.
>>
>> I am running guixSD on a headless server & logging in via the iTerm2
>> terminal emulator running on Max OS X... e.g. 'ssh' & 'emacs -nw'
>
> This bug is due to <http://bugs.gnu.org/22175>, which appears to be
> fixed by the patch below (I tested it in a VM.)
>
> Could you confirm that it works for you?

Yes, that fixes it here. Thank you.

> You would need to apply the
> patch with ‘patch -p1 bugfix.patch’ in a fresh checkout of Guix, and to
> run ‘./configure && make && ./pre-inst-env guix system reconfigure’ from
> there.
>
> TIA,
> Ludo’.
>
> diff --git a/gnu/system.scm b/gnu/system.scm
> index b4264fe..59fc20c 100644
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -465,6 +465,17 @@ else
>    export PATH=\"$HOME/.guix-profile/bin:$PATH\"
>  fi
>  
> +# Since 'lshd' does not use pam_env, /etc/environment must be explicitly
> +# loaded when someone logs in via SSH.  See <http://bugs.gnu.org/22175>.
> +# We need 'PATH' to be defined here, for 'cat' and 'cut'.
> +if [ -f /etc/environment -a -n \"$SSH_CLIENT\" \\
> +     -a -z \"$LINUX_MODULE_DIRECTORY\" ]
> +then
> +  . /etc/environment
> +  export `cat /etc/environment | cut -d= -f1`
> +fi
> +
> +
>  # Allow Aspell to find dictionaries installed in the user profile.
>  export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\"




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Wed, 03 Feb 2016 10:25:01 GMT) Full text and rfc822 format available.

Notification sent to myglc2 <myglc2 <at> gmail.com>:
bug acknowledged by developer. (Wed, 03 Feb 2016 10:25:02 GMT) Full text and rfc822 format available.

Message #23 received at 22514-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: myglc2 <myglc2 <at> gmail.com>
Cc: 22514-done <at> debbugs.gnu.org
Subject: Re: bug#22514: emacs INFO pages have "?"s instead of "'"s
Date: Wed, 03 Feb 2016 11:24:48 +0100
myglc2 <myglc2 <at> gmail.com> skribis:

> ludo <at> gnu.org (Ludovic Courtès) writes:
>
>> retitle 22514 Missing environment variables when logging in via SSH
>> merge 22513 22175
>> thanks
>>
>> myglc2 <myglc2 <at> gmail.com> skribis:
>>
>>> In emacs INFO pages, single quotes "'" appear as question marks "?" and
>>> 'echo $LANG' returns a blank line.
>>>
>>> I am running guixSD on a headless server & logging in via the iTerm2
>>> terminal emulator running on Max OS X... e.g. 'ssh' & 'emacs -nw'
>>
>> This bug is due to <http://bugs.gnu.org/22175>, which appears to be
>> fixed by the patch below (I tested it in a VM.)
>>
>> Could you confirm that it works for you?
>
> Yes, that fixes it here. Thank you.

Great, thanks for testing!

Pushed as 2a5f0db, closing the bug now.

Ludo’.




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Wed, 03 Feb 2016 10:25:02 GMT) Full text and rfc822 format available.

Notification sent to ludo <at> gnu.org (Ludovic Courtès):
bug acknowledged by developer. (Wed, 03 Feb 2016 10:25:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 02 Mar 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.