27th Aug2012
Author: Gyro

Keyboard Language Switcher Ubuntu Systray

I just installed another language to Ubuntu 12.04, and was a bit surprised not to find any icon in the systray (taskbar, top bar, notification area), also there was no shortcut I could find to make it change language.

In case you are trying to change the keyboard layout/language with a keyboard shortcut or setup the systray icon that looks like a keyboard to switch the language in the notificationa rea, then you've come to the right place :)


First, to setup the keyboard shortcut to change language in Ubuntu 12.04:

Either open a Terminal and type:
# setxkbmap -option grp:alt_shift_toggle "en,th"

en = English, th = Thai, so this would create the shortcut to switch between these two keyboard languages, you can also use more than just 2 keyboard languages to change

Another option is to edit /etc/default/keyboard
# sudo nano /etc/default/keyboard
and change it to something like this, where "alt_shift_toggle" could be any desired key combination to change the keyboard language in Ubuntu.

XKBMODEL="pc105"
XKBLAYOUT="us,th"
XKBVARIANT="altgr-intl"
XKBOPTIONS="grp:alt_shift_toggle"

And second, how to get the keyboard icon in the top bar in Ubuntu, so you can change the keyboard language by clicking on an icon the systray/notification area:

Open Terminal and type:
# ibus-daemon -x -r -d

That's it, keyboard icon should now be in the notification area. Click on it, it should show you the languages you have setup.

If you don't see the icon, you need to do this:
# gconftool --type boolean -s /desktop/ibus/panel/show_icon_on_systray true
# gconftool --type boolean -s /desktop/ibus/panel/show true
# gsettings set com.canonical.Unity.Panel systray-whitelist "[‘all']"
OR
Install Unsettings in Ubuntu with the following commands in terminal:
# sudo add-apt-repository ppa:diesch/testing
# sudo apt-get update
# sudo apt-get install unsettings
Open Unsettings and click on Panel tab. 1) Add "IBus" into Systray whitelist. Or, 2) replace everything with "all"

And maybe again:
# ibus-daemon -x -r -d

If you see the icon to change the keyboard language, but when clicking on it there is no language to choose from and it says: "Input Method Off", then you have just installed the language, but not setup the actual Keyboard Layout. Open the System Settings, click on Keyboard, then on Layout Settings in the Typing tab, and setup the Keyboard layout you need. Most likely the keyboard icon will also popup automatically in the systray, if it doesn't repeat the above steps…

Enjoy!

7751

Keep Me Going
Your Name / Website:
Did you like my post? Buy me a Bitcoffee! 14JX52Li7zTKbyQv2omw4tvu6Bi1KzfHNW



One Response to “Keyboard Language Switcher Ubuntu Systray”

  • Stenemo

    Thanks for the very good guide on how to do this! Although I am trying to install a new version of Dvorak (is not listed in Ubuntu and has to be installed), could you make a guide for that as well?

Leave a Reply

Your email address will not be published. Required fields are marked *

What is 2 + 8 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)