Konsole LANG (locale) wrong

Hi there!

I'm using Manjaro KDE. Since my last upgrade, I get some locale errors in Konsole because:

$ echo $LANG

And that one does not exist. I don't know what makes it that way. The KDE locale settings have "Display Language" set to en_US and "Formats" set to de_AT (which are both valid).

On my TTYs (non graphical terminals behind alt+strg+[F2-F6]) this problem does not exist, there LANG is set to en_US.

$ 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
$ 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
$ cat /etc/locale.conf
$ grep -v "^#" /etc/locale.gen

en_US.UTF-8 UTF-8
de_AT.UTF-8 UTF-8

The most annoying error is the one I get on every start of a Konsole session:
manpath: can't set the locale; make sure $LC_* and $LANG are correct

Does somebody have any hint's for me how to fix this problem?

This may be more a workaround than a solution, but I had locale problems way back and installing the KDE intended language pack (I mean on the Regional Settings, not on Manjaro settings) solved it.

Plasma creates/edits two files to adapt your custom/user settings...:

==> ~/.config/plasma-locale-settings.sh 
==> ~/.config/plasma-localerc

More in tutorial


Thanks! Those two files contain the "bad" en_AT locale.
Should I just replace it in both of those or will they be overwritten by KDE again?

I'm trying to understand what your tutorial want's me to do, but I don't (yet..)

Whatever locale you select in KDE locale specific option, must exist in MSM locales (or enabled and generated locales in locale.gen). If they don't exist, you should enable/add/generate them, so they can work in KDE setting.
If those do not exist at all in locale.gen, it should be reported.

IIRC there is one more option in MSM, for Installing language packages. Check that and install missing packages. It's the same as using locale.gen and locale-gen, as in tutorial instructions.

sorry but what's MSM? [UPDATE: ahh, you ment the Manjaro Settings Manager - this shows me "additional language packages can be installed:" with a list, but the "Install Packages" button sadly is grayed out / deactivated.]

Also KDE locale settings show me a lot of en_AT and en_DE like options of countries that are german speaking with english language. These don't exist as far as I can tell.

I'd like to have english language with german format & keyboard (qwertz). This kind of worked flawlessly with most system I've been using over the last decade, but now I seem to have run into some kind of problem with this.

Have you checked in /etc/locale.gen?

grep en /etc/locale.gen
grep AT /etc/locale.gen
grep DE /etc/locale.gen

Keyboard layouts are different settings, in Keyboard settings.

okey. yes /etc/locale.gen contains the offending en_AT locale (now, it didn't yesterday...). Should I comment it out?

Yes, if you want to use it in KDE settings. Then run sudo locale-gen.
MSM = Manjaro Settings Manager

okey. Did that. My main issue is that when I start a new Konsole window $LANG contains en_AT.UTF-8 and that seems to produce all kind's of other problems, because "the system" doesn't seem to know about such a locale.

What is setting this strange locale string into $LANG on Konsole startup?

If It's only Konsole, it maybe an old konsole configuration. Check/reset konsole settings (konsole menu), or delete konsole configuration in $HOME/.config/

I've rebooted my laptop today and that fixed my problems with Konsole.
Thanks for the great support @AgentS!

1 Like

Aaaand it broke again. This time reboot doesn't help.

manpath: can't set the locale; make sure $LC_* and $LANG are correct
(process:7482): Gtk-WARNING **: 19:31:19.897: Locale not supported by C library.
        Using the fallback 'C' locale.

It depends how you got this messages. What command(s) (or more from journal)?
The 2nd is a warning, not an error.

I get this line every time I open a Konsole window
manpath: can't set the locale; make sure $LC_* and $LANG are correct

I've tried deleting the German locale everywhere I found it but that didn't help. This locale stuff seems utterly broken in the current Manjaro KDE system.

UPDATE: I've found some more German lolale set on the KDE graphical config tool called "Formats". replaced them with en_US there too logged out and in again and now it seems to work.

Though I think it's sad that now it doesn't seem to work anymore to have my locale format settings together with english system language without ton of stuff breaking.. This worked flawlessly for the last two years I've been using Manjaro KDE.

UPDATE2: okey so I tested some more and it seems as long as I don't add "Deutsch" (German) to the language list in the KDE Plasma settings window "Lanugage - System Settings Module" the console stuff works (with english language.)

But once I add it, everything is german (even though english is set to default) which messes up a whole range of stuff since everything expects english output but get's german one.

I doubt you are the only one affected from this "bug" (of yours...).

This is in the tutorial, have you checked it?

Do you mean the MSM module?

I think you should start from the beginning.
Read all provided info, so you know what you are doing and how to check/troubleshoot.
The graphical tools change some files and run some cli commands.
Environment Variables can show you actual status.
If only Konsole has a problem, have you checked its settings?

When giving feedback after each change you do, be specific on the above. Partial info will make it difficult to understand and locate the real issue.

Hello, i came all the way from parrot.. never used manjaro before..
but i have a solution to your problem..
first reinstall the locale

sudo apt-get install locale --reinstall

am using debian.. so you may change sudo, apt and get

Generate Locales on the Server

To fix this error, you can generate the needed locales on the Linux server. First open the /etc/locale.gen file on your server.

sudo nano /etc/locale.gen

Find the needed locale and remove the # sign to uncomment. For example, to generate zh_CN.UTF-8 locale, find this line:

#zh_CN.UTF-8 UTF-8

Remove and # sign. Save and close the file. Then run the following command to generate it.

sudo locale-gen


locale-gen reads /etc/locale.gen file to know what locales to generate. You can also generate multiple locales by uncommenting multiple lines in that file.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by