Bug 474010

Summary: gdm kbd layout setting should add US layout by default for layouts without Latin characters
Product: [Fedora] Fedora Reporter: Lev Shamardin <shamardin>
Component: gdmAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 17CC: atigro, atorkhov, i18n-bugs, jmccann, lemenkov, peter.hutterer, petersen, pnemade, rstrode, sergey.rudchenko, tagoh, TBomBM3879, tfujiwar, tim623
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://www.redhat.com/archives/fedora-devel-list/2008-December/msg00047.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 603958 (view as bug list) Environment:
Last Closed: 2013-07-25 06:37:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 474014, 603958    
Attachments:
Description Flags
Photo of a physical russian keyboard, showing two layouts printed on keys.
none
Photo of a physical greek keyboard, showing two layouts printed on keys.
none
Patch for gdm-common.h, gdm-session-direct.c, gdm-layouts.c
none
Patch for gdm-common.h, gdm-session-direct.c, gdm-layouts.c
none
Patch for gdm page.ui
none
Patch for gnome-settings-daemon gsd-keyboard-xkb.c none

Description Lev Shamardin 2008-12-01 19:18:52 UTC
Description of problem:
If you select "Russian" keyboard during system installation then gdm is configured to use Russian input for user names and passwords by default. Any language different from english does not make sense for user name, and probably english should be default for passwords.

Version-Release number of selected component (if applicable):
gdm-2.24.0-12.fc10.i386

How reproducible:
always?

Steps to Reproduce:
1. install a fresh fedora system using "Russian" keyboard. Don't be afraid, it won't affect the installation since during installation you will have US english layout with this selection anyway.
2. try to enter a login name when you get that far.
  
Actual results:
You are entering funny cyrillic characters.

Expected results:
English, at least for user name and hopefully for password.

Additional info:
https://www.redhat.com/archives/fedora-devel-list/2008-December/msg00047.html

Comment 1 Tristan 2009-03-02 23:41:01 UTC
I don't get this bug?

If you select the Russian keyboard layout, then that's exactly what you'll get; the Russian layout for the keys on your keyboard.

If you are using a US keyboard, then use the US keyboard layout.

Comment 2 Tristan 2009-03-03 00:54:01 UTC
*** Bug 474011 has been marked as a duplicate of this bug. ***

