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 619464 - GNOME-Control-center does not report a change in default keyboard layout to GDM
GNOME-Control-center does not report a change in default keyboard layout to GDM
Status: RESOLVED INCOMPLETE
Product: gnome-control-center
Classification: Core
Component: Keyboard
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-23 22:18 UTC by Ben
Modified: 2011-03-23 21:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ben 2010-05-23 22:18:05 UTC
I am forwarding this bug from downstream https://bugs.launchpad.net/gdm/+bug/530999. 

To reproduce: change the default keyboard layout to something other than the layout chosen during install. Remove the old layout. Restart. At the log in screen the old keyboard layout will still be selected. (in an auto login situation this bug still shows itself as the original keyboard layout shows back up in your keyboard preferences even though you removed it.)

Apparently GDM checks this location for the keyboard layout:$ /var/cache/gdm/$USER/dmrc.
Comment 1 Sergey V. Udaltsov 2010-05-24 20:17:51 UTC
Is it an official interface supported by gdm - or just an implementation detail?
Comment 2 Ben 2010-05-25 03:21:22 UTC
I believe it is an official interface supported by GDM, I originally filed this as a GDM bug and the person who responded said this: GDM layout is saved per user.
You need to check $HOME/.dmrc and /var/cache/gdm/$USER/dmrc.

I am not 100% sure though, if you could point me to an IRC channel where someone could help answer the question for sure I can spend some time trying to find out.
Comment 3 Ben 2010-05-25 06:09:31 UTC
"The user's default session and language choices are stored in the ~/.dmrc file. When a user logs in for the first time, this file is created with the user's initial choices. The user can change these default values by simply changing to a different value when logging in. GDM will remember this change for subsequent logins." (http://library.gnome.org/admin/gdm/stable/configuration.html.en#generalsessionconfig)

So it looks like the file it looks at is /home/.dmrc and not the one in the title and it is an official interface.

So basically my /home/.dmrc looks like this:
[Desktop]
Language=en_US.utf8
Layout=us
 

But the default keyboard layout I have chosen in G-C-C is US with the altgr dead keys. It is almost as if G-C-C and GDM are fighting each other. This is worrisome because If I log out, change the keyboard layout in GDM and log back in G-C-C overrides it and sets me back to the default I have set there, so what is the point of the selector on GDM? I think that both GDM and G-C-C need to get the DEFAULT layout from the same place, which should be /home/,dmrc, this way the selector on GDM actually works in all cases, and then G-C-C can load any additional layouts from somewhere else to keep the layout switching between multiple layouts easy. This is just a suggestion I don't understand the code well enough to know the best solution, but as it is GDM and G-C-C are not very well integrated for keyboard layouts.
Comment 4 Ben 2010-05-25 07:00:13 UTC
After some more looking I found that G-C-C gets its default keyboard layouts from /desktop/gnome/peripherals/keyboard/general/defaultGroup in gconf.
Comment 5 Sergey V. Udaltsov 2010-05-25 20:49:06 UTC
> So it looks like the file it looks at is /home/.dmrc
I would tend to agree. Two questions remain: 

1. In the link you provided, they say about language but they do not mention layout. Why?

2. Does gdm provide an API to read/write/update .dmrc? I hope I do not have to parse the file ;)
Comment 6 Felipe Besoaín Pino 2010-09-11 12:26:59 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!