Add keyboard layout indicator to unity-greeter

Bug #834487 reported by Haggai Eran on 2011-08-26
112
This bug affects 17 people
Affects Status Importance Assigned to Milestone
Unity Greeter
Fix Released
Medium
Michael Terry
unity-greeter (Ubuntu)
Medium
Michael Terry

Bug Description

Hi,
In some locales, it is common to have more than one keyboard layout set, one to enter the native language, and one for latin characters. In the unity desktop, there's an indicator that shows the current layout, and allows switching layouts. I think that unity-greeter should show that indicator as well. Sometimes users have the wrong keyboard layout while typing passwords, and have no indication that they're not typing their password correctly.

The keyboard indicator is shown by gnome-settings-daemon's keyboard plugin, and by the application-indicator.

Related branches

Robert Ancell (robert-ancell) wrote :

This is required in the design and should be implemented time permitting.

Changed in unity-greeter:
status: New → Triaged
importance: Undecided → Medium
Robert Ancell (robert-ancell) wrote :

Patches welcome :)

Changed in unity-greeter (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Haggai Eran (haggai-eran) wrote :

Here's a patch lp:~haggai-eran/unity-greeter/keyboard-layout-indicator .
It doesn't work completely though. It adds an indicator and you can use that indicator to switch the keyboard layout, but if you use the keyboard shortcut to switch layouts, it isn't updated for some reason.

Robert Ancell (robert-ancell) wrote :

I haven't had time to look at this but one thing to watch out for is if this patch can bring any innappropriate indicators.

Haggai Eran (haggai-eran) wrote :

Maybe indicator-application can use the INDICATOR_GREETER_MODE environment variable and disable other application indicators.

Mathias (mathias-me) wrote :

Somehow my updated Ubuntu thinks it should use the English keyboard. Since I use some special characters in my password I am not able to login without the "visual" keyboard which is kind of annoying. I would highly appreciate if the keyboard layout patch would be applied.

theyogre (theyogre-m) wrote :

I set up the computer with dvorak keyboard, and my wife's account has en(US) keyboard as default, now, but I have to help her login because her default is not recognized at the greeting screen. I, too, would love it if this got fixed. Thanks!

Haggai Eran (haggai-eran) wrote :

Hi,

I've uploaded a patched package to a ppa (ppa:haggai-eran/ppa). You are welcome to try it. I didn't see any unwanted indicators when using it. There's still a problem that the indicator doesn't change when using a keyboard shortcut to change layouts. I'd be happy if someone could guide me how to solve this problem, since I can't seem to find a solution myself.

tikal808 (tikal808) wrote :

I have to add my comments to this one too. Being able to change the keyboard layout at the login screen is something that GNOME has supported for years. It is required functionality when more than one layout is configured on the system. For example, here we use English Dvorak and English US (qwerty) layouts on the same machines and keyboards. Being able to switch layouts at the login screen is essential to be able to properly type in user names and passwords. One of Ubuntu's primary goals is usability, and not having an option to select a layout at the login screen is damaging to usability.

Michael Terry (mterry) wrote :

I was looking into this... liblightdm-gobject has its own support for listing and setting the keyboard layout. When you set the layout via that API, it goes and twiddles with xklavier.

So... We could go the normal route:
 * Enable the keyboard plugin of gnome-settings-daemon
 * Enable the indicator-application indicator
 * Blacklist all other application indicators (maybe by registering ourselves as an Approver for the indicator?)
 * Have the keyboard indicator not show some of its menu items when its in greeter mode (like don't show the keyboard preferences item)
 * We'd then want that indicator to instead of doing its normal thing, somehow send word back to us about what the user chose so we can call the right liblightdm-gobject method

That all seems to be going out of our way to make things hard. I propose that instead, we go the NIH route and write a small indicator to do this in a lightdm-native way. I *think* this would be a small amount of code and more self-contained. I'll start looking into this way.

Michael Terry (mterry) on 2011-12-20
Changed in unity-greeter:
assignee: nobody → Michael Terry (mterry)
status: Triaged → In Progress
Michael Terry (mterry) wrote :

So right now, the menu will show all layouts ever. Which is a bit gross. Does design have ideas about something better?

In my opinion the ideal behavior would be that when you click a person's name, the keyboard is set to that user's default keyboard layout, and that user's other keyboards are also available from the menu or indicator.

Haggai Eran (haggai-eran) wrote :

I think Felix idea's nice. If a user used their default layout when setting their password, they should use the same layout when entering.
In addition, I would set the keyboard layout for the 'Other' user as the default system layout, so that the computer's administrator can decide which would be the default layout there.

Martin Pitt (pitti) on 2012-01-11
Changed in unity-greeter (Ubuntu):
assignee: nobody → Michael Terry (mterry)
Michael Terry (mterry) on 2012-01-12
Changed in unity-greeter (Ubuntu):
status: Triaged → In Progress
Michael Terry (mterry) on 2012-01-12
Changed in unity-greeter:
status: In Progress → Fix Committed
Changed in unity-greeter (Ubuntu):
status: In Progress → Fix Committed
Haggai Eran (haggai-eran) wrote :

Since this bug is being closed, I've opened a new bug (#915390) to discuss which layouts to put in the keyboard indicator menu.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-greeter - 0.2.0-0ubuntu1

---------------
unity-greeter (0.2.0-0ubuntu1) precise; urgency=low

  * New upstream release
    - Improve scrolling animation (LP: #844050)
    - Select menubar when F10 is pressed
    - Fix Orca not starting when enabling screen reader (LP: #850554)
    - Add a keyboard indicator (LP: #783827, LP: #834487)
    - Always focus new windows
    - Check version of Vala when compiling
    - Update logo for 12.04 (LP: #892394)
    - Use default invisible character in password dialog (LP: #834878)
    - Darken indicator bar
    - User smaller grid size
    - Put end-stops on user list scrolling
    - Only fade out user labels that can't fit in completely (LP: #883260)
    - Center dots (LP: #872800)
    - Add translator comments (LP: #855385)
    - Add option to disable dots (LP: #883908)
    - Only redraw parts of the screen that have changed
    - Don't run the greeter if can't connect to daemon and not in test mode
      (LP: #876754)
 -- Robert Ancell <email address hidden> Thu, 19 Jan 2012 14:56:21 +1100

Changed in unity-greeter (Ubuntu):
status: Fix Committed → Fix Released
Changed in unity-greeter:
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :

This introduced a major regression, see bug 783827.

Michael Terry (mterry) wrote :

This got backed out due to bug 915468.

Changed in unity-greeter (Ubuntu):
status: Fix Released → Triaged
Michael Terry (mterry) wrote :

This got fixed in the latest unity-greeter. Also, now that the indicator only shows the layouts the user has previously configured, instead of all possible layouts, I don't think there's any work for the design team to do, so I'll drop that task.

unity-greeter (0.2.1-0ubuntu1) precise; urgency=low

  * New upstream release
    - Fix session menu button not showing for first user
    - Skip indicators that fail to load
    - Distribute translations correctly
    - Load indicators from location specified in pkg-config
    - Use gsettings instead of /etc/lightdm/unity-greeter.conf
    - Accept numpad arrow key presses
    - Instead of showing all layouts in the system in the keyboard indicator,
      only show the layouts a user has configured
    - Don't crash if gnome-settings-daemon's gsettings schema isn't as expected
    - Disable gnome-settings-daemon's new gsdwacom plugin as well as its older
      wacom plugin
    - Use vala-0.16 instead of valac-0.14
  * debian/control:
    - Bump valac build-depend to valac-0.16
    - Bump liblightdm-gobject build-depend to one that has backported
      keyboard layout query functions

Changed in unity-greeter (Ubuntu):
status: Triaged → Fix Released
no longer affects: ayatana-design
Haggai Eran (haggai-eran) wrote :

Hi,

I tested the new version and it works great. I was wondering about something that is related though. Usually, each user also has a keyboard shortcut configured to switch layouts. I believe the default is Alt-Shift. This doesn't seem to work in greeter. Only changing the layout by pressing the indicator button works. Should I open a new bug regarding this?

Michael Terry (mterry) wrote :

Haggai, sure. Not sure how high the priority will be, but that would be nice integration.

Haggai Eran (haggai-eran) wrote :

I understand. I reported it in bug #932835.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints