It’s not a secret that I’m interested in japanese language, even if I’ve stopped learning it, because of too less for it. I’m still (more or less) able to read & type Hiragana and Katakana. On the Mac, it was pretty easy to enable the support for those input types, because it was built in.
On my Linux workstation, I’ve installed Xubuntu 13.04. To add the option to type in Japanese, I use the IBus input method. It’s handy and honestly a bit irritating, but here’s how to install it.
First of all – IBus should be pre-installed, if not, simply install the package ibus.
For japanese, we need to install another package:
$ sudo apt-get install ibus-anthy
That was the easy part To configure IBus, we should be sure that it does not run in the background, so we kill it, if we have a running IBus process.
To check if such a process runs, we gonna use ps and grep for ibus-daemon.
$ ps axu | grep ibus-daemon | grep -v grep
dennis 2587 0.0 0.1 278832 6316 ? Sl 07:10 0:13 /usr/bin/ibus-daemon --xim
The first result line shows the ibus-daemon running in the background with the parameter –xim. By the way: if we don’t use the | grep -v grep at the end, we will get a second line which shows the grepping itself.
To kill the process, we do it a bit radical with this option:
The 2587 is the PID (process id) of the ibus-daemon, you should be sure that this is indeed the correct process, otherwise you will kill maybe an important process, even if you’re not the root-user in this example.
Now that the process is killed, we want to launch it again. I would recommend to press Alt+F2 (for example on Xubuntu or Ubuntu) and simply launch ibus-daemon or you can do this right from the terminal by putting the process into the memory and return to your shell by attaching the & sign to the end of the command.
This could create some annoying output in your terminal, even if you’ve backgrounded the process! You can close your terminal and reopen it, however, launching it with Alt+F2 (or maybe using DMenu) is faster
In your menu, you will now have the IBus icon, which is an i on a white ground. Click it and select the settings (German here, but I’m sure you’ll find the settings).
A new window pops up, select the second tab for input settings. Please ignore Ctrl+S in the field shown here. This DOES NOT work! But more on this a bit later.
Once you’ve reached the right tab, you should be able to select the “Japanese -> Anthy” method. I’ve played with the mozc input method, but Anthy seems to be the better one
Next, add this method to the list below and close the settings windows. I would recommend to restart IBus as shown above if the “Japanese” entry does not appear instantly.
Working with IBus-Anthy is easy – if you know the shortcuts.. I’ve spend quiet a bit of time to find them in the settings menu until it worked as expected. Open a GUI editor like mousepad, gedit etc. so you can try to type in japanese.
Once you’re inside your editor, you are able to use IBus, this only works if you are able to enter something – what makes sense in my mind!
Press Ctrl+Space to activate IBUs-Anthy and type “ohayou”. It should print “おはよう”, underlined. While you type, the latin characters will be live translated into Hiragana, which is fine for this particular word. While you type and it’s still underlined, there will possibly pop down a windows with options to choose from; those are the same (or similar words but in Hiragana, Katakana, Kanji and mixed with Kanji). To use them – you should at least know a bit about these signs and the differences ).
However, if you’ve written the word anime “あにめ” in Hiragana, that’s wrong – it should be in Katakana, but as long as it’s underlined, you can switch the complete word to Katanaka by pressing the F7 key: “アニメ” will appear, press F6 if you want to switch it back to Hiragana. After each word, you should press Enter! This is pretty normal in japanese input systems, because in japanese language, you don’t have a space between words (what makes it pretty hard for bloody beginners like myself ).
But what if you want to type directly in Katanaka and want to switch to latin quickly, for example if you want to type the word “Linux” which will (as far as I know) also appear in latin letters also in japanese?
To enable IBus, we had hit Ctrl+Space, to disable, you simply hit Ctrl+Space again. But if you want to circle through the different input methods, you can do this by pressing Ctrl+, (comma) once IBus is enabled. There is also a latin input method in the japanese language, called Romaji. This is NOT the same as your regular latin letters, because the space between the letters is (even if not always and this depends on the used font as well) smaller. You will also notice “half width” and “full width” in Katakana and also in Romaji. If you want to type 100% perfect japanese, I’m sure Romaji is the better option, but better ask a native japanese writer.
IBus features do not stop here, but this is more about the basics. In the settings, you can enable “Show language panel” to “When active” and a little popup appears if you’ve IBus enabled. This will show you a lot other options and also give you the option to switch between the input methods by mouse clicks. The popup looks like this:
I hope this is useful for my readers. I’ve spent a lot time with a lot of different input methods, namely SCIM, mocz and of course IBus, but here on my Xubuntu, IBus + Anthy works best