It seems that /etc/locale.conf is ignored in Centos 7. As a traditionalist who prefers things sorted lexicographically rather than indiscriminately with case ignored and dates to be displayed in the form "Sep 11 2008", I have always added lines to this file: $ cat /etc/locale.conf LANG="en_US.UTF-8" # Fix collating sequence for sort and ls export LC_COLLATE=C # Fix time format in ls -l to Sep 11 2008 export LC_TIME=C and it's always worked - in UNIX, all Fedora's, Centos 6 (I think). Now, in a fresh installation of Centos 7 (virtual, kvm) these exported environment variables are nowhere to be seen. If I manually type export LC_COLLATE=C in an xterm, sorting works "properly" again. Why is /etc/locale.conf ignored in Centos 7 - and not in Fedora 20? While it shouldn't matter, I'll mention that I'm running Xfce4 with mostly xterm windows - where the LC_COLLATE and LC_TIME variables are absent from `env`. However, if I revert to a non-X console (CTL-ALT-F2), these variables are present. So, /etc/locale.conf isn't totally ignored. Perhaps xterm, or Xfce4, or that whatever it is awful undocumented GUI thing that starts X, has simply forgotten the concept of "export". -- David A. De Graaf DATIX, Inc. Hendersonville, NC dad at datix.us www.datix.us The trouble with our liberal friends is not that they're ignorant; it's just that they know so much that isn't so. - Ronald Reagan
On Tue, Nov 11, 2014 at 12:27:13PM -0500, David A. De Graaf wrote:> It seems that /etc/locale.conf is ignored in Centos 7. > > So, /etc/locale.conf isn't totally ignored. Perhaps xterm, or Xfce4, > or that whatever it is awful undocumented GUI thing that starts X, > has simply forgotten the concept of "export".Well, I have isolated the problem to that "awful undocumented GUI thing that starts X" - namely, gdm! I first switched to multi-user.target, which provides the old familiar UNIXy login: and ran 'startxfce4'. The `env` contained both LC_COLLATE=C and LC_TIME=C. Then I switched back to graphical.target, but also did yum install lightdm, systemctl disable gdm, systemctl enable lightdm, and after rebooting with a graphical login, found that my two environment variables were present in the enviroment. So gdm, once again, demonstrates a flagrant disregard of longstanding standards and conventions. Ugh! -- David A. De Graaf DATIX, Inc. Hendersonville, NC dad at datix.us www.datix.us "That state which separates its warriors from its scholars will have its thinking done by cowards and fighting done by fools" -- Thucydides - The Pelopenisia