Score:2

Kubuntu Wrong Date Locale

bl flag

Kubuntu 23.04

Issue: the date in the taskbar and sometimes in some places in the settings is displayed in the wrong locale. I live in Georgia (not the US state). I tried many many times to modify the locale file located in /etc/default. I did it by running sudo nano locale while in that folder. I don't think I made a mistake somewhere, because currently locale looks like this:

#  File generated by update-locale
LANG="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"

Nonetheless, echo $LC_TIME still returns ka_GE.UTF-8​ for some reason.​

I also tried the following:

  1. sudo update-locale LC_TIME=en_US.UTF-8​
  2. sudo localectl set-locale LC_TIME=en_US.utf8 (I just copied the command I found, I don't know if "utf8" without the hyphen is a typo or not)​
  3. sudo dpkg-reconfigure locales and then updated the en_US.UTF-8 or whatever, I don't know

UPDATE: output of locale

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=ka_GE.UTF-8
LC_TIME=ka_GE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=ka_GE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=ka_GE.UTF-8
LC_NAME=ka_GE.UTF-8
LC_ADDRESS=ka_GE.UTF-8
LC_TELEPHONE=ka_GE.UTF-8
LC_MEASUREMENT=ka_GE.UTF-8
LC_IDENTIFICATION=ka_GE.UTF-8
LC_ALL=
Gunnar Hjalmarsson avatar
uz flag
Do you possibly have a `~/.pam_environment` file? If you have, you can delete it since you are using Kubuntu. (It was probably created when you used some other Ubuntu flavor.)
conferza avatar
bl flag
Nope, `No such file or directory`. This was a clean install, Kubuntu straight away.
Gunnar Hjalmarsson avatar
uz flag
Hmm.. Maybe the KDE settings can explain it: *Settings -> System Settings -> Regional Settings -> Region & Language*
conferza avatar
bl flag
It says "American English" everywhere.
Gunnar Hjalmarsson avatar
uz flag
Then I still think you have a `~/.pam_environment` file. The `~` means your `$HOME` directory, and the dot makes the file "hidden".
Gunnar Hjalmarsson avatar
uz flag
Btw, did you relogin after having changed `/etc/default/locale`?
conferza avatar
bl flag
I'll look for it. By the way, while trying to locate this `.pam_environment` folder, I ran `ls -l` and months are displayed in Georgian there, which is, again, odd.
conferza avatar
bl flag
Yes, I did relogin, restart and whatnot.
conferza avatar
bl flag
Wow, you were right! There is a `.pam_environment` folder. I see it now after I ran `ls -a`. How to delete it?
Gunnar Hjalmarsson avatar
uz flag
It's not a folder, it's a file. `rm ~/.pam_environment`
conferza avatar
bl flag
Absolutely amazing, it worked! If you write an answer instead of the comment, I'll make it accepted as the best, if you want.
Gunnar Hjalmarsson avatar
uz flag
I suggest that you write the answer — it's perfectly fine to answer your own question. ;) And if you do, please include the background, i.e. that you previously used some other desktop environment and then switched to Kubuntu. Because that's the case, isn't it?
conferza avatar
bl flag
If that's the only possible reason that file was present, then, I guess, that is the case. Although, again, I don't remember anything else, I thought what I did was a "clean install".
Gunnar Hjalmarsson avatar
uz flag
If it was a clean Kubuntu install, the presence of that file is a mystery. But well, if you installed a tool named *Language Support* and made changes via that tool, it would explain it. *Language Support* is not included in Kubuntu, since it does not play well with the KDE way to handle regional settings.
Score:1
bl flag

The problem turned out to be the .pam_environment file, located in the $HOME directory (~/.pam_environment). Apparently, that file was probably created when I used some other Ubuntu flavor and then switched to Kubuntu.

Run the following command to remove it:

rm ~/.pam_environment

Make sure to relogin after 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.