[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Is there / should there be a default locale setting on Debian systems ?



Hi,

a short while ago I realized that quite a few aspects of a Debian system can
actually be localized: many commands can produce messages in languages other than
English, there are translated manpages etc. In most cases, the program is told to
use localized messages etc. by setting the environment vars LANG, LC_ALL and
friends (see e.g. man bash 1 [search for 'LANG']).

However, I only became aware of that fact by accident. In addition to that, I had
to try and figure out myself where to put the 'export LANG=de_DE' (I'm German) to
make it available to all applications. Just putting it into /etc/profile is not
enough, because X apps may not get the setting that way if you use xdm. 

Therefore I think the current way of setting the locale might be improved. 
I'll try to list where I believe the problems are and the solutions that seem
reasonable to me. Since I have limited experience with system administration, I'd
be grateful for any comments.

Problems & possible solutions:

1) There is no default locale setting
While every user should be able to set his/her personal locale, a system wide default
would certainly helpful. A default setting should always try to be as reasonable as
possible, and the present default is 'always use US-English', clearly not a reasonable
default for many systems.
Proposed solution: Have a question in the installation tool that asks for the default
locale, just like machine name and timezone are already prompted for (btw, the timezone is 
of course only a default setting as well, just like the locale would be according
to my proposal). 
Extension: Amend the Debian policy to give a place where the default locale is stored
(/etc/default-locale ?). Does that make sense, or is it enough to have the locale
in the environment vars LANG , LC_CHAR & friends?

2) There is no place to put a systemwide environment var setting that should be
available to *all* applications
If you put a setting into /etc/profile , it will only be read by login shells 
starting up, not e.g. by X programs. For those, it needs to be put into 
/etc/X11/Xsession . For programs started by e.g. cron, I don't really know
myself.
Proposed solution: Have a file /etc/environment for environment settings that should
be available to every application. That file could then be sourced by /etc/profile
and by /etc/X11/Xsession (and by cron & similar programs?). The default Xsession
file already does just that, by the way.

3) There is no place to put a personal environment var setting that should be
available to *all* applications
Also see 2). If a user wants a personal locale (and other setting), there is 
at present no obvious place to put it.
Proposed solution: Maybe have a file  ~/.environment that is source by the default
.xsession and the default startup script of any shell. Or does it make more sense
to compile /.environment into the respective programs?

4) Does all/some of that need to go into the Debian policy?
 
I hope I'm not being off-topic, and I'd appreciate any kind of comment.

Greetings,

Sebastian Leske















Reply to: