After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 617158 - Remove GDM_KEYBOARD_LAYOUT handling code
Remove GDM_KEYBOARD_LAYOUT handling code
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 634485 637281 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-04-29 10:46 UTC by Andrew Zabolotny
Modified: 2011-02-17 19:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Remove $GDM_KEYBOARD_LAYOUT handling (4.60 KB, patch)
2011-01-27 16:38 UTC, Bastien Nocera
committed Details | Review

Description Andrew Zabolotny 2010-04-29 10:46:19 UTC
I use two layouts, none of which is the "US" layout.

For some reason, at every login something (I assume it's gnome-settings-daemon, correct me if I am wrong) adds the "US" layout as third layout. As a result, my layout switching key cycles between three layouts instead of two.

How to reproduce: run gnome-keyboard-properties, and add some layout, for example "Albanian", then remove all other layouts.

Now if you log off and then back on, launch gnome-keyboard-properties and you'll find that there's a second "US" layout added, although I haven't asked for it.
Comment 1 Andrew Zabolotny 2010-04-29 11:02:34 UTC
If I open gconf-editor, and switch the /apps/gnome_settings_daemon/plugins/keyboard/active off, the additional "US" layout does not appear after login. However, keyboard layout settings aren't applied as well.

Thus, I think the problem is located in this plugin.
Comment 2 Bastien Nocera 2010-10-21 12:17:43 UTC
what's in your ~/.dmrc?

My guess is that you have "us" as the Layout, as discovered in:
https://bugzilla.redhat.com/show_bug.cgi?id=612834
Comment 3 Andrew Zabolotny 2010-10-21 19:50:07 UTC
Indeed, it contains Layout=us.

I didn't even know about this config file. I hope this will be fixed somehow, as it's quite end-user unfriendly :)
Comment 4 Bastien Nocera 2010-10-21 19:59:01 UTC
(In reply to comment #3)
> Indeed, it contains Layout=us.
> 
> I didn't even know about this config file. I hope this will be fixed somehow,
> as it's quite end-user unfriendly :)

Just select the correct layout from the login window (after having selected your user, at the bottom of the screen).
Comment 5 Andrew Zabolotny 2010-11-12 18:47:02 UTC
Upgraded today to Fedora 14 (gnome 2.32).

Now things got even worse.

My default keyboard layout (autogenerated in /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf) is:

Option "XkbLayout" "zap(us_ro),zap(ru)"

Now gdm for some reason ignores the variant, and whatever of the two layouts I select writes to ~/.dmrc:

Layout=zap

This leads to "zap" being always added as the third layout.

Why gdm's layout has at all to be added to user preferences? Why not leave user settings as user meant them to be? Isn't gnome here trying to be smarter than the user?
Comment 6 Bastien Nocera 2010-11-12 19:00:08 UTC
(In reply to comment #5)
> Upgraded today to Fedora 14 (gnome 2.32).
> 
> Now things got even worse.
> 
> My default keyboard layout (autogenerated in
> /etc/X11/xorg.conf.d/00-system-setup-keyboard.conf) is:
> 
> Option "XkbLayout" "zap(us_ro),zap(ru)"
> 
> Now gdm for some reason ignores the variant, and whatever of the two layouts I
> select writes to ~/.dmrc:
> 
> Layout=zap
> 
> This leads to "zap" being always added as the third layout.
> 
> Why gdm's layout has at all to be added to user preferences? Why not leave user
> settings as user meant them to be? Isn't gnome here trying to be smarter than
> the user?

GDM's layout is what the user can select when logging in. Not having that layout in the session would pretty much break expectations. If I logged in having selected a British English layout, I would expect it to be available (probably even the default). The problem with the GDM layouts not using variants is a problem in GDM, and you should file a bug there instead.
Comment 7 Sergey V. Udaltsov 2011-01-18 09:12:53 UTC
I guess, it is WONTFIX for g-c-c.
Comment 8 Bastien Nocera 2011-01-18 11:20:38 UTC
It's a bug in the layout preferences, as well as in GDM. GDM doesn't handle variants in the ~/.dmrc, and the keyboard layout preferences don't set it.
Comment 9 Sergey V. Udaltsov 2011-01-18 20:40:29 UTC
I do not think it is correct for the keyboard layout preferences to set anything in .dmrc - because it only deals with the session parameters - not the parameters used before and after the session. Why do you consider gdm dialog as a part of the user's session? How should gdm handle multiple layouts (if configured in g-c-c) - should full XKB config be stored in .dmrc?

You're right about gdm, it should handle variants. I closed this bug because you asked to file (new?) bug against gdm. You can reassign this one, if you like.

Finally, I actually tried to find any standard mentioning .dmrc (on fd.o). Is it specified anywhere?
Comment 10 Bastien Nocera 2011-01-18 21:32:40 UTC
(In reply to comment #9)
> I do not think it is correct for the keyboard layout preferences to set
> anything in .dmrc - because it only deals with the session parameters - not the
> parameters used before and after the session. Why do you consider gdm dialog as
> a part of the user's session? How should gdm handle multiple layouts (if
> configured in g-c-c) - should full XKB config be stored in .dmrc?

The default layout should be stored in ~/.dmrc. The ~/.dmrc chooses the layout that you'll get when logging in, and for typing your password. The layout chosen in GDM is also automatically added as the default to the session if it's not already set as such (so, on a new machine, I'd choose "uk" as the layout, and have the British English layout selected in my first login session).

> Finally, I actually tried to find any standard mentioning .dmrc (on fd.o). Is
> it specified anywhere?

It's GDM specific, though gnome-settings-daemon has knowledge of it.
Comment 11 Bastien Nocera 2011-01-27 15:11:32 UTC
*** Bug 637281 has been marked as a duplicate of this bug. ***
Comment 12 Bastien Nocera 2011-01-27 16:31:59 UTC
The GNOME 3 GDM doesn't have a keyboard layout selector any more, so we could just remove the code that adds the $GDM_KEYBOARD_LAYOUT layout in gnome-settings-daemon.
Comment 13 Bastien Nocera 2011-01-27 16:33:31 UTC
For people still on 2.32, tweak your ~/.dmrc to have the correct layout. It should look like:
[Desktop]
Layout=zap(us_ro)

or whatever is your preferred layout.
Comment 14 Bastien Nocera 2011-01-27 16:38:19 UTC
Created attachment 179442 [details] [review]
keyboard: Remove $GDM_KEYBOARD_LAYOUT handling

As GDM doesn't allow changing the keyboard layout any more.
Comment 15 Bastien Nocera 2011-01-27 16:44:54 UTC
Attachment 179442 [details] pushed as 7fdb0c0 - keyboard: Remove $GDM_KEYBOARD_LAYOUT handling
Comment 16 Andrew Zabolotny 2011-01-27 22:40:44 UTC
Hurray! :)

Anyways, lately somehow gnome-settings stopped doing the wrong thing on one of my workstations (gnome 2.32). In ~/.dmrc I have:

Layout=zap<Tab character>us_ro

And in gconf:/desktop/gnome/peripherals/keyboard/kbd/layouts I also have "zap" and "us_ro" separated with the <Tab> character, thus, I suppose, gnome-settings-daemon decides it's the same setting and doesn't add "US".
Comment 17 Bastien Nocera 2011-02-17 16:42:56 UTC
*** Bug 634485 has been marked as a duplicate of this bug. ***
Comment 18 Shimi Chen 2011-02-17 19:17:05 UTC
I can't get that workaround to work.

Can someone explain the syntax of it?
I tried the following and probably a few more I forgot:
Layout="us altgr-intl"
Layout=zap(us	altgr-intl)
Layout=us altgr-intl il

I can't figure it out and googled for long without finding any documentation on what syntax to use.
(us	altgr-intl is what shows up at gconf-editor as the layout code and il is my second layout)