GNOME login without any keypress prevents the working of GNOME-configured keyboard options

Bug #253168 reported by André Pirard
2
Affects Status Importance Assigned to Milestone
Ubuntu
In Progress
Undecided
Unassigned

Bug Description

This is a very precise how to reproduce and a neat conclusion.
People in a hurry may jump to the last paragraphs, but I bet they'll come back here for the whole story.

Although I have very little time because this bug lost --- and almost got me mad during --- a whole week, I would hate to postpone this report and forget the details of a neat conclusion.

This is using pure, recent Ubuntu 8.04.1, no update.
Precisely, customizing (with scripts) the installations of several laptops
- using UK keyboard with Russian stickers
- as multi-users computers using English, Russian, French and Spanish.
(If you're asked why we're doing that in Belgium, just reply : Ubuntu).

Inherent to the Russian keyboard, two switched keyboard layouts must be defined.
In this case, UK (gb in X parlance) and RU.
French accents being needed, that's gb international and ru is the winkeys variant.

Is it because of the same bug, I didn't investigate but please do, I was unable to define the layouts in gnome (with gnome-keyboard-properties) : the second layout would (sometimes? it's long ago in my mind) display funny characters for is it just RU. I was even loosing my Greek too.

So, I resorted to the following /etc/X11/xorg.conf :
Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "gb,ru"
    Option "XkbVariant" "intl,winkeys"
    Option "XkbOptions" "grp:alt_shift_toggle"
EndSection

and it got it working, done thing.

Almost. Except that, according the gnome-keyboard-properties again :
Layouts tab : Separate layout for each window
No layouts configured (xorg.conf's are displayed)
One layout is tagged as default
Otherwise said by $ gconftool -R /desktop/gnome/peripherals/keyboard
 /desktop/gnome/peripherals/keyboard/general:
  groupPerWindow = true
  defaultGroup = 1
or
  defaultGroup = 2
 /desktop/gnome/peripherals/keyboard/kbd:
  layouts = []
  model =
  overrideSettings = true
  options = []

The keyboard state should have been local to each window and it was global to the session.
Quite an annoying thing when you switch between windows needing Latin and Cyrillic keyboard layouts to have to alt-shift constantly to get the correct state, instead of this state being remembered for each window.

In fact, the problem was occurring for some usernames only, and sometimes not for the username it had been bugging before.
I made a lot of suppositions and I even reinstalled a system 4 times because I was under the impression that once the error occured for user X it was forever and there was even no use to remove X entirely and reinstall it because some memory of X remained somewhere.

I finally came down to a case where adding the first two users of a freshly reinstalled system with a plain System Administration Users and Groups operation :
- t test
- a Daria (initially Дарья but I suspected that Ubuntu didn't like Russian names or language)
the second had the problem and the first not.

This is too much, I thought. I knew gnomes as jokers but nothing like racists able to guess, after totally wiping a system, that Daria really does speak Russian and that test doesn't ;-)

So, what was, beside expectedly different names, the difference explaining this?
Gosh, a was passwordless login and t wasn't !!!!
Precisely, as follows
http://doc.ubuntu-fr.org/gdm#identification_sans_mot_de_passe
(sorry, I warned you about languages ;-))
user names defined in /etc/gdm/nopassusers.txt

But (the week time is nearly over) what the heck is the relation between a password and a keyboard ??? Well, obviously that you need the first one to type the second ;-)

The thing is that I use the following GDM greeter :
/etc/gdm/gdm.conf-custom :
[greeter]
GraphicalTheme=happygnome-list
GraphicalThemes=happygnome-list
GraphicalThemeRand=true
Exclude=nobody,wine,t

Passworded users type a password and continue login.
Passwordless ones just click on their face to make their way into login.

And so, here's my conclusion of all this ramble :

If the keyboard is not used to make a GDM login, the so-called "Separate layout for each window" gnome keyboard option does not work (and maybe the Gnome-defined layouts either, no time to test that).

This is, I think, proven by the fact that it's sufficient for the affected user to type some junk in the input area before clicking to get their loin working correctly.

I'm not hoping it will help, I'm sure of it ;-)

Revision history for this message
Biörn (bioern) wrote :

I can confirm this bug. I have configured gdm to automatically log me in which means I don't have to touch neither keyboard nor mouse to log in.

My keyboard preferences are the following (in gnome-keyboard-properties):
 - 3 different layouts
 - Separate layout for each window
 - Ctrl key position: Swap Ctrl and CapsLock
 - Layout switching: Alt+Shift change layout

Symptoms after logging in without touching the keyboard:
 - Alt+Shift to switch the layout does not work.
 - Ctrl and CapsLock are not swapped.
 - When using the mouse and the keyboard applet to switch the layout:
  - The applet cycles through only the two first layouts.
  - The change of layout is not effective, although displayed by the applet.
  - Therefore, I cannot tell whether 'Separate layout for each window' works.

How to reproduce:
 - Configure more than two layouts in the keyboard preferences.
 - Configure your favorite layout options.
 - Setup gdm to log you in automatically after a few seconds (or some other keyboard-less method).
 - Log out and wait to be logged in automatically. Do not touch the keyboard!
 - See if your keyboard preferences are in effect and if the layout switching works. Both should not work.
 - Log out and touch any (modifier) key on the keyboard, then wait until automatically logged in again.
 - Your keyboard features should work.

Workaround: In the keyboard preferences, open the 'Layout Options' and change one of the many options (and change it back again). This probably causes the all the keyboard settings to be (re-)configured (this should already have taken place when logging in). The layout switching and all the layout options should now work again.

André Pirard (a.pirard)
Changed in gdm:
status: New → In Progress
Revision history for this message
André Pirard (a.pirard) wrote : Re: [Bug 253168] Re: GNOME login without any keypress prevents the working of GNOME-configured keyboard options

On 2008-09-13 14:43, Biörn wrote :
> Workaround: ...
All other similar reports were saying that the problem occurs with
autologin.
Hence, I introduced this report with the correct reason in the title.
The problem occurs at least with passwordless login too.

Now that Bug #196277 has changed its title to almost the same, I've set
this one as a duplicate.

The best workaround has been stated without any single word sending you
for a 1-hour search :

Bryce Harrington wrote [to Bug #196277] on 2008-05-14 : (permalink)
> [... running 'setxkbmap' at login time is a workaround ...]
>
> Another way to add 'setxkbmap' is to copy this into file
> ~/.config/autostart/setxkbmap.desktop:
>
> [Desktop Entry]
> Type=Application
> Encoding=UTF-8
> Version=1.0
> Name=setxkbmap
> Name[en_US]=setxkbmap
> Exec=setxkbmap
> X-GNOME-Autostart-enabled=true

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.