2

I'm "fighting" with a keyboard related issue on Ubuntu Server 16.04.

My /etc/default/keyboard contains:
XKBMODEL="pc105"
XKBLAYOUT="it"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess
"

My /etc/default/locale contains: LANG="it_IT.UTF-8"

But ubuntu recognize my keyboard as an US layout, while I'm using an Italian one.

The "locale" output is:
LANG=it_IT.UTF-8
LANGUAGE=
LC_CTYPE="it_IT.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_COLLATE="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_MESSAGES="it_IT.UTF-8"
LC_PAPER="it_IT.UTF-8"
LC_NAME="it_IT.UTF-8"
LC_ADDRESS="it_IT.UTF-8"
LC_TELEPHONE="it_IT.UTF-8"
LC_MEASUREMENT="it_IT.UTF-8"
LC_IDENTIFICATION="it_IT.UTF-8"
LC_ALL=

How I can solve this? Thanks!

  • There is no relationship whatsoever between the /etc/default/keyboard (which tells the system what characters are produced by what keys) and /etc/default/locale (which tells the system in what language to display messages and how you would like your numbers and dates to be formatted). They serve different purposes. Have you run sudo dpkg-reconfigure keyboard-configuration? (Don't forget to sudo systemctl restart keyboard-setup afterwards.) Since the machine is a server, you must also understand that this configuration refers only to a physical keyboard connected to the computer. – AlexP Jul 3 '18 at 15:31
  • Thank you @AlexP, yes I ran several times sudo dpkg-reconfigure keyboard-configuration and restarted the service. I'm using a physical keyboard. It seems that all is ignored and go to default US layout. – Simone D. Jul 4 '18 at 7:54
  • Do you have a file ~/.keyboard? – AlexP Jul 4 '18 at 8:22
  • No, there isn't... – Simone D. Jul 4 '18 at 11:51
  • I cannot reproduce this on 18.04 -- the system obeys /etc/default/keyboard. I no longer have a machine with 16.04. – AlexP Jul 4 '18 at 15:54

Your Answer

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

Browse other questions tagged or ask your own question.