gnome-control-center removes XKBMODEL and XKBOPTIONS from /etc/default/keyboard

Andreas Henriksson andreas at fatal.se
Fri Feb 19 16:10:03 GMT 2016


Hello Anton Zinoviev.

Not sure about the cause or have any real solution, just adding some
additional information below (and CCing systemd maintainers).

On Fri, Feb 19, 2016 at 03:54:24PM +0300, Anton Zinoviev wrote:
> clone 751955 -1
> reassign -1 gnome-control-center
> retitle -1 Removes XKBMODEL and XKBOPTIONS from /etc/default/keyboard
> severity -1 serious
> thanks
> 
> Hello,
> 
> I can confirm that gnome-control-center removes XKBMODEL from 
> /etc/default/keyboard.  Steps to reproduce:
> 
> 1. $ grep -q XKBMODEL /etc/default/keyboard && echo fine || echo broken
>    -> fine
> 2. $ gnome-control-center
> 3. Go to "Region & Language"
> 4. Go to "Login Screen"
> 5. In the "Input Sources" section add some random keyboard layout
> 6. $ grep -q XKBMODEL /etc/default/keyboard && echo fine || echo broken
>    -> broken
> 
> The test is done on a regular Jessie system.  The version of gnome-control-center 
> is 1:3.14.2-3.

Thanks for the testcase. The gnome-control-center program only calls out to
"localed" via dbus. In Debian it is patched with the following patch:

http://sources.debian.net/src/systemd/215-17%2Bdeb8u3/debian/patches/Update-localed-to-use-the-Debian-config-files.patch/#L114

(And as you can see on that particular line XKBMODEL is parsed. Not sure
what resets it.)

> 
> By the way, I was very surprised to find that gnome-control-center modifies a 
> configuration file belonging to other package.  This is not something Debian 
> policy permits.

If you want to get into policy discussion land you should know that
/etc/default/keyboard is *not* a conffile (as far as I can see).
Thus whatever policy says about conffiles does not apply to it.
Please register it as such under dpkg if you want it to be handled
as one (but beware that I don't think console-setup itself then
is policy compliant in its handling of the file if it would be
a conffile).

> Nevertheless, we do want the keyboard configuration to be user 
> friendly, so I approve what gnome-control-center does, as long as it does it 
> correctly. :)

Suggestions on what correctly means here could be helpful.
Is XKBMODEL= always expected to be written out to the file even
if the value is empty? (or is it a bug in the parsers not handling
when its missing? I'd say normally you want parsers to be liberal
in what they accept.)

I also noticed that patched localed writes out the file without the
values quoted.... is that considered required?
eg. FOO="bar" becomes FOO=bar when localed writes the file.

Anyway, further investigations needed to pinpoint the exact cause
of XKBMODEL et.al. being unset.

> 
> By the way, I've found that gnome-control-centers doesn't remove the variables it 
> doesn't understand.  Therefore, it seems the reason it removes XKBOPTIONS and 
> XKBMODEL is that it tries to do something with these variables.
> 
> Anton Zinoviev
> 
> 

HTH.

Regards,
Andreas Henriksson



More information about the Pkg-systemd-maintainers mailing list