I am using Kubuntu 18.04. I had some trouble with my keyboard layouts which were solved but left some issues behind as a result. More specifically I have some language remnants is some aspects of my system. For example in Konsole I get all messages in Greek. I would like to get them in English. For example this message says (in Greek):

command not found

enter image description here

I tried changing the language but the methods I used did not seem to make a difference.

I tried:

export LANG=C

both on Konsole itself as well as in ~/.bashrc file which as far as I know changes to the default language which should be US English (good enough for me). For some reason my Konsole considers Greek to be my default language.

I tried explicitly setting:

export LANG=en_US.UTF-8

which also did not change much! Messages are in Greek.

Changing LC_ALL is the only one that seems to make a difference (although not a desired one):

export LC_ALL=C
$ fdsfdfd

fdsfdfd: \u03b7 \u03b5\u03bd\u03c4\u03bf\u03bb\u03ae \u03b4\u03b5 \u03b2\u03c1\u03ad\u03b8\u03b7\u03ba\u03b5

this returns the messages in Unicode(?).

Some interesting facts are

  1. previously they were in Spanish (I had added Spanish as 3rd language before)
  2. The console in other tty are correctly displaying the messages in English.

I have checked similar question like here or here which did not work for me (as mentioned before).

Any idea how can I resolve this issue?

As @danzel asked the output of locale is:


Also as @Gunnar Hjalmarsson suggested changing both $LANG and $LANGUAGE do seem to finally solve the problem although as this GNU documentation suggest it's probably enough to just change LANGUAGE which take precedence in message printing.

  • Please run locale and add the output to your question. – danzel Jan 22 '19 at 21:38
  • 1
    Probably you need to set both LANG and LANGUAGE. – Gunnar Hjalmarsson Jan 23 '19 at 0:47
  • Great that you solved it! Can you please post the solution as an answer too. It's perfectly fine to answer your own question. :) Then, after a couple of days, you'll be able to accept the answer. – Gunnar Hjalmarsson Jan 23 '19 at 20:35

Well, the answer to my problem was a close call. As it is mentioned in GNU documentation there are 3 environmental variables related to this issue:

  • LANG
  • LC_ALL

Of the 3 the last one normally shouldn't be set. Documentation states that:

GNU gettext gives preference to LANGUAGE over LC_ALL and LANG for the purpose of message handling, but you still need to have LANG (or LC_ALL) set to the primary language; this is required by other parts of the system libraries.

This means that although LANGUAGE is used in order to determine the language to display message to, it won't be used until one of the other is set to something different than the default (C).

The final note makes it even clearer:

Note: The variable LANGUAGE is ignored if the locale is set to ‘C’. In other words, you have to first enable localization, by setting LANG (or LC_ALL) to a value other than ‘C’, before you can use a language priority list through the LANGUAGE variable.

So, in my case I had to set both LANG and LANGUAGE to a locale. The choice would be that of LANGUAGE variable regardless of the value of LANG.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.