mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-12-10 00:30:37 -06:00
For users having non-English, and especially non-qwerty layouts, using the host shell can be very awkward. There was no option to change the keymaps as they haven't been installed in the OS, and the persistence couldn't have been achieved because of read-only /etc. With upstream patch merged in #4224, we have an option to put /etc/vconsole.conf to a writable location and use the same approach as in the timezone PR. This is needed because even if we only bind-mounted the file from the overlay directory, the Systemd services which start early will still refer to the inode on the read-only FS. Also, gzip is required as current version of kbd in Buildroot (v2.6.4) always compresses the keymaps using gzip. We can get rid of this after we bump to kbd v2.9.0 [1] or newer. The overall bloat in local build of the OS is slightly over 1 MiB, so it is acceptable. With these changes, the `localectl set-keymap` command can be used to use any available keymap from the installed `kbd` package (refer to `localectl list-keymaps` for complete lists) and persist it between reboots. [1] https://github.com/legionus/kbd/releases/tag/v2.9.0 Fixes #1775
4 lines
116 B
Plaintext
4 lines
116 B
Plaintext
[Service]
|
|
Environment=SYSTEMD_ETC_VCONSOLE_CONF=/mnt/overlay/etc/vconsole.conf
|
|
ReadWritePaths=/etc /mnt/overlay/etc
|