This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: base-files 4.0-9: LANG is set to the system default, why not the user selection?


On 16 February 2012 20:05, David Sastre Medina wrote:
> For the first, I apologize. WRT the second, here's a new attempt:
> 'locale' is set system-wide in /etc/profile.d/tzset.* to provide
> a new functionality, that, IIRC, was included in the announcement of
> the base-files' release.
> Also, 'locale' _can_ be set at a user-defined level, to provide the
> user the ability to set 'locale' despite system-wide setting, wich
> could be needed in multi-user environments, for instance.

What's the reason for setting LANG to the system language in
/etc/profile though? /etc/profile may be a system-wide file, but it is
always sourced in a particular user context. There are several
problems with relying on ~/.bash_profile to set it to the user's
language:

1. It incurs an extra fork.
2. As Peter pointed out, it only works for new users. Existing users
can't reasonably be expected to merge /etc/skel/.bash_profile changes
into their own file.
3. The override in ~/.bash_profile is unconditional, which means that
LANG settings in mintty's options, in cygwin.bat, or the user's
Windows environment are ignored.

Therefore, please consider changing /etc/profile.d/lang.[c]sh to use
`locale -uU` and dropping the LANG setting from
/etc/skel/.bash_profile.

Regards,
Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]