From: Alexander Barton Date: Wed, 25 Jan 2012 23:47:08 +0000 (+0100) Subject: Only set LC_MESSAGES="C" for non-X11 sessions X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27b9c1144837c7e0c46e6e6e3a28aa898a4a7c57;p=ConfigScripts.git Only set LC_MESSAGES="C" for non-X11 sessions --- diff --git a/sys/profile b/sys/profile index 41b767e..bdb6ae4 100644 --- a/sys/profile +++ b/sys/profile @@ -19,8 +19,10 @@ export UID # Set locale if it is not set or doesn't contain a dot: [ "$LANG" = "${LANG#*.}" -a "$LANG" != "C" ] \ && export LANG="${LANG:-de_DE}.${LC_encoding}" -# All system messages should still be in "native" ("C") language: -export LC_MESSAGES="C" +# All system messages should still be in "native" ("C") language for +# non-X11 sessions: +[ -z "$GDMSESSION" -a -z "$XDG_SESSION_COOKIE" ] \ + export LC_MESSAGES="C" # Clean up ... unset LC_CTYPE LC_encoding 2>/dev/null