Something along the lines in the below diff would make the first LANGUAGE item (and not the LANG value) be suggested in GDM's language picker for newly created users: --- old/daemon/gdm-session-direct.c 2011-03-23 05:50:32 +0100 +++ new/daemon/gdm-session-direct.c 2011-03-23 06:00:33 +0100 @@ -691,10 +691,19 @@ static const char * get_default_language_name (GdmSessionDirect *session) { + char *langlist, *language; + if (session->priv->saved_language != NULL) { return session->priv->saved_language; } + langlist = getenv("LANGUAGE"); + + if (langlist != NULL && strlen(langlist) > 0) { + strncpy( language, langlist, strcspn(langlist, ":") ); + return language; + } + return setlocale (LC_MESSAGES, NULL); } Unfortunately the code makes GDM crash at login... I'm probably close, though, because outside of GDM this test code works without complaints: #include #include #include main() { char *langlist, *language; langlist = getenv("LANGUAGE"); if (langlist != NULL && strlen(langlist) > 0) { strncpy( language, langlist, strcspn(langlist, ":") ); printf("%s\n", language); } else { printf("%s\n", "LANGUAGE is empty."); } }