-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for localectl to write the X11 keymap to /etc/vconsole.conf #24228
Comments
Fedora unified kernel console keymaps with XKB long time ago: |
makes sense. by all means, send a patch adding this. |
Right, Fedora generates console keymaps from xkb keymaps. But what we want to know for the plymouth changes being worked on is which xkb keymap + variant was used to generate the console keymap. Which AFAICT is currently not available anywhere. ATM plymouth is using the console keymap since it is using the tty to get keyboard input for unlocking disks encrypted with a password. There are plans: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/172 These plans involve using libxkbcommon to deal with the keymap. The problem is that there is no standard way to get the XKB keymap as set by Currently the full So this RFE is about storing the full |
Thanks, any suggestions for the format? Since we need to store multiple values when also taking the model / variant and options into account I guess we should probably use multiple key-value pairs for this ? So instead of adding a KXB_KEYMAP to /etc/vconsole.conf at XKB_LAYOUT XKB_MODEL XKB_VARIANT and XKB_OPTIONS key-value pairs; and then not write the ones not specified by the user to vconsole.conf ? Also XKB_OPTIONS value needs to be a set of whitespace seperated options I think as I believe there can be more then one option. |
To be clear what I'm trying to say here is if e.g. the user has only specified a layout then only write XKB_LAYOUT to /etc/vconsole.conf and leave the other ones unset (rather then writing them with an empty value). |
yeah |
yeah, if that's how it is it is how it is |
yeah, makes sense |
I like this. Makes more sense than what I proposed initially, however I think using commas for XKB_OPTIONS would be better since it's the format used by lixkbcommon |
I also like the commas better than spaces, I think that might make it easier for folks that might be |
FYI I am planning to add xkb support[1] to kbd[2]. If this is done, then xkb keymaps can be used in the linux console with some reservations. I wanted to complete support in the spring, but unfortunately xkbcommon still lacks the necessary APIs. [1] legionus/kbd#72 |
I am willing to open a new PR to implement this feature asap |
Closes systemd#24228. Replaces systemd#25412.
Closes systemd#24228. Replaces systemd#25412.
Closes systemd#24228. Replaces systemd#25412.
Closes systemd#24228. Replaces systemd#25412.
Closes systemd#24228. Replaces systemd#25412.
See → #26182, which renames the variables. |
Debian/Ubuntu use almost the same variables, but without '_'. Given our usage is new, rename them so that they match and downstream tech debt can be removed. Follow-up for systemd#25805 See: systemd#24228 systemd#25412
Closes systemd#24228. Replaces systemd#25412.
Debian/Ubuntu use almost the same variables, but without '_'. Given our usage is new, rename them so that they match and downstream tech debt can be removed. Follow-up for systemd#25805 See: systemd#24228 systemd#25412
Component
other
Is your feature request related to a problem? Please describe
I hope I am describing this issue correctly, this came up on a draft merge request for Plymouth to make it so it doesn't rely on the kernel mode console for input, but evdev instead.
localectl writes the keymaps to the kernel console in /etc/vconsole.conf, but writes the value for the X11 keymaps in an X11 file, and it seems like it's smart enough to translate the keymap names, As I understand X11 (or user mode) keymap names are not one-to-one with the console keymap names
User mode processes that are not X11, and can't understand X11 config files easily might want a single place to refer to the default configured keymap that libxkbcommon understands.
Having the value saved in /etc/vconsole.conf by localectl might be good because the file is already known, maybe as an additional key like
XKB_KEYMAP
Describe the solution you'd like
It might be hard since now the value will be in two places since one would have to win, (like if someone manually edits the value on vconsole.conf, and not the X11 file, and now the current default one has to be read) but writing the XKB keymap as a key such as
XKB_KEYMAP=foo
to vconsole.conf would allow things that are not Xorg, such as some Wayland servers, or Plymouth. (OK mostly Plymouth)Plymouth on distros that use dracut already have /etc/vconsole.conf in their initrd, so amending this file might be the best bet for it
Describe alternatives you've considered
No response
The systemd version you checked that didn't have the feature you are asking for
No response
The text was updated successfully, but these errors were encountered: