[Bug 740754] Re: Language selection for newly created user confusing

2011-03-31 Thread Launchpad Bug Tracker
This bug was fixed in the package gdm - 2.32.0-0ubuntu13 --- gdm (2.32.0-0ubuntu13) natty; urgency=low [ Gunnar Hjalmarsson ] * debian/patches/36_language_environment_settings.patch: - Make the first item in the system LANGUAGE list serve as default language for new user

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-29 Thread Martin Pitt
Thanks Gunnar! I merged your branch, but will postpone the uploading until after the beta-1 freeze. ** Changed in: gdm (Ubuntu) Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.l

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-29 Thread Gunnar Hjalmarsson
You are right, my mistake. Sorry. Should know better than taking shortcuts when it comes to packaging in Ubuntu. :( I updated the MP, which now also includes the C code snippet. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-29 Thread Martin Pitt
Hm, no, gdm is supposed to know both LANG and LANGUAGE, the upstart job explicitly sources /etc/default/locale before launching gdm-binary: if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE elif [ -r /etc/environment ]; then . /etc/envir

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-29 Thread Gunnar Hjalmarsson
Martin, That code runs fine without crashing. Thanks! In Maverick it also suggests language out from LANGUAGE, as expected. In Natty, though, it suggests language out from LANG even if LANGUAGE is set in /etc/default/locale. It seems like getenv("LANGUAGE") does not return anything in Natty, so t

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-28 Thread Martin Pitt
Sorry, please use "strchr" instead of "index", the latter is deprecated. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/740754 Title: Language selection for newly created user confusing -- ubuntu-b

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-28 Thread Martin Pitt
Gunnar, returning a pointer to a static array on the stack will cause the crash. Can you please try with char *langlist, *language; [...] if (langlist != NULL && strlen(langlist) > 0) { char *colon = index (langlist, ':'); if (colon) language = g_strndup (lan

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-23 Thread Gunnar Hjalmarsson
The above code was originally tested in Maverick. I noticed that declaring the language array with 100 elements instead of 50 reduces the risk for a segmentation fault. (50 or 500 elements trigger typically errors, while 100 works more safely!?) Anyway, when I changed from 50 to 100 in the above c

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-23 Thread Gunnar Hjalmarsson
** Changed in: gdm (Ubuntu) Status: New => In Progress ** Changed in: gdm (Ubuntu) Assignee: (unassigned) => Gunnar Hjalmarsson (gunnarhj) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/740

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-23 Thread Launchpad Bug Tracker
** Branch linked: lp:~gunnarhj/gdm/lang-fixes -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/740754 Title: Language selection for newly created user confusing -- ubuntu-bugs mailing list ubuntu-bug

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-23 Thread Gunnar Hjalmarsson
Tried the below code, but no success. Unlike the previous code, the screen didn't turn black. Progress? static const char * get_default_language_name (GdmSessionDirect *session) { char *langlist; char language[50]; if (session->priv->saved_language != NULL) { return se

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-23 Thread Gunnar Hjalmarsson
As regards item 2, maybe [ -f "$HOME/.xsession-errors.old" ] ? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/740754 Title: Language selection for newly created user confusing -- ubuntu-bugs mailin

[Bug 740754] Re: Language selection for newly created user confusing

2011-03-22 Thread Gunnar Hjalmarsson
** Attachment added: "failed-attempt.txt" https://bugs.launchpad.net/bugs/740754/+attachment/1932314/+files/failed-attempt.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/740754 Title: Languag