Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It has been discussed several times. This question is just to get the latest answer from the experts.

Is it still impossible to get a keyboard layout indicator in the top panel in gnome shell?

My personal experience says, it is impossible. I can use keyboard layout indicator in gnome classic, ubuntu, xfce, lxde! But not in gnome shell.

Also, will it still be impossible to use it even after release of ubuntu 13.04?

For whatever it is worth, I think it is quite strange and sad that what can be done in practically every other DE can not be done in gnome.

share|improve this question
    
I would need more infrmation to precisely answer this: What type of indicator are you seeking? Do you want it to directly modify the layout? There are several extensions available, but if you can provide some more information hopefully I can get one of them working for you if it isn't already compatible with your g:s version. –  l300lvl Apr 17 '13 at 8:32
    
In gnome-fallback session, I get keyboard layout indicated as en1, en2 for two english layouts (normal and dvorak) I use. In gnome-shell, there is an empty space but no indication of what layout is being used. Also, I can change keyboard layout. Only, it is not displayed in the panel –  deshmukh Apr 17 '13 at 10:46

3 Answers 3

up vote 5 down vote accepted

If you mean something like this (Ubuntu 13.04 Gnome Remix):

keyboard indicator

The indication change when you switch layout with your selected keyboard switch combination.

I installed the AppIndicator extension (https://extensions.gnome.org/extension/615/appindicator-support/ ) and then, after the first change of keyboard layout, you have a keyboard-layout notification in the gnome notification zone. Open ubuntu tweaks, extensions, select AppIndicator options:

appindicator extension's settings

and be sure to select "show in panel" for the keyboard indicator.

Hope this helps, Romano

share|improve this answer
1  
perfect. Thanks!! –  deshmukh Oct 4 '13 at 11:30

So it would seem your actual problem is not with the indicator itself but with the panel label being broken/not being displayed. This problem has been present since at least 3.4 and I wrote a thorough comment discussing this before I understood your problem entirely. If I'm mistaken about the actual issue my apologies.

This is an image of what I think you expect to see: en1

(Note: the Login Screen link in the Region & Language panel lets you make the gdm login indicator functional as well)

To clarify, I have only tested this in 3.8. Here is what I did:

Install Icon Hider extension from: Icon Hider on e.g.o

Once installed open the icon hider preferences by refreshing the page you installed from or iirc from the menu entry. Now set the "keyboard" entry to On and you should see the blank space.

Next, since I only had one layout by default, and the menu showed I had 0, I decided to add one. Open the blank keyboard menu and launch "Region & Language Settings". If you have more than 1 layout already you should try removing all but your default/preferred language. WARNING: when you have only 1 enabled(3.8) the indicator automatically hides, so you should use the Icon Hider extension to hide/show it again as when you remove the 2nd it will hide. Then I added an alternate and finally the menu showed me an entry, as my default contained no pre-set layout so the menu showed no entry at all.

Now that I added 2 it showed the entries and I selected one.

The result was the image above. I do hope this works but I'm guessing ymmv depending on your g:s version.

Other information probably not of value if your issue is regarding the layout text/label:

Technically speaking, Gnome Shell should not be confused with Fallback, as G:S extensions do not work in fallback, but they will work in the new Classic mode which under 3.8 can be spawned by running:

`gnome-shell --replace --mode=classic`

But under < 3.6 the Fallback mode does not run extensions, it runs normal panel "applets". I had better luck with the Keyboard indicator under Fallback than I ever do with G:S as under G:S the icon is broken and has been since I think 3.4.

When you say it is not displayed in the panel, does that mean you see no icon but you can click the blank space where the icon should be and then use the menu properly? Or does that menu not let you change layouts and you use another method?

Or does it work in both G:S and Fallback, but no icon in either? If so we can probably find a means to get the icon working.

If it's that you don't see the indicator/menu with no icon, in G:S, than it's the matter of that indicator not being enabled in G:S. You have to use an extension like Icon Hider to get the extension to show.

If you want to try to get it running under G:S you can run the following, this is not permanent and will revert after logging out:

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.panel.statusArea.keyboard.actor.show();'
share|improve this answer
    
Well, I have three layouts set - two english and one Hindi. I can see the blank space. On clicking on it, I see only two options: (a) Show keyboard and (b) Region/ Lang. settings. I can switch languages using the keyboard combination. The behavior does not change even after installation of icon hider and removing and readding the layouts. In the fallback mode, I can see the layout in the panel and change it using keyboard. Lastly, the gdbus command returns (true, '') –  deshmukh Apr 19 '13 at 15:27
    
Did you readd the layouts using the Region & Language Settings panel or some other tool? If you have fallback mode, which is totally urelated to Gnome Shell, I assume you are using 3.6. It may be that this wasn't fixed until 3.8. –  l300lvl Apr 19 '13 at 16:09
    
I re-added the layouts keyboard and language settings option on the indicator. But it leads to keyboard layout menu in the settings. And yes, I am using 3.6. Will upgrade to 3.8 in Ubuntu 13.04, I suppose –  deshmukh Apr 19 '13 at 16:28
    
Sorry for the delay. I've been attempting to write an extension which would simply replace the blank space with a symbolic status icon but I'm not having much luck atm. It's not really a fix or anything though, though you should do your research when upgrading and be sure to backup anything important –  l300lvl Apr 20 '13 at 1:28

Annoyed by this as well, I wrote a simple systray Qt-program which can be found on GitHub: https://github.com/ssumpf/ktray

P.S.

In order to build it one may need to do:

sudo apt-get install qt4-qmake libqt4-dev libqt4-private-dev

And then it is possible to build it:

qmake
make
sudo copy ktray /usr/bin/ktray
sudo chmod 755 /usr/bin/ktray

Then launch it as

ktray

or

nohup ktray 2>/dev/null 1>/dev/null &
share|improve this answer
    
You should add the code and the instructions to use the code in this answer as well.. Then give the link to that Github repo... What if you rename your repository lateron? The link would become invalid and so as this answer. –  Aditya Nov 15 '13 at 6:17
    
Thanks @user215876. But the problem is solved as of 13.10. There is a label now in the bar at the top –  deshmukh Nov 18 '13 at 6:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.