1

I'm trying to configure an USB keyboard with br layout (brazilian portuguese) on Ubuntu Server 20.04.4 LTS without X11 (running in a Raspberry pi 4).

I already tried these commands, no one worked:

  1. sudo dpkg-reconfigure keyboard-configuration
  2. sudo dpkg-reconfigure console-data
  3. sudo dpkg-reconfigure locales
  4. Manually editing /etc/default/keyboard
  5. sudo systemctl set-keymap br

With sudo loadkeys br, it works, but it not persintent: I need to type this everytime I reboot the system.

Content of /etc/default/keyboard:

XKBMODEL="pc105" 
XKBLAYOUT="br"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"

Content of /etc/vconsole.conf:

KEYMAP=br

Any help?

ps: here they suggest to use setxkbmap (which requires X) or other solutions with Gnome. Also, to put loadkeys br in .bashrc should work, but is it relly the only option?

Cleiton
  • 11
  • 2
  • Welcome to AskUbuntu, Does [this](https://askubuntu.com/questions/209597/how-do-i-change-keyboards-from-the-command-line) help? or put `loadkeys br` into `.bashrc` – Sadaharu Wakisaka Apr 12 '22 at 02:03
  • 1
    Does this answer your question? [How do I change keyboards from the command line?](https://askubuntu.com/questions/209597/how-do-i-change-keyboards-from-the-command-line) – vanadium Apr 12 '22 at 07:20
  • 1
    @vanadium @sadaharu-wakisaka they are suggesting to use `setxkbmap` (which requires X, I'm trying to avoid this) or `loadkeys` (not persistent). Until now to put in `.bashrc` seems to be my only option :-( – Cleiton Apr 13 '22 at 03:14
  • I retracted my close vote. – vanadium Apr 13 '22 at 07:18

0 Answers0