[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Keyboard preseed for X



(Cc'ing -i18n and -x for completeness)

On Παρασκευή 07 Ιανουάριος 2005 08:33, Christian Perrier wrote:
> > So I was thinking about hacking on localization-config so that it
> > will use the debconf key obtained during installation to set up
> > the keyboard and map that one to the keyboard setup for X
> > instead. The debconf question is answered like this on my new
> > install:
>
> Kostas (Konstantinos Margaritis, l-c maintainer) plans to do
> exactly this. As Otavio mentioned, look at these days discussions
> in the archive.

Ok, I have finished working on this and am now in the process of 
testing & packaging.

The main changes now are these:

1) It tries to read the debconf variable debian-installer/keymap.
If it finds it, it uses this map[1] to preseed the XFree86 keyboard 
with the correct values. All these values have been collected by 
asking the correct people and trying to use common sense when 
I had no choice. In no case have I changed these values, so if there 
is something wrong, don't blame me. If you _do_ see a missing/faulty 
entry, please drop me a mail.

2) If debian-installer/keymap is not set or if its value is not in the 
map, the script will try to fall back to the previous method of 
checking the locale but with a difference. This time, it will try to 
be intelligent and if a locale entry is not in the list, the script 
will try to guess it (where that is possible). I give you an example 
using a quite improbable combination for a locale: 

fi_ES.UTF-8@euro

Yes, it's quite unlikely anyone will choose this, but I just want to 
prove the point. If it doesn't find (which it won't) this locale in 
the list, the script will try to guess the correct settings to use, 
trying to strip the locale progressively. Here is the output:

fi_ES.UTF-8@euro not defined!
removing part after @ (if any)...
lng = fi_ES.UTF-8
fi_ES.UTF-8 not defined!
removing encoding (if any)...
lng = fi_ES
fi_ES not defined!
removing country part (if any)...
lng = fi
fi not defined!
last chance, will take the first entry from a search in the list...
fi_FI@euro
lng = fi_FI@euro
Found fi_FI@euro =>    Finnish (FI)

If the list contains more than one entries then it will pick the first 
one (alphabetically for now) but I'm thinking of a priority queue if 
there is a need in the future).

So far the script seems to be working quite fine, but as it's quite a 
rewrite, I'd appreciate some testing before it gets included in d-i.
I will do the upload later today (localization-config v 0.110), after 
i write up some comments, update the changelog, etc.

Konstantinos

---
[1] This is the map produced dynamically by the command:

/usr/lib/localization-config/sarge/xfree86-kbd showkeymaps

and is uploaded at 

http://people.debian.org/~markos/console_x_map.txt

feel free to check your settings.

Attachment: pgpFvzhqr07MA.pgp
Description: PGP signature


Reply to: