How can I have only two specific keyboard layouts in my system without 'us'?

Posted by ??O????? on Ask Ubuntu See other posts from Ask Ubuntu or by ??O?????
Published on 2011-03-02T10:47:59Z Indexed on 2011/03/02 15:33 UTC
Read the original article Hit count: 236

Filed under:
|
|

I want only two keyboard layouts in my system: us altgr-intl (USA International (AltGr dead keys) ) and gr (Greece), so this is what I've selected in System ? Preferences ? Keyboard ? Layouts. However, every time I begin a new Gnome session (reboot, logout/login), the us keyboard layout is automatically inserted at the top of the list.

I created a small script called fixlang that ensures the desirable result:

layouts='[us    altgr-intl,gr]' # tab between us and altgr
key=/desktop/gnome/peripherals/keyboard/kbd/layouts

active_layouts="$(gconftool -g $key)"
if [ "$active_layouts" != "$layouts" -o "$1" == -f ]
then
    gconftool -t l --list-type=str -s $key "$layouts"
fi

which I run on login.

However, this is a kludge. How can I ensure that Gnome does not mess with my keyboard layout selection?

© Ask Ubuntu or respective owner

Related posts about gnome

Related posts about keyboard-layout