How to set LANG variable before X starts?

Asked by Konstantin Tokarev

I'm Russian user so I'd like to use ru localization as possible :)

When I login as root all seems to be OK. All program which have Russian localization start in Russian, and some items of Fluxbox's main menu are in Russian.
But when I login as user, english localization was used. It seems strange because /etc/environment contains right value of LANG="ru_RU.UTF-8"

I've added to my ~/.bashrc line
                export LANG=ru_RU.UTF-8
and now if I start applications from uxterm or, for example, in tty2, they use ru locale. But when I start this applications from main menu of Fluxbox, they use english locale, and all menu items are in English.

I tried to strat X manually with startx command. I've found that X starts with right value of LANG, but unfortunatly its settings differed from normal. For example, screen resolution was less than in "normal" mode (1024x768 against 1280x1024) and I couldn't set resolution 1280x1024.

Please, help me, how to set desired value of LANG before logging in?
I know that there are many initial scripts, may be I should add export line to one of them, to set LANG value before X starts. But I'm afraid I can crash the system.

Question information

English Edit question
The Fluxbuntu Linux Project Edit question
No assignee Edit question
Solved by:
Konstantin Tokarev
Last query:
Last reply:
Revision history for this message
Konstantin Tokarev (annulen) said :

I've found a solution: I added this line to /etc/profile. All works as I want)