Hi Martin, I considered your comments, and rewrote the patches. Even if it resulted in a few more lines of code, I believe you will find that it makes sense. As regards language-selector, it now updates an LC_MESSAGES line in ~/.profile. Given that, it was possible to put the sedding/writing stuff in GDM into a function, which _only_ will be called when the user has changed the language from the greeter. On 2010-10-13 18:49, Martin Pitt wrote: > ... for many languages there isn't > actually much difference. E. g. for German, Launchpad/Ubuntu > langpacks just ship "de", since the variations in the different > countries are negligible and just lead to bloat or inconsistent > translations. The major exceptions are Portugese, Chinese, and > British English. > > So if we turn this into a pure language selector, it could/should > become much smaller. However, I agree that this is only a secondary > issue. Didn't know that about German. Of course it would make more sense if the language lists only displayed options with some significance. There are details involved that make things a little more difficult. For instance, since there is no 'de.utf8' locale, and if you would select 'de' without a country code, the current code assigns 'de_AT.utf8' to LC_MESSAGES. The reason is that you need to stick to available locales when you set LC_MESSAGES, or else the system produces annoying warning messages (and Austria shows up first when you sort the locales...). > So, after this discussion I'm not opposed to turning gdm into a pure > language selector, and ask users to use language-selector (ugh, how > confusing :) ) to setup the full locale. But if we do that, I'd like > it to be done properly, i. e. upstream, I'm not sure of what you mean by upstream in this case. Had a look at Debian's Xsession file, and there seems to be more differences than similarities. Anyway, my latest merge proposals are with lp:language-selector respective lp:gdm. Please let me know what else I can do. > and have gdm set $GDM_LANG > without requiring extra hacks like sed 's/^en\./en_US./' (remember > that this stuff runs on every boot and costs precious boot time). > > Also, changing ~/.profile in Xsession.in is still an absolute no-go > for me. gdm writes its settings to ~/.dmrc, and that's where it > should live. grepping/testing/writing ~/.profile at each boot is > just wrong. Well, most of that is no longer done at each boot, but only when the users change language in GDM. Hopefully that's sufficient to relieve you from the concern, considering that writing to disk is necessary for changes to be persistent. Or is there any other way? Ok, there are still a couple of "seds" to be able to tell if the user changed anything, but please note that they use basic regular expressions, and don't load any heavy-weight regex engine like e.g. Perl's ditto. > I hope I'll be able to convince you about this point, then we'd have > consensus. :-) I believe I addressed your concerns, but with another approach. The latest code is available for testing (in Maverick) at https://launchpad.net/~gunnarhj/+archive/locale-test For the case you feel it's time to 'press the button', please note that the patches for GDM respective language-selector ought to be merged simultaneously to avoid a new cause for inconsistency and confusion. Thanks for a constructive and respectful diskussion! / Gunnar