Re: Unable to set LC_COLLATE system-wide

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

 



On Tue, 2008-06-03 at 11:41 -0430, Patrick O'Callaghan wrote:
> On Tue, 2008-06-03 at 16:07 +0100, John Horne wrote:
> > On Tue, 2008-06-03 at 07:52 -0700, gerrynix wrote:
> > > > > On Tue, 2008-06-03 at 13:41 +0100, John Horne wrote:
> > > > > > I have noticed that despite setting both LC_COLLATE and LANG in
> > > > > > the /etc/sysconfig/i18n file, it seems that the LC_COLLATE does
> > > not
> > > > > > get set for normal users, but does get set for root.
> > > > > 
> > > > > Did you reboot?
> > > > > 
> > > > Yup.
> > > 
> > > OK, just checking.
> > > 
> > > The action appears to be in the file /etc/profile.d/lang.sh, where there
> > > is a check for $HOME/.i18n. If this exists it's sourced, except that
> > > $LANG is preserved. Then there's a bunch of other special cases which
> > > you would need to pore over. Of course if the user doesn't have a
> > > $HOME/.i18n file it just sets some standard defaults.
> > > 
> > > I don't know if any of this explains what you're seeing.
> > > 
> > > poc
> > > 
> > > Not sure if this will fill your needs, but you will have no further
> > > probs... Place the assignments in the /etc/profile. Of course, they
> > > are then set into the environment on a per login basis. If you have
> > > *csh users, also place the assignments in the /etc/csh.login. 
> > >
> > Okay, thanks for the replies.
> > 
> > I'm still a bit confused though. On my F9 system I have
> > an /etc/sysconfig/i18n file, but no '$HOME/.i18n'. So according to
> > the /etc/profile.d/i18n file, it should execute:
> > 
> >       for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do
> >         [ -f $langfile ] && . $langfile && sourced=1
> >       done
> > 
> > Then a bit further on we have:
> > 
> >   [ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE
> > 
> > Since I have set LC_COLLATE="C" in /etc/sysconfig/i18n, then LC_COLLATE
> > should be exported.
> 
> Correct.
> 
> > Perhaps I need to test a little bit more.
> 
> All I can think of is that some other script is undoing what you set
> (e.g. /etc/profile or the user's ~/.bash_profile', `~/.bash_login', and
> `~/.profile').
> 
> One thing you might try is to temporarily add lines such as the
> following to each of the above:
> 
> echo .profile: $LC_COLLATE >> /tmp/BASH_DEBUG
> 
> making sure /tmp/BASH_DEBUG is world-writeable of course.
> 
Well, it gets a bit more confusing. I ran my F9 PC at runlevel 3 and it
showed that /etc/profile was run through once.
When /etc/profile.d/lang.sh ran it set LANG and LC_COLLATE. When I
actually logged in, both were set correctly. Since the RHEL servers run
at runlevel 3, this probably explains why the settings are correct on
there.

If I ran the PC to runlevel 5 (after rebooting) then logging showed
that /etc/profile was run through twice (and both times before
~/.bash_profile or ~/.bashrc ran). The first run was as above, but when
the second run started, LC_COLLATE was unset and was not set again (even
though lang.sh ran a second time).

The trouble is I do not know what the login sequence is when logging
into an X window system. As such, I cannot say what is being run between
the first run of /etc/profile and the second.

At runlevel 5, if I switch to a virtual console and log in, then both
variables are set correctly.

Since I'm a bit stumped as to where to go from here, but it definitely
seems that something 'odd' is going on, I think perhaps this should go
up to bugzilla?



John.

-- 
---------------------------------------------------------------
John Horne, University of Plymouth, UK  Tel: +44 (0)1752 587287
E-mail: John.Horne@xxxxxxxxxxxxxx       Fax: +44 (0)1752 587001

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux