Setting a lcoale globally
freebsd at edvax.de
Fri Jun 14 19:12:06 UTC 2013
On Fri, 14 Jun 2013 12:13:34 -0400, Mike. wrote:
> I would like to set the locale of my 9.1 server to
> globally, i.e., put the locale entry in one file, and then have the
> locale propagate as I go into other shells and run various scripts.
You can add this to /etc/csh.cshrc as it will be inherited by
all interactive shells (login shells), unless of course they
override it with ~/.cshrc:
setenv LANG en_US.ISO8859-1
It's also possible to add it to /etc/profile and even make an
addition to /etc/login.conf's "default" setting:
I'm not fully sure about that, as I'm using a centralized con-
figuration as suggested per /etc/csh.cshrc to have specific
environment settings, shell configuration items and aliases
_system-wide_ for all users. (Note that this might require
your attention on system updates!)
> I have spent some quality time with google, and the best I have been
> about to ascertain is that I need to sprinkle the LANG setting
> throughout the various ENV variables and .profile, .cshrc, .bashrc, and
> whatever files spread across my directory tree.
For _custom_ scripts, I would suggest to put that setting at the
top of those scripts so they will make sure the correct $LANG is
being set, independently from possible other users' values.
> That really seems counter-intuitive to me.
> Is it at all possible for me to specify in once place *somewhere" that
> the entire server is to use the locale setting LANG="en_US.ISO8859-1" ?
>From my individual experience, adding it to the global C-Shell
configuration works, but I can't predict that for your exact
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions