Impossible to remove layout selected during OS installation

Bug #779509 reported by Gilles Tournier
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Invalid
Undecided
Unassigned
gnome-settings-daemon (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: gnome-settings-daemon

Binary package hint: gnome-settings-daemon

Ubuntu 11.04 (natty)
Kernel 2.6.38-8-generic (#42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011)
Gnome 2.32.1 (Ubuntu 2011-04-14)
gnome-settings-daemon 2.32.1-0ubuntu13.1

Steps to reproduce:
1) Install ubuntu with certain layout, say (United States USA).
2) Add aditional layout via gnome-keyboard-properties (say United Kingdom United Kingdom)
3) Remove the original layout (i.e. United States USA)
4) Reboot (or log out and in).

What happens:
After step 3), the layouts get changed as expected, but after step 4), the original layout is stil available and set as default in the keyboard indicator. (i.e. as if steps 2) and 3) were not executed)

What should happen:
The removal of the original layout should persist across reboots.

It seems that step 2) and 3) edit gconf key /desktop/gnome/peripherals/keyboard/kbd/layouts, but this key gets overwritten during step 4) .

Workaround:
1) Carry out steps 2) and 3) about.

2) Logout (or restart).

3) At the GDM greeter screen, choose your user. Once you do that, you'll see options at the bottom for accessibility etc. (note that you must set your user to require password to log in)

4) On that bottom strip, change your keyboard from <OLD ONE> , to "Other...". From the selection dialog, choose the new one you want to keep. It should match the one you kept from step 1).

5) Now when you finish the login process, you'll notice the keyboard indicator is gone. If you open up the Keyboard Preferences dialog, you'll only see one keyboard listed--the one you want.

Revision history for this message
Thorsten Huber (softknight) wrote :

I am using Natty Server without X as vbox guest. During the installation I choosed the german keymap "qwertz" with "no-dead-keys" but I get a "qwerty" layout. After "dpgk-reconfigure console-data" (as root) I can use my preferred keymap until the next reboot.

Revision history for this message
Gilles Tournier (gillestournier) wrote :

I have tried your suggestion to reconfigure console-data, but it does not change the problem. Furthermore, the behavior after reconfiguring console-data is the same as reported in the bug description: the settings are NOT remembered across reboots and I always end up with the wrong keyboard in a terminal, until I reset the settings via the indicator and then both X and console have the correct keyboard map.
I have also tried to reconfigure and reinstall gnome-settings-daemon; to no avail...
In my opinion, console-data is not involved with this bug.

Revision history for this message
Thorsten Huber (softknight) wrote :

Oh, it shouldn't be a suggestion. I think it is the same bug and I described how it behaves on my system. The common thing is: our keymap will not be remembered across reboots. After several reinstallations I can say, it won't be solved by choosing other install options.

BTW, my Natty Desktop (not a VM) is not affected.

Revision history for this message
Gilles Tournier (gillestournier) wrote :

What do you mean when you say your Natty Desktop is not affected? Have you done the same keyboard layout configuration as you described with the german kb map and everything behaves normally both with Xserver and the console (and also it keeps the configuration across reboots) ?

Revision history for this message
Thorsten Huber (softknight) wrote :

Yes. I have the standard Ubuntu Natty Narwhal installed onto my Inspiron 1501 with Gnome and Unity. No problems with the keymap anywhere and also after reboots.

On both systems I am using the same keymap: Desktop works, Server dosn't .... and I have no idea why. Hope there is a guru out there who can solve this issue.

Revision history for this message
Gilles Tournier (gillestournier) wrote :

Ok...but do you have two keyboard layouts to choose from or only one? Does the indicator applet show in the tray accordingly?
What keyboard did you choose during Natty first installation? Is it the same one as the layout you use now or did you add an additional keyboard layout afterward?
It seems to me that the french Ubuntu desktop I used for version upgrade has added the french azerty layout as a default although I asked for the swiss french layout...then I had to add the missing fr_CH layout and now I cannot get rid of the french layout which I don't need - after each reboot, the french layout reappears as default although it was removed in the previous session!
A possible clue is that there is a system-wide parameter somewhere that is used early at boot; and it would add the wrong keyboard and select it as default among possible configured layouts (which I think are stored in the gconf key /desktop/gnome/peripherals/keyboard/kbd).

