GNOME Bugzilla – Bug 619464
GNOME-Control-center does not report a change in default keyboard layout to GDM
Last modified: 2011-03-23 21:02: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.
Is it an official interface supported by gdm - or just an implementation detail?
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.
"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.
After some more looking I found that G-C-C gets its default keyboard layouts from /desktop/gnome/peripherals/keyboard/general/defaultGroup in gconf.
> 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 ;)
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!