Package: systemd Version: 257.8-1~deb13u2 Severity: normal X-Debbugs-Cc: [email protected], [email protected]
Currently, Debian's systemd package ships a file at /usr/share/dbus-1/system.d/systemd-localed-read-only.conf, which effectively turns off the ability to use systemd-localed to change the locale, console keymap, or X11 keymap, due to the fact that Debian uses other mechanisms for controlling these things. Unfortunately, this limitation causes serious breakage when using Calamares to install Debian with a Wayland-based desktop. Under X11, Calamares is able to set the keyboard layout in other ways, but under Wayland, the de-facto correct way to set the running Wayland compositor's keyboard layout on the fly in a compositor-agnostic manner is to use org.freedesktop.locale1's SetX11Keyboard interface, which is walled off by this configuration file presumably because the interface doesn't work as expected at the moment. This means on Wayland-based desktops, if the user selects a language or keyboard layout other than the one that was set when Calamares was launched, the installed system will end up with that keyboard layout set, but the live system will continue to use the original layout. This can result in serious issues if the live system boots with a US English keyboard layout, the user changes the keyboard layout to German, and then attempts to type a long, secure LUKS passphrase or user password that happens to include a key like 'z' or 'y' (due to keys not being where they are expected to be, the user will likely end up locked out of their system or at least have difficulty getting in). Other than systemd-localed, the way to change a keyboard layout on the fly varies widely from compositor to compositor. KWin has (I think) some internal interface that, to my awareness, isn't supposed to be used by anything other than KDE components like systemsettings. labwc uses a file at ~/.config/labwc/environment; you write XKB environment variables into that file, then you send a SIGHUP to the labwc process. Other compositors likely have different mechanisms. Avoiding the use of systemd-localed in Calamares is therefore virtually impossible, and as Calamares tries to use a distro-agnostic approach to the majority of their code, they would be unlikely to accept patches to add all of these different methods of changing keyboard layouts. Based on looking at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608457, it looks like fully integrating systemd-localed with Debian is not an easy job, and it's not entirely clear to me what all still needs done to finish this. But if it was possible to *just* set the X11 keymap using systemd-localed, even just temporarily, that would be enough to get Calamares working most likely. Depending on how my workplace allocates my time, I might be able to help with work needed to get this fixed in Forky, if someone can point me towards what to work on.
pgpB4FIO_YENL.pgp
Description: OpenPGP digital signature

