Bug ID | 1226347 |
---|---|
Summary | display-manager.service unconditionally overwrites /etc/vconsole.conf on start |
Classification | openSUSE |
Product | openSUSE Distribution |
Version | Leap 15.6 |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Major |
Priority | P5 - None |
Component | X.Org |
Assignee | gfx-bugs@suse.de |
Reporter | srid@rkmail.ru |
QA Contact | gfx-bugs@suse.de |
Target Milestone | --- |
Found By | --- |
Blocker | --- |
When display-manager.service starts, it unconditionally overwrites console configuration in /etc/vconsole.conf. display-manager.service is a part of 'xdm' package. It contains a script /etc/X11/xdm/keytable, which is run at service start. The script unconditionally changes system locale according to KEYMAP setting in /etc/vconsole.conf. This is not an acceptable behavior! For various reasons, user might want to have different values for KEYMAP and XKBLAYOUT. And sometimes, the preferred KEYMAP would not have an XKB counterpart leaving user without XKB settings at all. In my opinion, the keytable script should not unconditionally touch system configuration. What happens now: 1. The keytable script looks for /etc/vconsole. If it exists, it reads $KEYMAP and $KEYMAP_TOGGLE variables 2. Then it looks for /etc/X11/xorg.conf.d/00-keyboard.conf file. If this file does not exist, it calls 'localectl set-x11keymap us', which results in overwriting both $KEYMAP and $XKBLAYOUT variables in /etc/vconsole.conf, as localectl does automatic conversion of layout settings. 3. Then, it checks if previously stored $KEYMAP has a matching XKB layout in /us/share/systemd/kbd-model-map, but takes no action other than informing user with messages. 4. It calls 'localectl set-keymap $KEYMAP $KEYMAP_TOGGLE', overwriting /etc/vconsole.conf once more. 5. Last thing, script checks if /etc/X11/xorg.conf.d/00-keyboard.conf has appeared, and if it does not, it gives a warning. To me, all above makes no sense. I have no idea why we need this script at all. I believe, something like this should happen: 1. Script checks if /etc/X11/xorg.conf.d/00-keyboard.conf exists. If it is there, take no action and exit peacefully. It's not our business if the user has incorrect/inconsistent keyboard configuration. 2. If 00-keyboard.conf does not exist, script should check /etc/vconsole.conf for $XKBLAYOUT. If $XKBLAYOUT exists, it should be poke localectl with 'localectl --no-convert $XKBLAYOUT $XKBMODEL $XKBVARIANT $XKBOPTIONS' to generate new 00-keyboard.conf. Ideally, localectl should have an option to just touch XOrg config, without making changes to vconsole.conf. 3. If $XKBLAYOUT does not exists, or is empty, etc, it *might* be intentional, give a warning and let XOrg to start without 00-keyboard.conf file at all. I believe it should default to 'US' layout anyway. On the other hand, the Tumbleweed XDM package contains no such script at all, and everything continues to work if I delete it on Leap 15.6 manually.