Comment 3 Lev Shamardin 2009-03-03 05:35:56 UTC
(In reply to comment #1)
> I don't get this bug?
In case you don't know, Russian layout does not have any of the the latin characters.

Unix account names always use English low-case alphabet. Therefore in order to be able to enter a unix account name (this is an expected thing at a login screen, right?) you would like to be able to enter English letters, and you can't if the only keyboard layout available is Russian. Even more, the most common practice, at least in Russia, is not to use Russian layout when entering passwords, but use the English layout; otherwise you often can encounter "there-are-many-encodings" problems.

To have a Russian keyboard layout as the only choice at the login prompt as an insane default. Nobody even in Russia would be able to use this default setting. This must be changed.

This is an insane and unsuable default.

And even if you ignore the login problem, almost every Russian user will install the English keyboard as one of the first actions on a new system, because there are lots of other places where latin letters are used. Some examples are unix command line and web URLs.

> 
> If you select the Russian keyboard layout, then that's exactly what you'll get;
> the Russian layout for the keys on your keyboard.
> 
> If you are using a US keyboard, then use the US keyboard layout.

And I can tell you even more, Russian keyboard layout is not the only layout with this peculiarity. At least a Greek layout has the same problems. I believe there are other layouts as well.

For all these layouts you would like to have:
1. English layout selected as default on the login screen.
2. English layout installed as an alternate layout after logging in.

No exceptions.

Comment 4 Lev Shamardin 2009-03-03 05:38:02 UTC
This is not the duplicate of 474011. This bug is about insane default, bug 474011 is about broken layout switching at login.

Comment 5 Tim Li 2009-08-05 02:10:41 UTC
Solving this bug would solve bug 474014 by eliminating the need to "double-switch" (see Description of bug 474014.)

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 6 Bug Zapper 2009-11-18 07:47:49 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Jens Petersen 2009-11-24 08:24:00 UTC
I think I can reproduce this with F12 Live:

1. boot F12 Live
2. switch layout to Russia
3. autologin as liveuser
4. observe only "ru" layout installed not "us" as well

I think we need to install both for Russian: "us,ru"
would probably be better for technical users anyway.
Then Shift+Caps_Lock should allow switching "ru" <-> "us".

Comment 8 Jens Petersen 2009-11-24 08:45:11 UTC
Ah I see: if I then logout and change to US kbd layout
and login again then the gnome kbd applet shows "us,ru".
(Though no xkb toggle for changing layout,
eg Shift+Caps_Lock, defined.)

I think we need "XX,us" for all layouts that don't
provide Latin input, or maybe better checkboxes
in the gdm options layout widget to select multiple
layouts?

Comment 9 Arkady L. Shane 2009-11-24 09:26:06 UTC
(In reply to comment #8)

> Ah I see: if I then logout and change to US kbd layout
> and login again then the gnome kbd applet shows "us,ru".
> (Though no xkb toggle for changing layout,
> eg Shift+Caps_Lock, defined.)
> 
> I think we need "XX,us" for all layouts that don't
> provide Latin input, or maybe better checkboxes
> in the gdm options layout widget to select multiple
> layouts?  

Yes, checkboxes (and pre checkboxed items for different languages) is a very, very good idea. But "us" must be the primary layout for non latin. For some other (as cz,us) let it be cz,us.

Comment 10 fujiwara 2009-11-26 04:21:48 UTC
Probably I could understand this issue.
In the most cases, I would think users could define their keyboard layouts with gnome-keyboard-properties after they log into the session.
However it seems this request is to the special keyboard layouts which don't have ASCII chars. They need to type both ASCII and the language chars.

Yes, sending multiple layouts could be a solution. However I'd think that selecting one layout on GDM is simple.

Probably I think one solution is to configure input method.

E.g. A user chooses "ru" on GDM and log into the GNOME session, ibus checks the user's layout, if the layout is found in the predefined list in ibus, ibus provides the "us" layout with Ctrl + Space.
If the users could switch "ru" and "us" with the trigger key, probably I think this problem could be resolved and if they want other language layouts, they could use gnome-keyboard-properties.

Comment 11 Lev Shamardin 2009-11-26 07:53:28 UTC
No, you don't get it at all.

There is no need to tweak ANYTHING after the log in.

And there is no need to provide switching in GDM.

It is very simple: after user is logged in any kind of defaults, setups etc. is fine and must be left for the user.

But not at the GDM. At the GDM you ALWAYS need to type latin characters. So, if you have selected US keyboard you do not need to change anything for GDM defaults. If you have selected French keyboard you do not need to change anything for GDM defaults. If you have selected Greek keyboard you MUST change default layout in GDM to US. If you have selected Russian keyboard you MUST change default layout in GDM to US. And so on. Not AFTER logging in to GNOME session. Not allowing to switch with more comfort in GDM. Just set the appropriate for the keyboard latin layout in GDM as default, and thats it!

Comment 12 Lev Shamardin 2009-11-26 08:03:56 UTC
And yes, there is another place in the system which needs the same amount of sane defaults, but I'm too lazy right now to open a separate bug. It's gnome-screensaver. If you happen to lock your screen with NO latin layout available to switch to, you will never be able to unlock it.

The perfect solution would be something like this: at all places which prompt for system password or login, default selected layout must be appropriate latin layout (US for US keyboard, French for French keyboard, US for Russian keyboard, US for greek keyboard, etc.)

Comment 13 Jens Petersen 2009-11-26 08:47:03 UTC
Ok so there are two issues

(1) make sure user can input Latin characters in gdm
(2) config good default layouts for desktop

Lev is talking about (1).
So probably (2) might be moved to another bug
even though they might be solvable together.

(Using input-methods or ibus for xkb switching might
help but Latin layout needs to be base layout for
gdm, screensaver, etc.)

Comment 14 Jens Petersen 2009-11-26 08:48:49 UTC
However I think the easiest way to solve (1) is by (2).

Comment 15 Lev Shamardin 2009-11-26 08:52:13 UTC
You cannot solve (2) because what is a 'good default' for the user is up to the user to decide. There will always be dissatisfied with your 'good defaults'. But for the GDM and other login/password prompts there can be only one 'good default': latin layout.

Comment 16 Jens Petersen 2009-11-26 08:54:22 UTC
Taking ru as the example: /usr/share/X11/xkb/symbols/ru
doesn't provide Latin input so when using it the layout
should be set to "us,ru" and xkb can do layout switching
(per window) between us and ru as needed.  We are also
thinking how ibus can help with this eventually.

Comment 17 fujiwara 2009-11-26 09:10:13 UTC
(In reply to comment #11)
> default layout in GDM to US. If you have selected Russian keyboard you MUST
> change default layout in GDM to US. And so on. Not AFTER logging in to GNOME

From this mention, the Russian users normally select "us" layout in GDM with the physical Russian keyboard but don't select "ru" layout for the user/passwd prompt and they like to switch ru and us layout after log into the session?

If we fix this in either GDM or IBus side, probably I think the hard-coded list is needed and it could be done in ibus.

Comment 18 Lev Shamardin 2009-11-26 09:24:49 UTC
(In reply to comment #17)
> From this mention, the Russian users normally select "us" layout in GDM with
> the physical Russian keyboard but don't select "ru" layout for the user/passwd
> prompt and they like to switch ru and us layout after log into the session?

Yes, normally Russian users have "us" layout in GDM with a physical Russian keyboard, and after logging into the session they usually have two layouts with switching between them, "us" and "ru" (typically a layout variant which was named "ru-winkeys" some time ago). Which one is the default depends on the user's main activity. Those who often type commands usually prefer "us" layout as the default, while those who use generally mail-browser-office applications often prefer "ru" layout as the default, but usually all Russian users have two layouts configured with switching.

For those of you who have no idea what does 'physical Russian keyboard' look like, I will attach a picture to this bug. Please notice that the keys have two layouts printed on them: US (upper characters on letter keys, left column of characters on symbols and numbers) and Russian (lower characters on letter keys, right column of characters on symbols and numbers).

Comment 19 Lev Shamardin 2009-11-26 09:25:34 UTC
Created attachment 373944 [details]
Photo of a physical russian keyboard, showing two layouts printed on keys.

Comment 20 Lev Shamardin 2009-11-26 09:29:32 UTC
Created attachment 373945 [details]
Photo of a physical greek keyboard, showing two layouts printed on keys.

Comment 21 Jens Petersen 2009-11-27 01:36:39 UTC
http://wikipedia.org/wiki/Keyboard_layout

What is the default layout on Windows?  Probably Russian?
We have to have default... :)
And what should it be on a Linux desktop?

For all Asian languages we currently default to Latin input
and users have to turn on the input-method for native input.
So to me it seems natural to do the same for xkb layouts.
I think this is might be ok for Fedora's current user audience,
but with long term proliferation we may need to rethink.

Comment 22 Jens Petersen 2009-11-27 01:43:38 UTC
Or how would you decide when to switch layout immediately in gdm and when not?

Eg AZERTY (French) or Dvorak users would not want gdm to delay changing layout until after login.

Comment 23 Lev Shamardin 2009-11-27 05:22:00 UTC
On windows if you select Russian keyboard, the system is configured to have two layouts, US and Russian with layout switching and Russian as default, even at login prompt.

Windows allows unicode login names (and russian login names become more and more common for home users). POSIX does not. There is absolutely no point to have a non-latin layout as default when you need to enter a POSIX login!

Comment 24 Peter Hutterer 2009-11-27 05:51:55 UTC
how about the following idea:

gdm provides an on-screen keyboard. this keyboard provides the layout selected by the user (russian in this case) but also "Switch to US layout" button. Hitting this button changes _both_ the virtual keyboard and the physical keyboard to a us layout. Hitting the "back" button (or whatever) changes back to the previous method.

This is an idea only, with no code to back it up but it solves a few issues:
- users without a keyboard can log in using the virtual keyboard
- users with a non-ascii layout can switch to an ascii-layout if needed
- no "magic" layout switching using possibly unknown keyboard shortcuts
- if the layout is changed to US, the visual representation shows what the physical keyboard now does. for those not used to the US layout, this provides an overview of what the keyboard does now.

Comment 25 Lev Shamardin 2009-11-27 06:37:45 UTC
(In reply to comment #24)
> how about the following idea:
> 
> gdm provides an on-screen keyboard. this keyboard provides the layout selected
> by the user (russian in this case) but also "Switch to US layout" button.
> Hitting this button changes _both_ the virtual keyboard and the physical
> keyboard to a us layout. Hitting the "back" button (or whatever) changes back
> to the previous method.

I have a better idea. Let's make Russian layout with big convinient button to switch to US as default for US Keyboard.

The whole point is THERE ARE ABSOLUTELY NO CASES WHEN YOU NEED A RUSSIAN LAYOUT AT LOGIN PROMPT!!!

You do not need switching, you do not need more convinient switching, all you need is a f-----g latin layout as default!

> This is an idea only, with no code to back it up but it solves a few issues:
> - users without a keyboard can log in using the virtual keyboard

Users without a keyboard must hit "change layout" button first. Great.

> - users with a non-ascii layout can switch to an ascii-layout if needed

And users with non-latin layout must hit "change layout" button first.

> - no "magic" layout switching using possibly unknown keyboard shortcuts

But they can see that big button clearly.

> - if the layout is changed to US, the visual representation shows what the
> physical keyboard now does. for those not used to the US layout, this provides
> an overview of what the keyboard does now.  

And we will have a shiny virtual keyboard, great!

Comment 26 Sergey Rudchenko 2009-12-05 05:32:12 UTC
My 2 cents.

GDM should know whether it works on a POSIX system and enable ONLY latin keyboard layout for it's login input field.

From the other hand, passwords CAN contain non-latin characters so it's worth to have an ability to type them.

I propose to add a layout indicator (pretty like gnome-panel applet, but cutted) in right of the password input box. For those who have a non-latin password. The layout list for the switcher should be filled with the us+system default keyboard (e.g. us,ru). Notice, the latin layout should go first, because most of users are careful enough to use a latin password.

And finally, I think the proposed switcher should be hidden if the alternative layout contains all the latin characters (GDM would need some library to determine that?).

The switcher widget itself must solve the problem for users unfamiliar with the default layout toggle shortcuts.

Comment 27 fujiwara 2010-02-19 10:06:11 UTC
Created attachment 395063 [details]
Patch for gdm-common.h, gdm-session-direct.c, gdm-layouts.c

Sorry for dispatching the issue. 

I thought to fix this in IM side but there are several problems; one is a design issue in either ibus Linpus version or ibus-xkbc and another is IM should be disabled in password dialog for lookup table.
Now I'm back to GDM for this issue.

When I see system-config-keyboard, it has the hard-coded table in /usr/lib/python2.6/site-packages/system_config_keyboard/keyboard_models.py.
Probably it would be a good idea to have the static data instead of parsing xkb directory.
I picked up "ara", "bg", "cz", "dev", "gr", "gur", "in", "mkd", "ru", "ua" from the keyboard_models.py.

This patch assigns Ctrl+Shift to switch the layouts of "us" and the original on both GDM login and logged session.
system-config-keyboard assigns Shift_L+Shift_R but I guess some keyboards might not have two shifts.

It still needs to change gnome-settings-daemon but almost works fine in my test.

Comment 28 fujiwara 2010-02-23 09:09:24 UTC
Created attachment 395671 [details]
Patch for gdm-common.h, gdm-session-direct.c, gdm-layouts.c

Revised the patch to use gconf and put a label "Ctrl + Shift toggles layouts" in prompt when you select the non-ASCII layout.

Comment 29 fujiwara 2010-02-24 02:58:03 UTC
Created attachment 395876 [details]
Patch for gdm page.ui

The patch is applied over the internal patch gdm-multistack.patch .

Comment 30 fujiwara 2010-02-24 02:59:54 UTC
Created attachment 395877 [details]
Patch for gnome-settings-daemon gsd-keyboard-xkb.c

gnome-settings-daemon can load the group layouts with this patch.

Comment 31 fujiwara 2010-02-24 03:39:17 UTC
Working on the upstream bug:
https://bugzilla.gnome.org/show_bug.cgi?id=610903

Comment 32 Bug Zapper 2010-03-15 12:11:32 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 33 Jens Petersen 2010-08-30 06:28:45 UTC
Still happening with F14

Comment 34 Akira TAGOH 2011-06-01 09:58:51 UTC
It's close to f13 EOL soon. according to comment #33, changing the version to 14 so far.
good to test this for f15 too.

Thanks,

Comment 35 Bug Zapper 2011-06-02 18:22:45 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 36 Lev Shamardin 2011-06-10 12:16:48 UTC
Problem is still here.

Comment 37 Fedora Admin XMLRPC Client 2011-06-21 15:29:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 38 Fedora Admin XMLRPC Client 2011-06-21 15:31:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 39 Fedora Admin XMLRPC Client 2011-06-21 15:34:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 40 Fedora Admin XMLRPC Client 2011-06-21 15:36:56 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 41 Fedora Admin XMLRPC Client 2011-06-21 15:43:03 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 42 Fedora Admin XMLRPC Client 2011-06-21 15:47:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 43 Fedora Admin XMLRPC Client 2011-06-21 15:49:17 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 44 Fedora Admin XMLRPC Client 2011-06-21 15:51:32 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 45 Fedora Admin XMLRPC Client 2011-06-21 15:52:47 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 46 Fedora End Of Life 2013-04-03 19:50:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 47 Jens Petersen 2013-05-16 09:34:04 UTC
I think this is fixed in F18 by anaconda
which adds US layout by default.

Comment 48 Jens Petersen 2013-05-16 09:34:54 UTC
How was F17?

Comment 49 Fedora End Of Life 2013-07-04 06:39:38 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 50 Jens Petersen 2013-07-25 06:37:11 UTC
Closing since this will not be fixed for F17 and later
releases have some solutions in please.