Revision history for this message
Gilles Tournier (gillestournier) wrote :

Furthermore, I don't see why the mecanism for disabling the indicator from showing in the tray would not work or would not be implemented (as stated in other threads about this indicator): in my opinion, the code for handling the gconf key /desktop/gnome/peripherals/keyboard/general/disable_indicator is implemented in the source code package gnome-settings-daemon-2.32.1.
Here is the code in gsd-keyboard-xkb.c (gnome-settings-daemon/plugins/keyboard) handling that key:

static void
show_hide_icon ()
{
 if (g_slist_length (current_kbd_config.layouts_variants) > 1) {
  if (icon == NULL) {
   GConfClient *conf_client =
       gconf_client_get_default ();
   gboolean disable =
       gconf_client_get_bool (conf_client,
         DISABLE_INDICATOR_KEY,
         NULL);
   g_object_unref (conf_client);
   if (disable)
    return;

   xkl_debug (150, "Creating new icon\n");
   icon = gkbd_status_new ();
   g_signal_connect (icon, "popup-menu",
       G_CALLBACK
       (status_icon_popup_menu_cb),
       NULL);

  }
 } else {
  if (icon != NULL) {
   xkl_debug (150, "Destroying icon\n");
   g_object_unref (icon);
   icon = NULL;
  }
 }
}

Perhaps this function is not doing what it should ? Now it's up to the developper or maintainer of the code to check about that.

Revision history for this message
Thorsten Huber (softknight) wrote :

<quote>Ok...but do you have two keyboard layouts to choose from or only one? Does the indicator applet show in the tray accordingly?
What keyboard did you choose during Natty first installation? Is it the same one as the layout you use now or did you add an additional keyboard layout afterward?</quote>

I installed Natty with the german de_de (latin1_nodeadkeys) and it's the only one. I have no tray icon concerning the keymap/language. I never changed the language/keymap after the installation.

At my server installation i have no X, so there's no tray icon or something else. During the installation I choosed the same keymap but a "qwerty" was installed and used. Weired thing.

Revision history for this message
Gilles Tournier (gillestournier) wrote :

It sounds to me that the installer package is doing weird things and perhaps adding unwanted keyboard maps as a default...then this layout becomes a system-wide default that cannot be removed or changed!
At least, I experienced the same problem as your Natty server installation but with Natty Desktop "francophone" CD: at install time I chose the fr_CH layout, but it added the "Suisse" keyboard (a swiss german generic layout) and now it's always the default and I cannot get rid of it.
It seems to me that the Maverick install CD was better, because I ended up with only one keymap, which was the one I chose.
But this bug of not remembering this setting across reboot already existed: I played a bit with these settings under Maverick and I saw that if I added one more keyboard layout, I couldn't get rid of it afterwards. I cannot experiment this in the same way with Natty, because regardless of what keymap I asked for during install, it will always add another unwanted one.
Could you please comfirm this behaviour with you Natty desktop environment : if you add one more layout, can you get rid of it afterwards?
NB: be sure to backup your volume beforehand, as this cannot be reversed after if the bug happens!

Revision history for this message
Thorsten Huber (softknight) wrote :

I added the ch_fr keymap and made it to my default. First I thought, there is a similar strange behavior, but only the option "choose keymap for every window" was activated. I deactivated it and made the setting ch_fr as my default and de_de as secondary keymap as system-wide default. After several reboots the choosen keymaps were remembered correctly. Also the removal of every keymap I tried was working correctly. So, I can't confirm a strange keymap behavior under Natty Desktop.

Under Natty Server without X I can still confirm the strange keymap amnesia.

Revision history for this message
Gilles Tournier (gillestournier) wrote :

I have tried what you just described, but it does not work for me...First off, I never selected the option "choose keymap for every window" and the system-wide option was always available and selected.
Still, I cannot get rid of the unwanted keymap, which will always reappear after reboot. Damn!!
Frankly, at this point I don't know anymore and I can't see what else could be tried.
I hope someone more knowledgeable is looking this up - but it doesn't seem to be the case...

