Bug#386836: [Pkg-kbd-devel] Bug#386836: console-setup: smooth upgrade from pre-console-setup systems

Anton Zinoviev anton at lml.bas.bg
Sat Sep 16 20:54:39 UTC 2006


On Sun, Sep 10, 2006 at 04:08:07PM +0100, Colin Watson wrote:
> Package: console-setup
> Version: 1.7
> Severity: wishlist
> Tags: patch
> 
> The attached patch implements a relatively smooth upgrade from
> pre-console-setup systems. If X is installed, it extracts the desired
> keyboard layout from xorg.conf; failing that, it uses a pretty horrible
> lookup table borrowed from Ubuntu's xserver-xorg.config (which is a
> superset of Debian's, I think), with the additional bug-fix of mapping
> uk to plain gb rather than gb(intl) because UK users do not expect to
> have dead keys. If it finds a keyboard layout using either of these
> methods, it drops the priority of the layout and variant questions from
> critical to medium.

Hi, Colin!

I am realy unsure whether it is a good thing to drop the priority of
the layout and variant questions.  In the current version of
config.proto there is some code where I tried to make the priority of
the layout question language dependent - there is a 'case "$locale"'
statement that gives a value to the variable $layout_priority.
However later I decided to leave this variable unused.

What concerns me is that in can be a real disaster if the layout guess
is wrong.  If this happens then you are not allowed even to fix the
system since in order to fix the system you need a working keyboard...
The current debian kernels do not support the emergency mode "-b" on
the boot prompt and in single user mode the bad keyboard will be
already activated.  Even if you manage to type somehow the correct
password (you don't see what you type!) you have to know how to fix
the keyboard working with a wrong one.

For now I will try to use only the value of debian-installer/keymap.
If one has been able to complete the installation with some particular
keymap then this keymap is most likely usable and hopefuly it is
relatively safe to lower the priority of the layout question.  I hope
that for most cases this will be enough to provide a smooth update
from pre-console-setup systems.

I do not want to use the xorg.conf file because I have seen many
systems with completely wrong keyboard setup in this file since both
GNOME and KDE provide user-friendly instruments to setup the keyboard.
I suppose this happens mostly with non-latin keyboards because one
can use the usual QWERTY keyboard in order to type the password.

By the way the values of XKBLAYOUT and XKBVARIANT from the patch you
provided are not exactly the same as the values of XkbLayout and
XkbVariant from xorg.conf.  They are more like default_layout and
default_variant.  For example XKBLAYOUT="bg" and XKBVARIANT="bds"
correspond to XkbLayout "us,bg" and XkbVariant ",bds".  Otherwise we
would end with a keyboard that is uncapable to produce a single Latin
character.  Even though the current code of the config script
overrides this bad value it is better not to rely on this.

Also I think it is better not to guess the keyboard model (i.e. the
values of XKBMODEL and default_model) either from xorg.conf or from
debian-instaler/keymap.  The current model detection code is safer.

Anton Zinoviev

P.S. I have already commited in the SVN repository the fixes I propose
for all bugs you reported.




More information about the Pkg-kbd-devel mailing list