The above command (in monitor mode) calls up dpkg-reconfigure and changes /etc/default/keyboard and localectl status data.
In 1.2, the changes trigger a reload of the systemd unit keyboard-setup.service and the new keymap is applied.
In 1.3 and 1.4, the changes do not trigger a reload and the new keymap isn’t applied. $ sudo systemctl restart keyboard-setup.service does not fix this
In 1.2, the output of $ systemctl status keyboard-setup.service is: Active: active (exited)
In 1.3 and 1.4, the output of the same command is:
Active: inactive (dead)
Condition: start condition failed
ConditionPathExists=/bin/setupcon was not met
And in fact, in both 1.3 and 1.4 /bin/setupcon doesn’t exist, while it exists in 1.2.
# set system option keyboard-layout 'xy' still works across 1.3 and 1.4
This has been detected in the 1.3 version since at least monthly-2020-11 (Build commit ID b35660db9bd641) and in 1.4 up to 1.4-rolling-20211018xxxxx
The reports from version 1.2 are from 1.2 crux (Build commit ID 402d80498683f2).
Hello @Dmitry.
First of all, this is in direct console mode under Virtualbox (not serial, not a real system)
An SSH connection gets the correct layout of the client that is connected.
The second set of commands (set system option keyboard-layout fr) works. I just use ‘no’ most of the time because it’s closer to Portuguese.
Has the $ set console keymap command in monitoring mode been deprecated for # set system option keyboard-layout in configuration mode? Because at this time, the conf. mode command only supports a few layouts. But if it is deprecated, this isn’t a bug - the “bug” is not supporting enough layouts with the configuration mode command.
In 1.2, the monitoring mode command calls up the Debian console configuration and then restarts the keyboard-setup.service, allowing all keyboard layouts available in Debian.
In 1.3-epa2 and 1.4-rolling-202110180513, the monitoring mode command doesn’t work and keyboard-setup.service can’t run to apply the changes.
I believe the build scripts for 1.3 and 1.4 are, at least, not including the Debian package that provides /bin/setupcon because that file is needed for calling keyboard-setup.service and applying the Debian keymap.
To reproduce:
Install 1.3-epa2 with install image and default options
Boot into installed image and login as vyos
$ set console keymap
Generic 105-key PC (intl.) / Other / Portuguese / Portuguese / The default for the keyboard layout / No compose key
Test keymap: the key to the left of Right Shift should be ‘-’; if it’s ‘/’ the keymap is still US
Behaviour of 1.2 after step 4:
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
[ ok ] Restarting keyboard-setup (via systemctl): keyboard-setup.service.
Step 5 in 1.2: keymap is changed
Behaviour of 1.3 and 1.4 after step 4: drops to prompt (monitoring mode)
Step 5 in 1.3 and 1.4: keymap isn’t changed
systemctl status keyboard-setup.service
In 1.2:
● keyboard-setup.service - LSB: Set preliminary keymap
Loaded: loaded (/etc/init.d/keyboard-setup)
Active: active (exited) since Mon 2021-10-25 14:05:37 UTC; 3min 27s ago
Process: 2362 ExecStop=/etc/init.d/keyboard-setup stop (code=exited, status=0/SUCCESS)
Process: 2367 ExecStart=/etc/init.d/keyboard-setup start (code=exited, status=0/SUCCESS)
In 1.3/1.4:
● keyboard-setup.service - Set the console keyboard layout
Loaded: loaded (/lib/systemd/system/keyboard-setup.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Mon 2021-10-25 14:00:24 UTC; 9min ago
└─ ConditionPathExists=/bin/setupcon was not met
Oct 25 13:42:59 vyos systemd[1]: Condition check resulted in Set the console keyboard layout being skipped.
Oct 25 13:43:44 vyos systemd[1]: Condition check resulted in Set the console keyboard layout being skipped.
Oct 25 14:00:24 vyos systemd[1]: Condition check resulted in Set the console keyboard layout being skipped.
ls -l /bin/setupcon
In 1.2: -rwxr-xr-x 1 root root 32039 Apr 21 2015 /bin/setupcon
In 1.3/1.4: ls: cannot access '/bin/setupcon': No such file or directory
@tigas, thank you for the explanation. Let me figure out is this command really useful or this is just rudiment-feature. In my practice I never seen that anyone used it.
I investigated this a littlebit and found out that option do not exist. I only have a options keyword. This keyword does not provide a keyboard-layout option. Any ideas how I can set the keyboard layout? I have a custom flashed keyboard and therefor I need the german layout.
In 1.1.8 VyOS did not have its own localization support and simply used the Debian underpinnings; drop to a root shell ($ sudo su -) and run dpkg-reconfigure console-data
VyOS no longer supports this console configuration method but the alternative seems to be very limited in the amount of supported layouts. An equivalent mechanism is missing from version 1.3+, which is the point of this thread.
Hi.
I want to use the Japanese keyboard layout but faced a similar problem and landed on this page.
I don’t know if it’s the right solution, but I found a way that works so I’m commenting.
/bin/setupcon is missing also in 1.3.2.
It seems to be in the console-setup package, but it’s not installed on VyOS.
Manually installing console-setup (and the xkb-data dependency) got the keyboard-setup.service working, and set console keymap now works as expected.
Thank you for your response.
After sudo loadkeys jp106 the keymap changed as expected. But it comes back on reboot.
I also tried sudo localectl set-keymap --noconvert jp106 did not change the keymap.