retitle 22514 Missing environment variables when logging in via SSH merge 22513 22175 thanks
myglc2 <[email protected]> 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’.
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\"
