Difference between revisions of "Talk:Locale"

From ArchWiki
Jump to: navigation, search
(locale.conf quotes: rm closed discussion)
(21 intermediate revisions by 15 users not shown)
Line 1: Line 1:
[[User:Jf|jf]]: Is setting the $LC_ALL var really necessary??? It would seem (at least on my system) that it's not. All i have to do is run locale-gen, and set LOCALE in /etc/rc.conf, and that's it. What do u guys think?
+
== .bashrc ==
  
Just ignore this article. The part at the top is ok, but the .bashrc stuff is a bit misleading. [[User:Byte|byte]] 21:46, 13 October 2006 (EDT)
+
.bashrc is only used by interactive bash sessions, right? So that if you login with KDM in KDE (or GDM gnome), the whole KDE session will inherit the locale set by init->KDM and will not use the one set in .bashrc!
  
This should be more to the point now. [[User:Byte|byte]] 19:09, 13 October 2006 (PDT)
+
I guess a "source ~/.bashrc" in ~/.xprofile would solve this.
  
[[User:Jf|jf]]: ah, ok, thanks, byte....
+
--[[User:Luetti|Luetti]] 17:56, 8 July 2008 (EDT): I don't think so. I tried almost the whole day to set only LC_PAPER="de_DE.utf8". Trying this in almost every file possible (/etc/profile, .xprofile, .bashrc, /etc/rc.local) seemed to work, as I used "locale" in terminal to verify it. But this only worked for applications I started from terminal, but not for applications started from the gnome-menu. So I came to the conclusion it has something to do with gdm. After having a closer look to /etc/gdm/xsession the problem was clear. GDM probably always sets $GDM_LANG on login. When $GDM_LANG is set, xsession will unset all other LC-variables. Just commented out this part and now everything works as desired.
 +
If this is a common and/or important problem, I will add this to the article. What do you think?
 +
:I think more information on this is missing in the article. I want to have LC_MESSAGES=C, LANG=de_DE.UTF-8 and LC_TIME=en_DK.UTF-8, but gnome seems to overwrite the settings. When I comment out the lines with GDM_LANG in /etc/gdm/Xsession, I can no longer log in. I would also appreciate it if someone who knows the role of the settings in "Region&Language" in gnome-control-center could add this to the article. Where are they saved and how do I disable them in favor of detailed settings (globally in /etc/locale.conf or locally in ~/.profile)? [[User:Viktordick|Viktordick]] ([[User talk:Viktordick|talk]]) 21:43, 13 April 2013 (UTC)
  
== "invalid charset name" ==
+
== LC_MESSAGES ==
  
hello ppl, I was having this error message while trying to access man pages and running less, it turns out that the LESSCHARSET environment variable does not recongnize utf if it is written like 'utf8' it will only work if you write it like 'UTF-8' hope it helps!
+
Setting LC_MESSAGES to "C" or "POSIX" (as opposed to "en_US.UTF-8" for example), can save tens of syscalls in a simple program without any loss (since all you need is plain English anyway). It's 29 less syscalls (on my system) for a simple "ls /no/such/dir".  Add this info inside?  --[[User:Philomath|Philomath]] ([[User talk:Philomath|talk]]) 07:55, 2 July 2012 (UTC)
  
== .bashrc ==
 
  
.bashrc is only used by interactive bash sessions, right? So that if you login with KDM in KDE (or GDM gnome), the whole KDE session will inherit the locale set by init->KDM and will not use the one set in .bashrc!
+
== locale.sh ==
 +
If setting locale.conf doesn't work (symptom: everything is set to POSIX no matter whats in locale.conf), reinstall filesystem.
 +
(locale.sh somehow gets lost, see comment here https://plus.google.com/114015603831160344127/posts/2zKCcnTWDpa happens after the switch to systemd)
  
I guess a "source ~/.bashrc" in ~/.xprofile would solve this.
+
JKAbrams 01 December 2012
 
+
--[[User:Luetti|Luetti]] 17:56, 8 July 2008 (EDT): I don't think so. I tried almost the whole day to set only LC_PAPER="de_DE.utf8". Trying this in almost every file possible (/etc/profile, .xprofile, .bashrc, /etc/rc.local) seemed to work, as I used "locale" in terminal to verify it. But this only worked for applications I started from terminal, but not for applications started from the gnome-menu. So I came to the conclusion it has something to do with gdm. After having a closer look to /etc/gdm/xsession the problem was clear. GDM probably always sets $GDM_LANG on login. When $GDM_LANG is set, xsession will unset all other LC-variables. Just commented out this part and now everything works as desired.
+
If this is a common and/or important problem, I will add this to the article. What do you think?
+

Revision as of 22:29, 20 May 2013

.bashrc

.bashrc is only used by interactive bash sessions, right? So that if you login with KDM in KDE (or GDM gnome), the whole KDE session will inherit the locale set by init->KDM and will not use the one set in .bashrc!

I guess a "source ~/.bashrc" in ~/.xprofile would solve this.

--Luetti 17:56, 8 July 2008 (EDT): I don't think so. I tried almost the whole day to set only LC_PAPER="de_DE.utf8". Trying this in almost every file possible (/etc/profile, .xprofile, .bashrc, /etc/rc.local) seemed to work, as I used "locale" in terminal to verify it. But this only worked for applications I started from terminal, but not for applications started from the gnome-menu. So I came to the conclusion it has something to do with gdm. After having a closer look to /etc/gdm/xsession the problem was clear. GDM probably always sets $GDM_LANG on login. When $GDM_LANG is set, xsession will unset all other LC-variables. Just commented out this part and now everything works as desired. If this is a common and/or important problem, I will add this to the article. What do you think?

I think more information on this is missing in the article. I want to have LC_MESSAGES=C, LANG=de_DE.UTF-8 and LC_TIME=en_DK.UTF-8, but gnome seems to overwrite the settings. When I comment out the lines with GDM_LANG in /etc/gdm/Xsession, I can no longer log in. I would also appreciate it if someone who knows the role of the settings in "Region&Language" in gnome-control-center could add this to the article. Where are they saved and how do I disable them in favor of detailed settings (globally in /etc/locale.conf or locally in ~/.profile)? Viktordick (talk) 21:43, 13 April 2013 (UTC)

LC_MESSAGES

Setting LC_MESSAGES to "C" or "POSIX" (as opposed to "en_US.UTF-8" for example), can save tens of syscalls in a simple program without any loss (since all you need is plain English anyway). It's 29 less syscalls (on my system) for a simple "ls /no/such/dir". Add this info inside? --Philomath (talk) 07:55, 2 July 2012 (UTC)


locale.sh

If setting locale.conf doesn't work (symptom: everything is set to POSIX no matter whats in locale.conf), reinstall filesystem. (locale.sh somehow gets lost, see comment here https://plus.google.com/114015603831160344127/posts/2zKCcnTWDpa happens after the switch to systemd)

JKAbrams 01 December 2012