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 695723 - Keyboard indicator doesn't display the codename for current keyboard layout
Keyboard indicator doesn't display the codename for current keyboard layout
Status: RESOLVED NOTGNOME
Product: gnome-shell
Classification: Core
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-12 19:38 UTC by أحمد المحمودي (Ahmed El-Mahmoudy)
Modified: 2013-03-13 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description أحمد المحمودي (Ahmed El-Mahmoudy) 2013-03-12 19:38:55 UTC
Since I upgrade GNOME Shell from 3.4 to 3.6, the keyboard indicator is blank and doesn't display the codename for the active keyboard layout.

I have enabled english & arabic keyboard layouts. I have the following settings:

$ gsettings list-recursively org.gnome.desktop.input-sources
org.gnome.desktop.input-sources current uint32 0
org.gnome.desktop.input-sources show-all-sources true
org.gnome.desktop.input-sources sources [('xkb', 'xkb_layout')]
org.gnome.desktop.input-sources xkb-options @as []

I checked the code in /usr/share/gnome-shell/js/ui/status/keyboard.js, and I reached the '_inputSourcesChanged' method in 'InputSourceIndicator' class, the program does run the following code:


            let [type, id] = sources.get_child_value(i).deep_unpack();

            if (type == INPUT_SOURCE_TYPE_XKB) {
                [info.exists, info.displayName, info.shortName, , ] =
                    this._xkbInfo.get_layout_info(id);

I checked the 'id' variable, and its value was 'xkb_layout' (as per the settings).
Yet the output of the last statement { this._xkbInfo.get_layout_info(id) } is

[ false, null, null, , ]

Can anyone help with this issue ? I'm not sure if its a bug in GNOME Shell, or something wrong with my system or settings.

Note: I am running Ubuntu, and it has the old IBus (1.4.2), but I don't thing that this should matter since I am not using the 'ibus' input method.
Comment 1 Rui Matos 2013-03-13 08:53:05 UTC
Very likely to be a dupe of bug 694149. I'll try to do a gnome-desktop stable release with that patch today.

*** This bug has been marked as a duplicate of bug 694149 ***
Comment 2 أحمد المحمودي (Ahmed El-Mahmoudy) 2013-03-13 10:00:56 UTC
Hello,

  I had a look at dupes of bug 694149, and I found from bug 695113, that I done a mistake of setting the second string 'sources' key to the literal string 'xkb_layout' instead of the layout codename.
So, I changed the setting as follows:
$ gsettings get org.gnome.desktop.input-sources sources
[('xkb', 'us'), ('xkb', 'ara')]

Now, the keyboard indicator does show the different layouts, and defaults to the english 'en' layout. Yet, if I select the arabic layout, it doesn't actually change the layout, yet it does update the indicator to display 'ar' instead of 'en' (even though the active layout is arabic 'ar').

Also if I actually changed the layout using a hotkey, the keyboard indicator doesn't update to reflect the currently active layout.
Comment 3 أحمد المحمودي (Ahmed El-Mahmoudy) 2013-03-13 10:02:56 UTC
Also I tried setting 'show-all-sources' to false, yet the behaviour is still the same.
Comment 4 Rui Matos 2013-03-13 10:18:49 UTC
(In reply to comment #3)
> Also I tried setting 'show-all-sources' to false, yet the behaviour is still
> the same.

The bug should go away if you set that to false and the log out/in again.
Comment 5 أحمد المحمودي (Ahmed El-Mahmoudy) 2013-03-13 10:37:41 UTC
I did log out/in again, yet the bug didn't go away.
Comment 6 Rui Matos 2013-03-13 12:19:04 UTC
(In reply to comment #5)
> I did log out/in again, yet the bug didn't go away.

So what's the output of

$ gsettings list-recursively org.gnome.desktop.input-sources

after you login?
Comment 7 أحمد المحمودي (Ahmed El-Mahmoudy) 2013-03-13 12:29:14 UTC
$ gsettings list-recursively org.gnome.desktop.input-sources
org.gnome.desktop.input-sources current uint32 0
org.gnome.desktop.input-sources show-all-sources false
org.gnome.desktop.input-sources sources [('xkb', 'us'), ('xkb', 'ara')]
org.gnome.desktop.input-sources xkb-options @as []
Comment 8 Rui Matos 2013-03-13 13:08:37 UTC
Please attach the contents of either ~/.xsession-errors or ~/.cache/gdm/session.log (which exists on your system) _after_ you try to switch the input source using the gnome-shell panel menu.

Also, which keyboard shortcut are you using and how did you set it?
Comment 9 أحمد المحمودي (Ahmed El-Mahmoudy) 2013-03-13 13:27:04 UTC
Nothing happends on ~/.xsession-errors after attempting to switch the input source using the gnome-shell panel menu.

I don't have ~/.cache/gdm/session.log (I am using lightdm not gdm)

The keyboard shortcut is RightCtrl+RightShift configured using GNOME control center->Region & Language->Layouts->Options

Funny thing, is that I opened gnome-tweak-tool->Typing, and I found that Modifiers-only input sources switch set to: 'Alt Shift L', also I found that terminate (Ctrl+Alt+Backspace) is disabled, although I enabled it on GNOME control center !

Also pressing LeftAlt+LeftShift, doesn't change the layout, neither does it change the status of the keyboard indicator !
Comment 10 Rui Matos 2013-03-13 13:34:55 UTC
(In reply to comment #9)
> Nothing happends on ~/.xsession-errors after attempting to switch the input
> source using the gnome-shell panel menu.
> 
> I don't have ~/.cache/gdm/session.log (I am using lightdm not gdm)
> 
> The keyboard shortcut is RightCtrl+RightShift configured using GNOME control
> center->Region & Language->Layouts->Options

This doesn't exist in GNOME 3.6 . I suppose you're using something patched downstream in which case I can't help you much here.

> Funny thing, is that I opened gnome-tweak-tool->Typing, and I found that
> Modifiers-only input sources switch set to: 'Alt Shift L', also I found that
> terminate (Ctrl+Alt+Backspace) is disabled, although I enabled it on GNOME
> control center !

Again, the same problem.

> Also pressing LeftAlt+LeftShift, doesn't change the layout, neither does it
> change the status of the keyboard indicator !

Same, sorry. Please report it to your distro.