Page 1 of 1

[Solved] LXDM default session and language

Posted: Wed Oct 14, 2009 11:08 pm
by knedlyk
It was not so easy to find that the languages are listed /usr/share/lxdm/lang.txt file, and options for lxdm greater are in /usr/share/lxdm/lxdm.glade. I'm just wondering, how the lxdm set the default X session and the default system language?

In lang.c I see that the default locale is "" (cb(arg,"","Default");), in the most linux distributions it means that the default is en_US.UTF-8. But probably it is not OK in case when somebody use different locale, and don't want every time to choose it from lxdm language menu, and just want to setup up it once for all sessions.

Perhaps it logically to use something like "env | grep LANG" to get the default system locale...

Re: LXDM default session and language

Posted: Thu Oct 15, 2009 2:15 pm
by knedlyk
Finally I found what was the matter. Everything was in /etc/lxdm/Xsession file. I slightly changed it, so below code you should add in the beginning of the file:

Code: Select all

test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
Next you have to change /etc/profile.d/lang.sh into /etc/profile.d/locale.sh in the lines:

Code: Select all

	if [ -r /etc/profile.d/lang.sh ]; then
		. /etc/profile.d/lang.sh
	fi
or just simply symlink /etc/profile.d/lang.sh to /etc/profile.d/locale.sh.

To maintener of lxdm: you should add the above changes in svn tree.

Re: [Solved] LXDM default session and language

Posted: Wed Oct 21, 2009 4:31 pm
by dgod
default languange setting is diffrent in distributions, so I'll not read config from system.

To LXDM, when I use Default Languange, I'll just left env LANG not changed.