GNOME Bugzilla – Bug 697597
keyboard: Without settings or under GDM make sure to add the US layout
Last modified: 2019-03-20 11:09:35 UTC
I tested setting my Windows 8 install to have only the Russian layout and got locked out. Let's try to be a bit better...
Created attachment 241001 [details] [review] keyboard: Without settings or under GDM make sure to add the US layout We don't want to end in a situation where users can't login because they can't type ASCII for their password.
Review of attachment 241001 [details] [review]: Looks to me like you are always forcing 'us' to be present, contrary to what the subject line says ?
(In reply to comment #3) > Looks to me like you are always forcing 'us' to be present, contrary to what > the subject line says ? Always under GDM and always when g-s-d starts up in a user account with an empty input sources list.
Doesn't if (g_str_equal (id, DEFAULT_LAYOUT)) have_default_layout = TRUE; in the 'non-empty list' case imply that you're still going to add 'us' unless it is in the list already ?
(In reply to comment #5) > Doesn't > > if (g_str_equal (id, DEFAULT_LAYOUT)) > have_default_layout = TRUE; > > in the 'non-empty list' case imply that you're still going to add 'us' unless > it is in the list already ? The whole function that this patch is changing only runs under GDM or when the input sources list is empty. Or am I misunderstanding you?
ah ok. I only read the patch, not the entire context. Go ahead then
(In reply to comment #7) > ah ok. I only read the patch, not the entire context. Go ahead then I'll take that as a-c-n. Thanks Attachment 241001 [details] pushed as f1f8384 - keyboard: Without settings or under GDM make sure to add the US layout
This patch is causing US layout to always be added to new user setup, since, by default, their layout list is empty :(
(In reply to comment #9) > This patch is causing US layout to always be added to new user setup, since, by > default, their layout list is empty :( Either reopen the bug, or better, file a new one.
reopening then.
(In reply to comment #9) > This patch is causing US layout to always be added to new user setup, since, by > default, their layout list is empty :( Can you tell us what problem is this causing? Note that I'm currently re-working how the whole keyboard layout/settings work for wayland. Please tell me about your use case here so that I can consider it.
(In reply to comment #12) > (In reply to comment #9) > > This patch is causing US layout to always be added to new user setup, since, by > > default, their layout list is empty :( > > Can you tell us what problem is this causing? By default, all users (but US people) end up with two configured keyboard layouts: one for their language and one for english, because when they first login, the layout list will be empty and the code will always add english layout. This causes the keyboard layout selector to be visible by default. I think this should be restricted to gdm and not enabled for regular user (unless no other layout could be added).
(In reply to comment #13) > By default, all users (but US people) end up with two configured keyboard > layouts: one for their language and one for english, because when they first > login, the layout list will be empty and the code will always add english > layout. This causes the keyboard layout selector to be visible by default. The bigger picture here is that gnome-initial-setup should always run when the user logs in for the first time and thus the user would choose it then or the system administrator should pre-configure things. In any case, I think this should indeed be restricted to GDM.
(In reply to comment #14) > (In reply to comment #13) > > By default, all users (but US people) end up with two configured keyboard > > layouts: one for their language and one for english, because when they first > > login, the layout list will be empty and the code will always add english > > layout. This causes the keyboard layout selector to be visible by default. > > The bigger picture here is that gnome-initial-setup should always run when the > user logs in for the first time and thus the user would choose it then or the > system administrator should pre-configure things. For GNOME OS, maybe. For distributions, I'm not sure, but let's not discuss this here :)
We also revert this patch on Endless [1], despite the fact that we use gnome-initial-setup, because we don't want two layouts (one for the system language and the US one) added by default to every user. I think it may still be OK to add the US layout in case no layouts at all would be there, so that basically there would be always at least one, but it should not be added for every user. [1] https://github.com/endlessm/gnome-settings-daemon/commit/9d709de1763d9537598f9beaaeff213ec4febb73
FTR the "us" layout is not even added to GDM anymore due to: if (g_getenv ("RUNNING_UNDER_GDM")) return; Introduced by commit 644d36f5e7d11c25fd2ee33c88800e3846efca38 Author: Rui Matos <tiagomatos@gmail.com> Date: Mon Mar 16 15:02:56 2015 +0100 keyboard: Remove the special handling of settings under GDM This has always been a hack and a cause of dconf writes during startup so let's remove it now that gnome-shell has learned how to get its system keyboard settings. https://bugzilla.gnome.org/show_bug.cgi?id=746289 Also, having this patch causes bug #780039, reverting this patch should at least workaround that bug (even if the root cause of the bug is somewhere else)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/210.