! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[PATCH] new gdm handles GDM_LANG differently
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description Kevin Fenzi 2011-03-10 19:59:31 CET
New gdm has GDM_LANG set to "" which confuses xfce4-session, resulting in a null LANG being set instead of whatever should be in there. 

Downstream report: 

https://bugzilla.redhat.com/show_bug.cgi?id=683941

Simple patch: 

Only use GDM_LANG if not empty

gdm >= 2.91 sets GDM_LANG to an empty string which xfce-session
ends up using, overriding existing good LANG and breaking up utf8 etc.

diff -up xfce4-session-4.8.1/xfce4-session/main.c.gdmlang xfce4-session-4.8.1/xfce4-session/main.c
--- xfce4-session-4.8.1/xfce4-session/main.c.gdmlang	2011-03-10 15:59:08.000000000 +0200
+++ xfce4-session-4.8.1/xfce4-session/main.c	2011-03-10 15:59:30.000000000 +0200
@@ -103,7 +103,7 @@ setup_environment (void)
 
   /* this is for compatibility with the GNOME Display Manager */
   lang = g_getenv ("GDM_LANG");
-  if (lang != NULL)
+  if (lang != NULL && strlen (lang) > 0)
     {
       xfce_setenv ("LANG", lang, TRUE);
       xfce_unsetenv ("GDM_LANG");
Comment 1 Jérôme Guelfucci editbugs 2011-03-23 22:18:27 CET
Thanks for the fix, I just pushed it to git master and to the xfce-4.8 branch.

Bug #7400

Reported by:
Kevin Fenzi
Reported on: 2011-03-10
Last modified on: 2011-03-23

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Attachments

Additional information