[gdm] Do not overwrite $LANGUAGE and other locale variables



commit 273bbb721d6da9beedf891864f9e0dc5d495deac
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Thu Mar 4 12:32:28 2010 +0100

    Do not overwrite $LANGUAGE and other locale variables
    
    gdm does not have a facility to specify a list of languages for $LANGUAGE, so
    do not break $LANGUAGE by forcing it to $LANG (they have a completely different
    syntax, and different meanings). Also, if the system sets $LC_ALL (which
    distros should never ever do), we should not clobber this.
    
    $LINGUAS is not a runtime environment variable for locales, so just drop this.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=603853
    Bug-Ubuntu: https://launchpad.net/bugs/407300

 data/Xsession.in |   28 ++--------------------------
 1 files changed, 2 insertions(+), 26 deletions(-)
---
diff --git a/data/Xsession.in b/data/Xsession.in
index 6c7761a..b2d98f2 100755
--- a/data/Xsession.in
+++ b/data/Xsession.in
@@ -146,35 +146,11 @@ fi
 
 unset XKB_IN_USE
 
-# Normalize languages, some places/distros screw us up in /etc/profile,
-# so in case the user did select a language
+# Overwrite $LANG from /etc/profile (and friends) with the one picked in the
+# greeter
 if [ -n "$GDM_LANG" ]; then
   LANG="$GDM_LANG"
   export LANG
-
-  if [ -n "$LC_ALL" ]; then
-    if [ "$LC_ALL" != "$LANG" ]; then
-      LC_ALL="$LANG"
-    fi
-  else
-    unset LC_ALL
-  fi
-
-  if [ -n "$LANGUAGE" ]; then
-    if [ "$LANGUAGE" != "$LANG" ]; then
-      LANGUAGE="$LANG"
-    fi
-  else
-    unset LANGUAGE
-  fi
-
-  if [ -n "$LINGUAS" ]; then
-    if [ "$LINGUAS" != "$LANG" ]; then
-      LINGUAS="$LANG"
-    fi
-  else
-    unset LINGUAS
-  fi
 fi
 
 # run all system xinitrc shell scripts.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]