[Pkg-xfce-devel] Bug#679386: Update
Vladimir K
pzs-fs at yandex.ru
Sat Oct 20 14:40:15 UTC 2012
Yes, I know about ~/.xsessionrc.
But this bug is about choosing language in greeter GUI.
Updated workaround:
--------------
#!/bin/bash
# workaround for session language selection in lightdm greeter
# use .dmrc or accountsservice data (if accounts-daemon is running)
if pidof accounts-daemon
then
echo accounts > /tmp/wtf
TEMPLANG=$(cat "/var/lib/AccountsService/users/$USER" | grep ^Language= | cut -d '=' -f 2 | sed 's/utf8/UTF8/')
[ ! -z "$TEMPLANG" ] && export LANG=$TEMPLANG
TEMPLANGUAGE="$(echo $LANG | cut -d '@' -f 1 | cut -d '.' -f 1):$(echo $LANG | cut -d '@' -f 1 | cut -d '.' -f 1 | cut -d '_' -f 1)"
[ ! -z "$TEMPLANGUAGE" ] && export LANGUAGE=$TEMPLANGUAGE
else
echo dmrc > /tmp/wtf
TEMPLANG=$(cat "$HOME/.dmrc" | grep ^Language= | cut -d '=' -f 2 | sed 's/utf8/UTF8/')
[ ! -z "$TEMPLANG" ] && export LANG=$TEMPLANG
TEMPLANGUAGE="$(echo $LANG | cut -d '@' -f 1 | cut -d '.' -f 1):$(echo $LANG | cut -d '@' -f 1 | cut -d '.' -f 1 | cut -d '_' -f 1)"
[ ! -z "$TEMPLANGUAGE" ] && export LANGUAGE=$TEMPLANGUAGE
fi
--------------
More information about the Pkg-xfce-devel
mailing list