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 784654 - g-s-d always adds a "us" layout
g-s-d always adds a "us" layout
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
3.24.x
Other Linux
: Normal normal
: ---
Assigned To: Rui Matos
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-07 15:39 UTC by Laurent Bigonville
Modified: 2017-07-17 13:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Only add the "us" layout if the machine default cannot be determined (2.54 KB, patch)
2017-07-07 20:19 UTC, Laurent Bigonville
reviewed Details | Review
keyboard: Only add the "us" layout if the system config cannot be determined (2.56 KB, patch)
2017-07-12 08:52 UTC, Laurent Bigonville
committed Details | Review

Description Laurent Bigonville 2017-07-07 15:39:23 UTC
Hello,

While looking at the bug #780039, I saw that the keyboard plugin is always adding the "us" layout.

Is there any reasons for that? If the default machine layout is defined in localed, I don't see a reason to do so.

Do I miss something?
Comment 1 Laurent Bigonville 2017-07-07 15:52:34 UTC
Apparently the original reason of this is bug #697597
Comment 2 Laurent Bigonville 2017-07-07 20:19:35 UTC
Created attachment 355120 [details] [review]
Only add the "us" layout if the machine default cannot be determined

Currently, the "us" keyboard layout is added in almost all the cases,
this should only be necessary if the default layout of the machine
cannot be determined.
Comment 3 Rui Matos 2017-07-10 13:32:24 UTC
Review of attachment 355120 [details] [review]:

I agree with the code change and it looks good but the commit message needs to be improved:

1. prefix the summary with "keyboard:"
2. "machine default" isn't really correct, you should mention "system config"
3. you should mention that this is only about empty user configurations (which is far from "almost all the cases")
Comment 4 Michael Catanzaro 2017-07-12 01:07:35 UTC
Is this a recent regression?

I noticed that after running gnome-initial-setup in F26, my keyboard layout was set to English (US) even though I had selected a different layout on the keyboard page. It added my selected layout as a new secondary layout, leaving English (US) as primary. It should have deleted all layouts except my selected layout, because I did not select English (US). Is that this bug, or is that a different bug?
Comment 5 Laurent Bigonville 2017-07-12 08:52:27 UTC
Created attachment 355394 [details] [review]
keyboard: Only add the "us" layout if the system config cannot be determined

Currently, the "us" keyboard layout is always added the first time the
user is login in, this should only be necessary if the system configured
layout cannot be determined.
Comment 6 Rui Matos 2017-07-12 14:33:07 UTC
(In reply to Michael Catanzaro from comment #4)
> Is this a recent regression?
> 
> I noticed that after running gnome-initial-setup in F26, my keyboard layout
> was set to English (US) even though I had selected a different layout on the
> keyboard page. It added my selected layout as a new secondary layout,
> leaving English (US) as primary. It should have deleted all layouts except
> my selected layout, because I did not select English (US). Is that this bug,
> or is that a different bug?

definitely not this one as this only applies when a user account has zero input sources configured when g-s-d starts up.

regarding what you describe, see

https://git.gnome.org/browse/gnome-initial-setup/commit/?id=a6b0132193d1c4031035d4d412285a488dfaf2a6
and
https://git.gnome.org/browse/gnome-initial-setup/commit/?id=c76336be6e274908f303a35715f8ce9230a9d137
Comment 7 Rui Matos 2017-07-12 14:35:17 UTC
Review of attachment 355394 [details] [review]:

looks good, thanks
Comment 8 Rui Matos 2017-07-14 09:21:19 UTC
Attachment 355394 [details] pushed as d68ef6a - keyboard: Only add the "us" layout if the system config cannot be determined