Sorry - Newbie question…
I’m running Debian Lenny and fvwm 2.5.26 and I just can’t manage to make my programs run in my native language (- which is german btw).
Got my locales-setting in several configuration files, such as
/etc/profile
~/.bashrc
~/.profile
~/.xsession
always saying
export LANG=de_DE
orLANG=de_DE
export LANG
If I run a program with “mrxvt”, I’ve got the correct LANG-Setting. If I run it with “gmrun” (which is similar to gksu, kdesu, gnome-panel-launcher, etc…) I got NO LANG-Settings at all. Here is my environment, when I run some program with gmrun (and also fvwm):
This has nothing to do with FVWM at all, by the way. In debian, exporting your locale is fine, but dpkg-reconfigure locales is more important setting it up to be shell-agnostic.
Then clearly your shell isn’t setting that at all.
You’re not alluding to how you start FVWM. If it’s via startx or any display manager which reads ~/.xsession, and you have your “export LANG=foobar” line in ~/.bashrc or ~/.bash_profile then just:
[ -f ~/.bash_profile ] && . ~/.bash_profile
(Making sure you reference the right file), before you “exec fvwm” in your ~/.xsession file.
Mmh. I can’t do this with “dpkg-reconfigure locales” - it’s just about choosing locales and generate them.
But there’s another script called “set-language-env”, which sets up
~/.Xresources (for using the right fonts)
~/.bash_profile (“Executed when bash is invoked as a login shell”)
~/.bashrc
~/.emacs
~/.xsession
for the use of my language. Sadly, this doesn’t help for fvwm.
It’s started by wdm and I’m assuming it reads my ~./xsession - which should be set up correctly because of “set-language-env”.
O.k. - maybe wdm is to blame for my situation. Thanks for pointing out, that fvwm has something to do with it! So, I’m trying to use another display manager.
That’s because this has: nothing to do with FVWM at all and everything to do with the surrounding environment before you start FVWM. You’ve even given yourself the answer on how to fix your situation in the list of files above, and I even gave you the answer. But I’ll repeat it again, rewording it.
A display manager that reads ~/.xsession does so to allow you to setup things before invoking your window manager. If you do (as I said):
[ -f ~/.bash_profile ] && . ~/.bash_profile
Then it assumes you have in ~/.bash_profile some export line to set your locale. Doing that before you start FVWM means you have in your environment everything you’ll need. When you launch FVWM from within that file, presumably as:
exec fvwm
FVWM is inheriting from the environment the settings you had in ~/.xsession – this means that any subsequent shells launched (say via xterm) use this environment.
I do believe you, that this has nothing to do with fvwm!
It’s a bug in wdm! I installed xdm instead and it works - with all the configuration files and environment variables unedited. I assumed, wdm does read the ¨/.xsession, but in fact, it doesn’t!
Thanks again for spending your time for my problem. This thread is solved.