prefered way of configuring X11 keyboard layouts in F18

Panu Matilainen pmatilai at laiskiainen.org
Mon Dec 3 07:20:05 UTC 2012


On 12/02/2012 10:57 PM, Miloslav Trmač wrote:
> On Sun, Dec 2, 2012 at 12:38 AM, Sérgio Basto <sergio at serjux.com> wrote:
>> system-config-keyboard should do this:
>>
>>       1. Get the old settings: cat /etc/sysconfig/keyboard
>>       2. Set the new settings: su -c 'localectl set-x11-keymap <layout>
>>          [<model>] [<variant>] [<options>]'
>>       3. Remove the old configuration file: su -c
>>          'rm /etc/sysconfig/keyboard'
>>
>> or at least warning that we should do something new like this .
> http://pkgs.fedoraproject.org/cgit/systemd.git/commit/?h=f18&id=0969ad24898347919865e9298fa01e19cec98649
> already attempts to do some kind of automatic conversion.  If that is
> insufficient, please file bugs against systemd.

It seems that the virtual console layout is migrated ok, but the x11 
part is not. This is what I get on my two upgraded F18 boxes:

[root at turre ~]# localectl
    System Locale: LANG=en_US.UTF-8
        VC Keymap: fi
       X11 Layout: n/a
[root at turre ~]#

The "n/a" part is the "problem" as it falls back to US keyboard. 
localectl manual says both set-keymap and set-x11-keymap apply to both 
the keymaps unless --no-convert is specified, but that doesn't seem to 
happen in practise:

[root at turre ~]# localectl set-keymap fi
[root at turre ~]# localectl
    System Locale: LANG=en_US.UTF-8
        VC Keymap: fi
       X11 Layout: n/a
[root at turre ~]# localectl set-x11-keymap fi
[root at turre ~]# localectl
    System Locale: LANG=en_US.UTF-8
        VC Keymap: fi-latin1
       X11 Layout: fi
[root at turre ~]# localectl set-keymap fi
[root at turre ~]# localectl
    System Locale: LANG=en_US.UTF-8
        VC Keymap: fi
       X11 Layout: fi
        X11 Model: pc105
      X11 Options: terminate:ctrl_alt_bksp

It's a bit bizarre: set-keymap doesn't seem to find "fi" as the closest 
matching keyboard for x11 (it probably should), set-x11-keymap considers 
"fi-latin1" to be the closest matching keymap for "fi", but in this 
specific order its possible to get both set to "fi". Only it now adds 
additional model + options there, whatever the reason.

	- Panu -


More information about the devel mailing list