Bug 481703

Summary: plasma-localerc leads to a defunct locale configuration
Product: [Applications] systemsettings Reporter: nuc <nucrap>
Component: kcm_regionandlangAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: crash CC: hanyoung, nucrap, sitter
Priority: NOR    
Version First Reported In: 5.27.10   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description nuc 2024-02-23 01:51:54 UTC
This bug is very often posted in forums, but haven't yet found a bug report.

Setting some regional settings in Plasma settings lead to a state where the system locale is defunct. This can cause apps to crash or misbehave. This seem especially common when setting de_DE locales in plasma it seems.

The only way to fix it is to delete the file plasma-localerc, this is even described in the archlinux wiki: https://wiki.archlinux.org/title/Locale#My_system_is_still_using_wrong_language

Here are some user reports:
https://bbs.archlinux.org/viewtopic.php?pid=1435219 
https://www.reddit.com/r/archlinux/comments/udr95x/locale_messed_up_in_kde/
https://www.reddit.com/r/archlinux/comments/uagapq/locale_is_messed_up_im_a_noob_and_unsure_how_to/
https://bbs.archlinux.org/viewtopic.php?id=262047
https://forum.endeavouros.com/t/locale-settings-often-are-messed-up-after-major-plasma-updates/31097
There are a lot more..

So for me an example of a defunct plasma-localerc is:
```
[Formats]
LANG=en_US.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
```

Then when after a restart when executing the `locale` command:
```
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="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"
LC_ALL=
```

As you see in the first line it says "locale: Cannot set LC_ALL to default locale: No such file or directory".
This error goes away after deleting plasma-localerc, which is the go to method for archlinux users.

This should be fixed in plasma though.
Comment 1 Harald Sitter 2024-02-23 10:54:47 UTC
What does `locale -a` say?
Comment 2 Bug Janitor Service 2024-03-09 03:46:56 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2024-03-24 03:46:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!