Bug#515685: console-setup: needs to read xorg.conf on install to get xkb settings
On Mon, Feb 16, 2009 at 11:33:25PM +0100, Julien Cristau wrote:
> Package: console-setup
> Version: 1.28
> Severity: normal
> Blocks: 508244
Why is this bug blocking #508244?
> on upgrade from lenny to squeeze, console-setup will get installed as
> dependency of xserver-xorg, and the keyboard layout for X will be read
> from /etc/default/console-setup (unless for some reason that plan
> doesn't work out, but so far it seems ok).
> In order to make the upgrade path work, and avoid prompting users or
> unexpectedly changing their X kbd layout, console-setup will thus need
> to read xorg.conf, with something like the following patch. This is
> only lightly tested at the moment (thus no patch tag), but I'm filing
> this early in case people have comments already :)
> Basically, I scan xorg.conf for the first InputDevice section with an
> XkbLayout option, and use the options from that section. This is not
> quite complete (if you have multiple InputDevice sections with different
> layouts, all but the first will be ignored), but should cover most
> One question though, it looks like it's not possible to set multiple
> layouts using console-setup's debconf interface? Is there another way
> to preserve this kind of settings when they're set that way in
Thanks for your work. I will finish it. Console-setup's debconf
interface doesn't support multiple layouts (unless the language is
non-latin in which case latin+non-latin combination is supported).
However console-setup supports any combination of layouts in its
configuration file so I think it shouldn't be a problem to read
arbitrary configuration from xorg.conf.
However I am not sure that it is OK for X to use the configuration of
console-setup when the system is upgraded (of course this is OK when X
is installed for first time).
First, there are some meaningless for the console options, for example
XkbGeometry. Does this mean that XKBGEOMETRY has to be added in
/etc/default/console-setup? If the configuration of console-setup is
used only when X is installed for first time and not when X is only
upgraded then it would be unnecessary to support XKBGEOMETRY in
Suppose also that the user has installed both console-setup and X and
she wants different keyboard configurations on the console and in X. In
this case after the upgrade the old settings for X will be ignored.
Another complication is that the user may have specified XkbSymbols
instead of XkbLayout, XkbVariant and XkbOptions. This also is not
supported by console-setup's debconf but can be easily supported in
/etc/default/console-setup. If you want I can change the next version
of console-setup to be able to read XkbSymbols from xorg.conf and to
ignore XKBLAYOUT, XKBVARIANT and XKBOPTIONS in
/etc/default/console-setup if there is also XKBSYMBOLS.