Revision history for this message
James Rother (pm-account) wrote :

Since there are no "me too" posts (at least exactly related), let me add one. I've reproduced this bug on two machines. Basic steps;

- I inadvertently chose USA Macintosh keyboard, for a generic PC with an aluminum mac keyboard (the full non-wireless one).
- Realizing this was a bad choice, and remembering that this keyboard works best with an "USA", "Generic 104-key PC" layout:
----- I added that keyboard using the Keyboard Preferences dialog.
----- I removed the "USA Macintosh" keyboard.

Then for that session, the keyboard indicator went away and the layout was "correct" (to my tastes - specifically, "Generic 104-key PC" and NOT the horribly busted (IMO) "USA Macintosh" layout.

But when I reboot, now there are two layouts (both the macintosh one and the generic one). And even though "USA" is the first listed, the active keyboard is actually "USA Macintosh". And the keyboard indicator is there.

No matter how many times I go through this, and whether or not I click "Apply System-Wide" after fixing the settings, it always comes back after a reboot with two keyboards and the wrong one active.

I've repeated this on two PCs, both with fresh installs of Ubuntu 11.04 Natty Norwhal x86 32-bit, and all updates applied as of 2011-06-18 (posting date). One machine is a Pentium 4 with 2gb RAM, the other a Pentium III with 512mb RAM.

Hope this helps.

Revision history for this message
James Rother (pm-account) wrote :

Oops actually I just remembered how I inadvertently worked around the bug on one machine. And I successfully applied the workaround on the other. Here are the workaround steps:

1) Go through the process I outlined above to remove the no-longer-wanted keyboard. [I'm not sure this step is required, but just in case.]

2) Logout (or restart).

3) At the GDM greeter screen, choose your user. Once you do that, you'll see options at the bottom for accessibility etc.

4) On that bottom strip, change your keyboard from <OLD ONE> [in my case "USA Macintosh"], to "Other...". From the selection dialog, choose the new one you want to keep. It should match the one you kept from step #1. In my case, it was simply: "USA".

5) Now when you finish the login process, you'll notice the keyboard indicator is gone. If you open up the Keyboard Preferences dialog, you'll only see one keyboard listed--the one you want.

Note that this is a workaround to a still obvious bug somewhere. It appears to me that the GDM greeter and Keyboard Preferences aren't using the same mechanism or something...

Revision history for this message
Gilles Tournier (gillestournier) wrote :

Hello James,

Thank you for the workaround you found. I confirm that this actually worked for me too and that it did solve the problem !
The settings are being remembered across reboots when the proper keyboard is selected at the GDM greeting (and this is only needed once).

I do agree with you that this is only a workaround; and that is does not actually solve the bug...

But it is now clear that there is an interaction between the GDM greeter and gnome-settings-daemon: GDM seems to superseed the settings saved with gnome-settings-daemon for that user at startup and force it's own settings for the session.

Now, should this bug be re-routed to the GDM team?

Revision history for this message
TomasHnyk (sup) wrote :

James: step first is necessary.

TomasHnyk (sup)
summary: - keyboard layout settings not remembered
+ Impossible to remove layout selected during OS installation
Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Revision history for this message
TomasHnyk (sup) wrote :

I changed the title and description so that it is clearer what the bug is actually about. I hope it is clearer, if it is not, feel free to improve on it. Also added gnome-control-center, because it contains gnome-keyboard-properties that are the gui for removing and adding keyboard layouts. I am not sure the bug is there though.

description: updated
description: updated
TomasHnyk (sup)
Changed in gnome-control-center (Ubuntu):
status: New → Invalid
description: updated
Revision history for this message
TomasHnyk (sup) wrote :

I shuld think first and act later gnome-keyboard-properties has nothing to do with this, it instead seems that editing gconf key /desktop/gnome/peripherals/keyboard/kbd/layouts in sessions is not respected (if this editing contains removing the default layout).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.