From 2c44f3862c5a576def1035383216eb4db37b8b64 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 30 Apr 2018 17:51:57 +0100 Subject: [PATCH] dot/profile: Bodge to preserve `LANG' across SSH. This is Debian #392856, OpenSSH upstream #1346. Retain our chosen `LANG' in another variable `LC_MDWSSHLANG', and reset the former from the latter if it exists. The bizarre name helps with transmitting our new variable through SSH connections and suchlike which might have random limitations on environment variables. --- dot/profile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dot/profile b/dot/profile index 925127d..db91c92 100644 --- a/dot/profile +++ b/dot/profile @@ -133,8 +133,11 @@ unset ed emacs_startup_args ###-------------------------------------------------------------------------- ### Locale configuration. -case ${DISPLAY+t} in - t) +case ${LC_MDWSSHLANG+t},${DISPLAY+t} in + t,*) + LANG=$LC_MDWSSHLANG + ;; + ,t) __mdw_setconf LANG x-ctype POSIX ;; *) @@ -156,6 +159,10 @@ export LANG LC_COLLATE=POSIX; export LC_COLLATE +case ${LANG+t} in + t) LC_MDWSSHLANG=$LANG; export LC_MDWSSHLANG ;; +esac + ###-------------------------------------------------------------------------- ### Pagers. -- 2.11.0