hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

How to change the keyboard layout? #135

Closed exocode closed 5 years ago

exocode commented 6 years ago

Hi there,

I have a "small" issue:

I dont know how to change the keyboard layout. Can someone point me to the right place?

Thank you!

StefanScherer commented 6 years ago

I only SSH into my Raspberry Pi's, so I don't know. But we have added raspi-config tool so try this as it's the official helper tool for Raspbian.

StefanScherer commented 5 years ago

Have you found a solution? It should be adjustable as with a normal Raspberry Pi SD card image or Debian Linux.

exocode commented 5 years ago

I wont do that to that through the raspi-config tool.. What I try to achieve is, that I flash the HypriotOS with german language already set. At the latest after the first reboot...

I tried a lot of options, no one of them worked, only the terminal language is german now. But the "Z" is still on the key "Y" and vice versa: Following code shows all my approaches as well the content of the files:

BTW: The ONLY WAY I GOT IT WORKING WAS BY USING the raspi-config.

localectl status

System Locale: LAG=de_DE.UTF-8
    VC Keymap: de-latin1nexport
   X11 Layout: DE
    X11 Model: pc105
  X11 Variant: nodeadkeys

/etc/vconsole.conf

KEYMAP=de-latin1-nodeadkeys

cat /etc/locale.conf

LANG=de_DE.UTF-8
export LC_DATE=de_DE.utf8
export LC_NUMERIC=de_DE.utf8
export LC_TIME=de_DE.utf8
export LANG=de_DE.utf8

/etc/default/keyboard

XKBMODEL="pc105"
XKBLAYOUT=de
XKBVARIANT="nodeadkeys"
XKBOPTIONS=""
BACKSPACE="guess"

I tried that one: https://wiki.archlinux.de/title/Arch_Linux_auf_Deutsch_stellen#Grundkonfiguration (It didn't work either)

ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime

And that:

What else could I try? Best case would be a cloud-init with languages already set...

Thank you very much

exocode commented 5 years ago

I got it working! YAY!

userdata.yml:

packages:
  - software-properties-common
  - python-software-properties
  - xinput-calibrator
  - console-data
  - keyboard-configuration
StefanScherer commented 5 years ago

Thanks for sharing.

bf8392 commented 3 years ago

The raspi-config option is not working anymore...(no keymaps showing) can someone discribe a step by step guide?