You are not logged in.
Hi,
I want to have my Arch in English, but at least the time should be shown in german conventions, as I'm from Germany .
I couldn't find a way to set "LC_TIME" in general for the whole machine, the only way I could figure out is to use a ".profile" file in the home directory.
So I have created a file with the following content:
.profile
export LC_TIME=de_DE.UTF-8
And placed it in root's homedir /root/.
After logging out and logging in again the locale is changed, so it works as it is supposed to be.
But I also want to change the locale for a normal user called "johnpatcher". Therefore I created a file with the same content in /home/johnpatcher.
But after logging in with the user johnaptcher LC_TIME still remains "en_US.UTF-8", which is quite strange to me.
What have I done wrong? Are there any better solutions to change a locale globally for the whole machine?
I know that I also could try to use the ".bashrc" file, but the ".profile" should work, regardless of what shell I'm using and it actually does for root, but not for a normal user .
Best regards
johnpatcher
Last edited by johnpatcher (2009-08-28 14:10:11)
Offline
Ya, I don't know... Sorry. defendantaly a permissions problem but hard to think of a way around it in this pertitular case. Maybe look for an application level solution?
OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec
Offline
defendantaly a permissions problem
The file "/home/johnpatcher/.profile" is chmoded to 0777, so normally there shouldn't be any problem with the permission.
Offline
I think that the correct place to put that line is in /etc/rc.local, so that it works system-wide.
Offline
I think that the correct place to put that line is in /etc/rc.local, so that it works system-wide.
That would probably work just fine, but, to be honest, I want to run my system in English completly, while the user I'm working with (johnpatcher) has some german locales set. I can't understand why something that works just fine for "root" doesn't work for any other user . Quite strange ...
Offline
I use the same 'hack' and it works here (tm)
In X, starting with "bash --login" sources .profile (http://wiki.archlinux.org/index.php/Sta … logging_in)
If it happens also with agetty... maybe you have .bash_profile/.bash_login that gets sourced instead?
Offline
The easiest would be to put it into ~/.bashrc asuming that you use bash
edit:
@ Surgat_
/etc/profile.d/custom.sh or similar would be a more propper place.
Last edited by Mr.Elendig (2009-08-28 13:57:01)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
In X, starting with "bash --login" sources .profile (http://wiki.archlinux.org/index.php/Sta … logging_in)
I haven't installed X yet, I'm just refering to the console.
If it happens also with agetty... maybe you have .bash_profile/.bash_login that gets sourced instead?
You are right, ".bash_profile" gets sourced, which contains:
. $HOME/.bashrc
I have changed it to:
. $HOME/.profile
. $HOME/.bashrc
It works now as expected. The root user has no .bash_profile, which explains why it has worked for him without any problem, thanks for the advise . Removing the file completly works also, although the file could be needed .
Last edited by johnpatcher (2009-08-28 14:09:57)
Offline