summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2021-04-15 16:05:03 +0200
committerBenjamin Berg <bberg@redhat.com>2021-04-15 16:05:03 +0200
commitfac0816af8f4de2671a59604b3eeae3749fde2b7 (patch)
tree16aa6bba5efc413b6ed97227fa806bbe5401672a
parentf84ea29179b2965aa42b6af37863ea7642f876ca (diff)
downloadgnome-session-benzea/fix-LC_-vars.tar.gz
util: Unset LC_* variables as they may be unset at login timebenzea/fix-LC_-vars
Otherwise, a switch from a mixed locale where LANG != REGION(/FORMAT) to a non-mixed environment where LANG == REGION(/FORMAT) may result in LC_* surviving in systemd and the change not getting applied. Similar issues might occur when other DEs are setting these variables before a login into GNOME happens. Closes: #85
-rw-r--r--gnome-session/gsm-util.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c
index 7dc4f262..f1e6489d 100644
--- a/gnome-session/gsm-util.c
+++ b/gnome-session/gsm-util.c
@@ -65,6 +65,22 @@ static const char * const variable_unsetlist[] = {
"WAYLAND_SOCKET",
"GNOME_SHELL_SESSION_MODE",
"GNOME_SETUP_DISPLAY",
+
+ /* None of the LC_* variables should survive a logout/login */
+ "LC_CTYPE",
+ "LC_NUMERIC",
+ "LC_TIME",
+ "LC_COLLATE",
+ "LC_MONETARY",
+ "LC_MESSAGES",
+ "LC_PAPER",
+ "LC_NAME",
+ "LC_ADDRESS",
+ "LC_TELEPHONE",
+ "LC_MEASUREMENT",
+ "LC_IDENTIFICATION",
+ "LC_ALL",
+
NULL
};