Comment 7 for bug 1069494

Revision history for this message
Psy[H[] (vovik-wfa) wrote :

tested lightdm 1.9.9 with gtk greeter 1.8.2.
There is an improvement!
~/.dmrc is being read by greeter, selectors for language and session are presented with correct values.
Language parameter is being written to ~/.dmrc, but not exported into environment. System default locale is still used.
Session parameter writing is confusing. Sometimes it is written, sometimes it is not. I thought it mixes default session with specific session which is currently default, but I failed to find reproducible pattern.
Chosen session seems to be applied regardless of whether it was written to ~/.dmrc

I made a workaround for locale by creating xsession snippet /etc/X11/Xsession.d/21-lightdm-locale-fix with content:
------------------------------------------
# get locale from .dmrc if lightdm is used
if pidof lightdm >/dev/null 2>/dev/null
then
 LANG="$(cat "$HOME/.dmrc" | grep 'Language=' | tail -n 1 | cut -d '=' -f 2- | sed 's/utf/UTF/g')"
 LANGUAGE="$(echo "$LANG" | cut -d '.' -f 1):$(echo "$LANG" | cut -d '.' -f 1 | cut -d '_' -f 1)"
 export LANG
 export LANGUAGE
fi
------------------------------------------