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?
You are probably experiencing bug #688936. It hasn't been fixed yet, but you could try the workaround in comment #5:
Are you sure you're not running some script which is modifying the list of layouts on boot/login already? I've used only the "USA Dvorak International" and "Norway" layouts since 8.04, and I've never seen this. Or if you modified the GNOME settings files by hand (which looks likely, considering
fixlang
), this is probably detected and overridden on GNOME shutdown/startup.