Bug 725258 - /etc/sysconfig/i18n settings may not applied to X sessions
Summary: /etc/sysconfig/i18n settings may not applied to X sessions
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.1
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-24 19:37 UTC by arch harris
Modified: 2012-08-02 08:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-02 08:51:58 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description arch harris 2011-07-24 19:37:10 UTC
Description of problem: /etc/sysconfig/i18n variables do not get set properly in X sessions.


Version-Release number of selected component (if applicable):


How reproducible: Everytime


Steps to Reproduce:
1.Set LC_COLLATE in /etc/sysconfig/i18n (but nowhere else)
2.Login to an X screen.
3. Execute echo $LC_COLLATE.
  
Actual results: LC_COLLATE is not set to the i18n value


Expected results: It should be set to the i18n value.


Additional info: The /etc/profile.d/lang.sh script used to contain this:

sourced=0
for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do
    [ -f $langfile ] && . $langfile && sourced=1
done

but has been changed to

sourced=0
if [ -n "$LANG" ]; then
    saved_lang="$LANG"
    [ -f "$HOME/.i18n" ] && . "$HOME/.i18n" && sourced=1
    LANG="$saved_lang"
    unset saved_lang
else
    for langfile in /etc/sysconfig/i18n "$HOME/.i18n" ; do
        [ -f $langfile ] && . $langfile && sourced=1
    done
fi

I believe GDM defaults LANG to "en_US", so the true part of the "if" executes which never checks for /etc/sysconfig/i18n so /etc/sysconfig/i18n never executes.  

I believe there is also a second bug in how this works.  If GDM is setting the default LANG to "en_us" and a user overrides that with a setting in ~/.i18n, shouldn't the users setting for LANG be the one in effect.  But with the revised "lang.sh" the user's setting is overwritten by the previous setting.

Comment 2 Bill Nottingham 2011-07-25 19:46:35 UTC
The language setting from GDM comes from the user choice, so it should take precedence over the stored setting.

Why would you want to only set one setting and leave the others changeable?

Comment 3 Suzanne Logcher 2011-10-06 18:51:06 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.
               
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.


Note You need to log in before you can comment on or make changes to this bug.