[gdm] session: override LANG with user configured language
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] session: override LANG with user configured language
- Date: Tue, 2 Sep 2014 19:09:44 +0000 (UTC)
commit db94ed31b79c90528d922d705ff3484216817415
Author: Ray Strode <rstrode redhat com>
Date: Wed Aug 27 09:49:58 2014 -0400
session: override LANG with user configured language
We need to set LANG based on whats in accountsservice, for the
language configuration in control-center to work.
This commit partially reverts commit
c672e4e49983d285e829c1ec846d22fbf19bf29a
https://bugzilla.gnome.org/show_bug.cgi?id=730478
daemon/gdm-session.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 0c52d63..406e42e 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2395,6 +2395,7 @@ set_up_session_environment (GdmSession *self)
{
GdmSessionDisplayMode display_mode;
gchar *desktop_names;
+ const char *locale;
gdm_session_set_environment_variable (self,
"GDMSESSION",
@@ -2413,6 +2414,17 @@ set_up_session_environment (GdmSession *self)
set_up_session_language (self);
+ locale = get_default_language_name (self);
+
+ if (locale != NULL && locale[0] != '\0') {
+ gdm_session_set_environment_variable (self,
+ "LANG",
+ locale);
+ gdm_session_set_environment_variable (self,
+ "GDM_LANG",
+ locale);
+ }
+
display_mode = gdm_session_get_display_mode (self);
if (display_mode == GDM_SESSION_DISPLAY_MODE_REUSE_VT) {
gdm_session_set_environment_variable (self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]