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 697597 - keyboard: Without settings or under GDM make sure to add the US layout
keyboard: Without settings or under GDM make sure to add the US layout
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-09 00:46 UTC by Rui Matos
Modified: 2019-03-20 11:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Without settings or under GDM make sure to add the US layout (1.93 KB, patch)
2013-04-09 00:46 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-04-09 00:46:32 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...
Comment 1 Rui Matos 2013-04-09 00:46:34 UTC
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.
Comment 2 Matthias Clasen 2013-04-09 01:48:09 UTC
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 ?
Comment 3 Matthias Clasen 2013-04-09 01:52:28 UTC
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 ?
Comment 4 Rui Matos 2013-04-09 10:46:20 UTC
(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.
Comment 5 Matthias Clasen 2013-04-10 12:33:40 UTC
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 ?
Comment 6 Rui Matos 2013-04-10 12:36:09 UTC
(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?
Comment 7 Matthias Clasen 2013-04-11 01:38:16 UTC
ah ok. I only read the patch, not the entire context. Go ahead then
Comment 8 Rui Matos 2013-04-11 08:45:57 UTC
(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
Comment 9 Frederic Crozat 2014-06-30 14:31:20 UTC
This patch is causing US layout to always be added to new user setup, since, by default, their layout list is empty :(
Comment 10 Bastien Nocera 2014-07-01 13:47:48 UTC
(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.
Comment 11 Frederic Crozat 2014-07-01 14:00:30 UTC
reopening then.
Comment 12 Rui Matos 2014-07-01 14:14:29 UTC
(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.
Comment 13 Frederic Crozat 2014-07-01 14:47:58 UTC
(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).
Comment 14 Rui Matos 2014-07-01 15:02:00 UTC
(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.
Comment 15 Frederic Crozat 2014-07-01 15:59:54 UTC
(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 :)
Comment 16 Cosimo Cecchi 2016-05-25 19:54:12 UTC
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
Comment 17 Laurent Bigonville 2017-07-07 16:10:27 UTC
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)
Comment 18 GNOME Infrastructure Team 2019-03-20 11:09:35 UTC
-- 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.