[Pkg-utopia-maintainers] Bug#524098: xserver-xorg: dependency on console-setup broke keyboard settings

Michael Biebl biebl at teco.edu
Mon Apr 20 12:40:50 UTC 2009


Am 17.04.2009 09:50, schrieb Julien Cristau:
> On Fri, 2009-04-17 at 09:16 +0200, Gabor Gombas wrote:
>> On Thu, Apr 16, 2009 at 07:15:03PM +0200, Julien Cristau wrote:
>>
>>>> Yes, that works (at least lshal now returns the correct values; I have
>>>> long-running jobs so I can't log out to test if X receives them). From
>>>> what little I understand from HAL, the call to debian-setup-keyboard
>>>> happens _after_ procesing the .fdi files, so it will always overwrite
>>>> any custom configuration unconditionally.
>>>>
>>> that still sounds like a hal bug to me.
>> I don't think so. You specify in a config file that it should run a
>> script that updates the configuration, but you expect that script to run
>> _before_ parsing the config files?
>>
> i expect that whatever's in /etc (configuration) overrides whatever's
> in /usr (defaults), yes.

It's indeed a problem, as hal can only merge static configuration in a 
sensible way. And debian-setup-keyboard is a callout.

>>>> You should probably not only check for the existence of the input.xkb.*
>>>> keys, but also that all keys still have the default value. Probably you
>>>> should remove the xkb-specific part from
>>>> /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi, and
>>> that's shipped by hal, so xserver-xorg can't do anything about that.
>> Yes you can. You can request the HAL maintainers to disable that script
>> (IMHO the directory is called "OS vendor" for a reason), and then depend
>> on the corrected HAL version.
>>
> sigh.  that would still mean a change in hal first, wouldn't it?
>
>>>> debian-setup-keyboard should only set the input.xkb.* properties if they
>>>> are _all_ empty (otherwise it would be difficult to distinguish the
>>>> "layout is US by default" and the "layout has been explicitely set to
>>>> US" cases).
>>>>
>>> i don't think debian-setup-keyboard can distinguish between 'layout set
>>> by hal's 10-keymap.fdi' and 'layout set by the user's config' currently.
>> I've just described how you can do it in my previous mail.
>
> not without a change in hal.  hence "currently".  so no, you didn't.

Maybe there is another way (totally untested though).
You remove the xkb keys in debian-x11-keymap.fdi, with something like

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
   <device>
     <match key="info.capabilities" contains="input.keys">
         <remove key="input.xkb.layout" type="string"/>
         <remove key="input.xkb.variant" type="string"/>
       </match>
   </device>
</deviceinfo>

This *should* still preserve user configuration in /etc/hal/fdi and 
would allow the debian-setup-keyboard script to check, if those values 
are empty and only modify them if so.


As said, this is completely untested. Just something that came to my mind.

Cheers,
Michael





More information about the Pkg-utopia-maintainers mailing list