You are not logged in.

#1 2020-08-17 09:25:35

mokman
Member
Registered: 2015-10-27
Posts: 21

Unable to change locale

i like to change my locale from de_AT to en_DE but it seems something is setting the locale back on login.

here is some output:

locale -a

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_DE.utf8
en_US.utf8

cat /etc/locale.conf

LANG=en_DE.UTF-8

locale

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de_AT.utf8
LC_CTYPE="de_AT.utf8"
LC_NUMERIC="de_AT.utf8"
LC_TIME="de_AT.utf8"
LC_COLLATE="de_AT.utf8"
LC_MONETARY="de_AT.utf8"
LC_MESSAGES="de_AT.utf8"
LC_PAPER="de_AT.utf8"
LC_NAME="de_AT.utf8"
LC_ADDRESS="de_AT.utf8"
LC_TELEPHONE="de_AT.utf8"
LC_MEASUREMENT="de_AT.utf8"
LC_IDENTIFICATION="de_AT.utf8"
LC_ALL=

any hints where i could look into? i use xfce4

Last edited by mokman (2020-08-18 18:07:12)

Offline

#2 2020-08-17 10:34:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: Unable to change locale

You probably also set it in /etc/profile or your bashrc or something like that?

Offline

#3 2020-08-17 11:00:26

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: Unable to change locale

no, nothing in .bashrc and nothing in /etc/profile.

i tried to set it to en_US.UTF-8, but result is the same.
additionally i have some characters not showing correctly, for example here:

lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   1.8T  0 disk /mnt/storage
sr0          11:0    1  1024M  0 rom  
nvme0n1     259:0    0 931.5G  0 disk 
nvme0n1p2 259:1    0   998M  0 part /boot
nvme0n1p6 259:2    0 930.1G  0 part /btrfs

could this be related?

__EDIT__
strange, in the browser the characters are showing up fine, but in the terminal there where some of these
replacement_character.png
at the start of line 5&6.

Last edited by mokman (2020-08-17 18:35:31)

Offline

#4 2020-08-17 11:58:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: Unable to change locale

In general and to deal with this, please use code tags for shell I/O and file contents, https://bbs.archlinux.org/help.php#bbcode

xfce might set this from a local locale config, also check the locale on a console login (ctrl+alt+f2)

Offline

#5 2020-08-17 18:37:11

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: Unable to change locale

in the console, the locale is fine. where could xfce4 set the locale?
i have just created ~.config/locale.conf, but without change.

Last edited by mokman (2020-08-17 18:38:11)

Offline

#6 2020-08-17 18:45:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: Unable to change locale

I'm pretty sure it has a GUI config for that.

Offline

#7 2020-08-17 19:28:51

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: Unable to change locale

i solved it by exporting XDG_CONFIG_HOME in ~/.bashrc:

export XDG_CONFIG_HOME="~/.config"

Offline

#8 2020-08-17 19:37:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: Unable to change locale

bashrc only applies to bash but the wrong locale seems rather tied to your xfce session (because it doesn't exist in a console login)
Also you should™ rather not use "~" (but $HOME because how and where "~" is expanded) and $HOME/.config is actually the default value.

=> Don't add more layers of variable rewrites, fix the actual problem.
If setting the variable makes a difference, chances are the bogus config is somewhere in the unredacted path (ie. what XDG_CONFIG_HOME was before)

Offline

#9 2020-08-18 08:01:41

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: Unable to change locale

you're absolutely right, but i am blind here. where should i look? isn't $HOME/.config the default path for XDG_CONFIG_HOME in the first place?
i guessed the export could help because the .config/locale.conf was ignored.
but i should not need it in the first place, since i want the settings from /etc/locale.conf to be loaded.

Offline

#10 2020-08-18 09:55:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: Unable to change locale

isn't $HOME/.config the default path for XDG_CONFIG_HOME in the first place?

Yes, so if setting it to that value somehow fixes something, the value must be different before.
Therefore check where XDG_CONFIG_HOME points if you don't change it in your bashrc and inspect that path for offending locale configs.

Offline

#11 2020-08-18 18:13:27

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: Unable to change locale

i don't know what is going on. after reboot it does not work with the export, and without the export

cd $XDG_CONFIG_HOME

gives me

bash: cd: ~/.config: No such file or directory

Offline

#12 2020-08-18 20:20:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,685

Re: Unable to change locale

So
a) $XDG_CONFIG_HOME is already set and it's set to what you claim to have set it to fix it
b) you've no ~/.config directory??

Looking at #3, where's your root partition to begin width and for the original problem:

grep -r de_AT ~

Edit: you didn't run the "cd $XDG_CONFIG_HOME" test as root or sudo or whatever, did you?

Last edited by seth (2020-08-18 20:21:34)

Offline

Board footer

Powered by FluxBB