Ubuntu – Keyboard Layouts missing in Keyboard Layout –Precise upgrade


This is from a bug I reported that never got a response. That was a 11.10 upgrade and now with a Precise upgrade, the issue continues with the Precise upgrade.


I can't add alternative keyboard layouts.

Steps to reproduce

  1. Go to Keyboard Layout
  2. Press the + button
  3. Nothing at all appears. That is, no selections to choose from.

Realize the + button is faded, despite that the other buttons (- and others) light up.

Expected results

Alternative keyboard layouts should appear to choose from.

This is what I've done since then without results that stick.

Thinking that the problem is linked to the fact that I uninstalled other-than-English language support with BleachBit, I did the following:

  • reinstalled language-selector-gnome
  • reinstalled language-pack-en-base

I went back to Keyboard Layout and the + button is still faded.

I even went so far as to add Spanish locale to see if I could add another layout, but this didn't make a difference. I can't add any layouts to the ones I already have installed (US alternative, US International, English Mac, and the International alt/Gr version).

I tried the following:

dpkg-reconfigure locales
update-locale LANG=en_US.UTF-8

Although it did seem to update my locale settings, when I went back to Keyboard Layout, the + button was still faded.

I haven't tried dpkg-reconfigure localeconfig because this is not installed and apparently xkeyboard-config is an EOL.

xkb-data looks promising from the description in the Software Center:

"This package contains configuration data used by the X Keyboard Extension (XKB), which allows selection of keyboard layouts when using a graphical interface."

A quick wajig reinstall xkb-data proved my hopes wrong.

It seems the only thing that temporarily allowed me to install more layouts was sudo dpkg-reconfigure keyboard-configuration. I selected the colemak layout to see if it took. I ran it but by the time I rebooted, the change didn't stick.

I just reinstalled iso-codes, and for a few minutes I saw that the keyboard applet showed colemak I had installed previously with. I relogged back in and it was gone, but colemak shows in cat /etc/default/keyboard but not in Xorg. A quick Ctrl+Alt+F1 showed me that it did take, but only in console.


Somehow I don't think sudo dpkg-reconfigure keyboard-configuration was meant to (only?) change the console layout.

I'm just reading /etc/default/keyboard and it says the following:

# If you change any of the following variables and X is configured to
# use this file, then the changes will become visible to X only if udev
# is restarted.  You may need to reboot the system.

I can assume that X is listening, at least until I reboot, when changes are thrown away. So, I assume there is a conflict between more than one file or sets of files as to which layouts take predominance.

Any ideas anyone? This one has me stumped.

Oh, and I wonder if this Keyboard input method system menu selection under Language Support has anything to do with this. I would assume no.


Another solution, if I weren't already using my own .Xmodmap file would be to do something like sudo xmodmap /usr/share/xmodmap/xmodmap.uk.

Best Answer

The Keyboard Layout window inexplicably won't allow you to choose more than 4 layouts. However, you can fire up gconf-editor and navigate to /desktop/gnome/peripherals/kbd/layouts and manually add as many layouts as you like.

I don't understand the arbitrary limit in the GUI, though.