LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-17-2007, 01:10 PM   #1
echowarpt
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
why do settings in /etc/profile.d/lang.sh get overridden?


This is a fork of my earlier question as to why perldoc was showing garbage chars in place of single quotes:http://www.linuxquestions.org/questi...98#post2634598
(fixed it by manually setting LC_ALL=en_US)

I'm curious why the settings in /etc/profile.d/lang.sh [export LANG=en_US] gets overridden to en_US.UTF-8.
[note: and yes the en_US.UTF-8 export IS commented out in that file

[And please advise (or point to docs) if the LANG variable has no effect on the LC_* variables.]

Does anyone know where this is getting overridden?

Note: I did a global grep on /etc/ for en_US.UTF-8 and found the following line in /etc/gdm/locale.alias (I have dropline-gnome installed) -- could this be the cause?
English(USA) en_US.UTF-8,en_US

also, I'm using linuxpackage's Terminus font so I don't believe the font is the problem.

thanks!

further note: I realize I can just probably fix this by setting these vars in /etc/profile, but would still like to find the underlying cause.

further, further note -- also any pointers on docs to look at for setting up unicode correctly?

Last edited by echowarpt; 02-17-2007 at 02:03 PM.
 
Old 02-19-2007, 09:52 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,003
Blog Entries: 5

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782
Remember /etc/profile is the GLOBAL setting. Anything in the user's .profile (or .bashrc or .bash_profile) will be executed AFTER /etc/profile (i.e. a user LOCAL setting). Also if any of THOSE source any other scripts or commands those sourced scripts or commands may be overriding values themselves.

I once worked on a setup that had /etc/profile, .profile then .profile called a script which called another script which in turn called yet another script and it took a while for me to trace where various environment variables were coming from.
 
Old 02-19-2007, 02:31 PM   #3
echowarpt
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlightner
Remember /etc/profile is the GLOBAL setting. Anything in the user's .profile (or .bashrc or .bash_profile) ...
good point, i know thats not the case here however, as my .bashrc contains only settings i've personally set, .bash_profile, is symlinked to bashrc and .profile doesn't exist.

double-checked to make sure, but yeah, no help there, thanks though.
 
Old 02-19-2007, 08:13 PM   #4
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 30
If you log in through GDM/XDM/KDM/*DM (i.e., not at the console), then /etc/profile* WON'T be run. It will only run when you start a login console (like "xterm -l", IIRC).

On the other side, I don't seem to be having this issue when I set LANG=es_MX (when using es_MX.utf8, I can't get ViM understand the ""s), but then I log in from console and don't have dropline installed.

Try starting a virtual terminal, and then do
Code:
"bash -i"
# or 
"bash -".
It should start a login shell and it should source the /etc/profile* files.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ulimit settings in /etc/profile darn Linux - Newbie 1 02-10-2005 11:11 AM
switch profile/ settings in different locations raynet Linux - Wireless Networking 5 02-02-2005 11:54 AM
LANG settings r_213 Linux - Software 4 01-13-2005 03:26 AM
Hostnames Being Overridden RWild Linux - Networking 0 12-16-2002 09:18 PM


All times are GMT -5. The time now is 01:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration