Score:0

KUbuntu 22.04.1, where are these locale variables set?

mx flag
xpt

First time using KUbuntu (22.04.1 LTS); used to use Mate & LUbuntu before.

This is the rxvt-unicode that I'm used to:

enter image description here

This is the new rxvt-unicode in Ubuntu 22.04.1 that I'm having:

enter image description here

Found the reason for above difference is that there are so many other locale related variables are set:

 LC_ADDRESS=en_US.UTF-8
 LC_IDENTIFICATION=en_US.UTF-8
 LC_MEASUREMENT=en_US.UTF-8
 LC_MONETARY=en_US.UTF-8
 LC_NAME=en_US.UTF-8
 LC_NUMERIC=en_US.UTF-8
 LC_PAPER=en_US.UTF-8
 LC_TELEPHONE=en_US.UTF-8
 LC_TIME=en_US.UTF-8

But I haven't found where these variables are set, even after having searched in every file under /etc. Please help.

I need to find where they are set and remove them, and use only LANG to control the locale related behaviors.

Score:2
uz flag

Maybe your timezone location is somewhere in the US while you chose Chinese (Simplified) as the language in the installer. Hence the installer made its best to guess your desired locale: zh_CN.UTF-8 for language and en_US.UTF-8 for locale categories related to formats.

Anyway, the result of the installer's guess is saved in the /etc/default/locale file.

mx flag
xpt
Thanks for the reply, but my `/etc/default/locale` file has only `LANG=en_US`, no any of the above locale related variables, which what I'm trying to locate.
Gunnar Hjalmarsson avatar
uz flag
@xpt: Hmm.. Maybe `~/.pam_environment` then. But Kubuntu should not set anything in that file. Did you install some other desktop environment first, and then switched to Kubuntu?
mx flag
xpt
BINGO!!! It IS the ~/.pam_environment file. I have no idea where that file comes from, my `/home` volume is shared among all my Linux OSs, which the previous LUbuntu 22.04 was using without any problem before. The Kubuntu I'm using is basically copied from the Kubuntu live system (cd image), so maybe the Kubuntu ***live*** system populated that file when I first tried it. Anyway, I've removed the file and there are no longer such locale related variables any more. THANKS A LOT!!!
Gunnar Hjalmarsson avatar
uz flag
@xpt: Sharing `/home` explains it. While some Ubuntu flavors (including standard Ubuntu) use that file for the user locale settings, Kubuntu uses KDE mechanisms for the purpose instead. But the file is still read if it's present...
mx flag
xpt
Ah! That's exactly right -- just found that I somehow had that file since 2019! I'm able to find that as my `/home` is synced across different machines as well!
Hannu avatar
ca flag
I would say that using the same `/home` for a varying set of distributions might cause trouble at random - as settings for one distro may well clash with any other. I'd keep e.g. `$home/.config` (example) separate for each distro, and have e.g. any other files in a common mountable `$home/myfiles/` or any variant of that.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.