From: Mark Wooding Date: Mon, 30 Apr 2018 16:51:57 +0000 (+0100) Subject: dot/profile: Bodge to preserve `LANG' across SSH. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/2c44f3862c5a576def1035383216eb4db37b8b64?hp=3a89d8c9c14af676582bcbbef4a689089e38b1fc 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. --- 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.