[rant] keeping policy in HAL

Alexander E. Patrakov patrakov at gmail.com
Sun Nov 30 21:47:06 PST 2008


Peter Hutterer wrote:
<adding the list back>
> On Mon, Dec 01, 2008 at 09:55:03AM +0500, Alexander E. Patrakov wrote:
>> Obvious problem: it is too late to set the keyboard layout in the  
>> desktop environment. The user has to type the login and the password  
>> into the display manager, and the keyboard layout has to be correct at  
>> this stage, too.
> 
> obvious solution: let the display manager set the keyboard layout?
> although others may disagree, for me the DM counts as part of the DE as well.

Then, what DE does XDM count as a part of?

>> Well, in fact, there is such interface (the Xsetup_0 file), it just  
>> lacks the comment that such commands should be placed there. If this  
>> works without races (i.e., if the setxkbmap command there will modify  
>> the layout for both currently connected keyboards and the default for  
>> future devices), I will consider the issue closed as long as this  
>> command (commented-out by default) is added there in GIT.
> 
> isn't X supposed to be mechanism, not policy? we provide the hooks, let
> someone else decide on how to use them. X provides the hooks for setting the
> keymap, you'll need to trigger them somehow.

OK. However, the policy should have some centralized implementation 
usable by all DEs, as I don't want to convince each and every DE to 
invent their own wheel.

Also, currently, for unconfigured Xorg, such newly-added keyboard gets 
the "us" layout. This is also a hard-coded policy, should we remove it? 
In fact, I would consider any default other than "completely unusable 
keyboard that doesn't produce any events" a policy. Reason: I want US 
developers eat their own dogfood.

> setxkbmap won't be able to set the layouts for future devices.

Then something is bad. Suppose that, due to EMI, the kernel decided to 
disconnect and reconnect the USB keyboard after setxkbmap has set the 
layout for it. Who will reset the layout for it? XDM currently can't run 
programs in response to such events. Should I report this as a bug?

-- 
Alexander E. Patrakov




More information about the xorg mailing list