Comment 7 for bug 1019314

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote : Re: Re: [Pkg-xfce-devel] Bug#679386: lightdm: Language selection is ignored in session, $LANG is system default

The reporter of the Debian bug report came up with the idea to set LANG as a workaround during Xsession setup.

In order to make language selection work, create the script /etc/X11/Xsession.d/39-lightdm-dmrc-fix with the following lines:

#!/bin/bash
TEMPLANG=$(cat "$HOME/.dmrc" | grep ^Language= | cut -d '=' -f 2 | sed 's/utf8/UTF8/')
[ ! -z "$TEMPLANG" ] && export LANG=$TEMPLANG
TEMPLANG="$(echo "$LANG" | sed -e 's/\([a-z]*_[A-Z]*\)\.[A-Z]*\-[0-9]/\1/g')"":""$(echo "$LANG" | sed -e 's/\([a-z]*\)_[A-Z]*\.[A-Z]*\-[0-9]/\1/g')"
[ ! -z "$TEMPLANG" ] && export LANGUAGE=$TEMPLANG

Due to another bug in lightdm, however, the information from ${HOME}/.dmrc is invalid, please see Debian bug #690899 if the above script doesn't work.

Adrian