[gdm] daemon: don't set LANG to empty value
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] daemon: don't set LANG to empty value
- Date: Tue, 14 Jun 2011 00:34:54 +0000 (UTC)
commit 1a37cd929bcc2c387c23cee1cdcfffd6d9863116
Author: Ray Strode <rstrode redhat com>
Date: Mon Jun 13 20:32:18 2011 -0400
daemon: don't set LANG to empty value
This makes PAM not set it to a proper value later.
https://bugzilla.gnome.org/show_bug.cgi?id=649413
daemon/gdm-session-direct.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index fa8ae49..e977486 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -2211,6 +2211,8 @@ gdm_session_direct_set_environment_variable (GdmSessionDirect *session,
static void
setup_session_environment (GdmSessionDirect *session)
{
+ const char *locale;
+
gdm_session_direct_set_environment_variable (session,
"GDMSESSION",
get_session_name (session));
@@ -2218,12 +2220,16 @@ setup_session_environment (GdmSessionDirect *session)
"DESKTOP_SESSION",
get_session_name (session));
- gdm_session_direct_set_environment_variable (session,
- "LANG",
- get_language_name (session));
- gdm_session_direct_set_environment_variable (session,
- "GDM_LANG",
- get_language_name (session));
+ locale = get_language_name (session);
+
+ if (locale != NULL && locale[0] != '\0') {
+ gdm_session_direct_set_environment_variable (session,
+ "LANG",
+ locale);
+ gdm_session_direct_set_environment_variable (session,
+ "GDM_LANG",
+ locale);
+ }
gdm_session_direct_set_environment_variable (session,
"DISPLAY",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]