Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I open any kind of terminal I get this error

bash: warning: setlocale: LC_ALL: cannot change locale (en_US)

My /etc/default/keyboard contains

XKBMODEL="pc105"
XKBLAYOUT="dk"
XKBVARIANT=""
XKBOPTIONS="terminate:ctrl_alt_bksp"

and /var/lib/locales/supported.d/local contains

en_GB.UTF-8 UTF-8
en_US.UTF-8 UTF-8

In dpkg-reconfigure keyboard-configuration selected I

Generic 105-key (Intl) PC
Denmark
Denmark
The default for the keyboard layout
No compose key
Yes

Question

What I would like is to have Danish keyboard layout, and everything else (menus and such) should be English.

Can anyone figure out why I get this error and perhaps how to correct it?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Locale doesn't really have much to do with keyboard layout.

The error message is a result of setting your locale to en_US, presumably either in /etc/default/locale or one of your shell startup files, but it looks like you've only asked the system to provide en_GB.UTF-8 and en_US.UTF-8.

On a modern system both UTF-8 locales are good choices, so the answer is figure out where you've specified en_US and replace it with en_US.UTF-8 or en_GB.UTF-8, according to taste.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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