There are quite a few tutorials on getting hiragana characters on Ubuntu, but many of them seem rather complicated, and very few seem to mention Karmic at the time of writing (even though it’s been stable for a good few months now). I won’t guarantee that this will work for everyone with Ubuntu Karmic, so please back-up important data before attempting this. Oh, and if you don’t know what Karmic Koala is then you’re best leaving this tutorial alone!
- Install ibus-anthy - either type sudo apt-get install ibus-anthy at the command line, or install using Synaptic orUbuntu Software Centre
- Go to System > Administration > Language Support
- Select the option ibus for Keyboard input method system at the bottom (leave everything else as it is)
- Press the button: Install / Remove Languages…, scroll down to Japanese and select the options for Input Methods and Extra Fonts
- Reboot! (this ensures that the ibus daemon initiated itself properly).
- Go to System > Preferences > IBus Preferences
- Click the tab Input Method and click the arrow next to Select an input method and choose Japanese > Anthy (the one with the crown icon) and click the Add button
- Move Japanese - Anthy to the top of the list (by selecting it, and clicking Up if it’s not already at the top; I also had “English - ispell” in my list)
- You’re done!
Now you should be ready to go! So when you’re in hiragana mode, your romaji will be converted as you type, so typing “kanji” will give you “かんじ”. If you want the kanji, you can press space while it’s underlined to change it, and it will cycle through all possible combinations (or, in this case, to get 漢字).
If you press F7 and F6 while the text is underlined, then it will swap between katakana (F7) and hiragana (F6).
When you press return, the text will be set. Again, you can change the default behaviour, so that space or a full stop commit changes too.
Pressing Ctrl + Space a second time takes you back to the normal setting.
If you have a problem with the short-cuts, you may already have noticed that you can change them in the IBus Preferences window. I had a conflict with it using the same keyboard shortcut as auto-complete in Eclipse.