Description: LANGUAGE environment variable fix + utf-8@valencia support TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . ldm (2:2.2.9-1ubuntu0.1) precise-proposed; urgency=low . * Cherry-pick upstream fix for ldmfinod returning hidden and invalid sessions. (LP: #991745) Author: Stéphane Graber Bug-Ubuntu: https://bugs.launchpad.net/bugs/991745 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: other, Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- ldm-2.2.9.orig/ldminfod/ldminfod +++ ldm-2.2.9/ldminfod/ldminfod @@ -190,7 +190,8 @@ if __name__ == "__main__": defaultlocale = line.split('=')[1].strip('"') defaultlocale = defaultlocale.replace('UTF8', 'UTF-8') - print "language:" + defaultlocale + if len(defaultlocale) > 0: + print "language:" + defaultlocale # Get list of valid locales from locale -a try: lines = Popen(['locale', '-a'], stdout=PIPE).communicate()[0] @@ -212,16 +213,18 @@ if __name__ == "__main__": langs=new_langs langs.sort() + supported_encodings = ['.utf8','.utf8@valencia'] for lang in langs: lang = lang.rstrip() - if lang.endswith('.utf8'): - # locale returns .utf8 when we want .UTF-8 - lang = lang.replace('.utf8','.UTF-8') - else: - # if locale did not end with .utf8, do not add to list - continue - if lang != 'POSIX' and lang != 'C' and lang != defaultlocale: - print "language:" + lang + for encoding in supported_encodings: + if lang.endswith(encoding): + # locale returns .utf8 when we want .UTF-8 + lang = lang.replace('.utf8','.UTF-8') + else: + # if locale did not end with .utf8, do not add to list + continue + if lang != 'POSIX' and lang != 'C' and lang != defaultlocale: + print "language:" + lang try: lines = get_sessions('/usr/share/xsessions/') --- ldm-2.2.9.orig/rc.d/X50-generate-env +++ ldm-2.2.9/rc.d/X50-generate-env @@ -13,7 +13,8 @@ if [ -z "$LDM_LANGUAGE" ]; then LDM_LANGUAGE=$LANG fi -MY_LANG="LC_ALL=$LDM_LANGUAGE LANGUAGE=$LDM_LANGUAGE LANG=$LDM_LANGUAGE" +AUX_LANGUAGE=$(echo $LDM_LANGUAGE | sed -e 's/\.UTF-8//g') +MY_LANG="LC_ALL=$LDM_LANGUAGE LANGUAGE=$AUX_LANGUAGE LANG=$LDM_LANGUAGE" export MY_LANG # Set the DISPLAY env, if not running over encrypted ssh