Yet another localisation question (YALQ)

Hi, there!

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):

SSH_AGENT_PID=3676 SHELL=/bin/bash FVWM_USERDIR=/home/mitsch/.fvwm HOSTDISPLAY=scheidungsgrund:0.0 USER=mitsch SSH_AUTH_SOCK=/tmp/ssh-DRQtad3649/agent.3649 PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games _=/usr/bin/env PWD=/home/mitsch HOME=/home/mitsch SHLVL=2 LOGNAME=mitsch DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-hQdnMAUGAt,guid=917ef1bc59c7f0c8edd0b7da48f3ad52 FVWM_MODULEDIR=/usr/lib/fvwm/2.5.26 DISPLAY=:0.0

You see: No LANG at all!
So: Where have I got to write my locale to? Or do I have to “export LANG=de_DE” to every menu-item in the fvwm-config?

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.

– Thomas Adam

Thanks for the fast reply!

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.

– Thomas Adam

I do believe you, that this has nothing to do with fvwm! :slight_smile:

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.

Ah. But you said:

Perhaps a Freudian slip.

It probably does actually if you put it in “failsafe” option – other DMs like {G,K}DM manage this. Either way, startx suffices.

– Thomas Adam

No. Just my bad english…

Greetings!