This is a follow-up of the former articles "Writing japanese with Ubuntu 12.04 Precise Pangolin" and "Writing japanese with Ubuntu 10.04 Lucid Lynx".
If you are using Ubuntu 16.04, you can use my respective guide Writing Japanese with Ubuntu 16.04 LTS Xenial Xerus.
When comparing to Ubuntu 12.04, the Japanese input is now a lot easier to install and better integrated into the interface. Additionally you now have the choice between two input methods. I will guide you through both and you can then choose for yourself which you like more.
But first things first for people who haven't typed Japanese in Linux before: The input-methods that are available in Ubuntu 14.04 are Anthy and Mozc. There are others but those are practically the standard ones today and work very well while having all the features you will probably ever need. Anthy has been around for several years and is used as the default in Japanese installations of Ubuntu. However, nowadays there is also Mozc around, which is besically the open-source-version of Google's IME and is in my personal opinion superior because from my experience it gives better results in the candidates list and also has symbols built-in (e.g. ☎). First I will show you the installation and setup of Anthy and after that how to install Mozc.
Anthy
- Because Anthy is not installed with the base-system, you have to install the Japanese language support first. Otherwise Anthy won't be available as input-method in the Text Entry settings. Additionally this will install some nice Japanese fonts and Japanese translations for Ubuntu if you ever want to use your System in Japanese. So let's begin by opening the System Settings and then the Language Support.

- In the Language Support-window, click on "Install / Remove Languages...".

- Scroll down or type "J" and check the checkbox next to Japanese in the "Installed"-column. After this, click on "Apply Changes".

- Next you have to enter your password.

- The necessary packages will now be downloaded and installed. Nothingto do in this step. :-)

- After the Japanese language support is installed, you have to logout. For Anthy to show up in the list of input-methods, the session needs to be restarted. This is really kind of annoying but there's nothing you can do about that at this point. :-(
- Once you did a logout / login-cycle, reopen the System Settings and this time click on Text Entry.

- In the "Text Entry"-window, click on the small Plus-sign at the bottom of "Input sources to use".

- Select the entry "Japanese (Anthy)" from the list and click on "Add".

- "Japanese (Anthy)" should now show up inside the "Text Entry"-window and Anthy should be available in menu-bar's menu. You probably want to change the setting "Use the same source for all windows" to "Allow different sources for each window" and switch to "New windows use the default source". Also you want to reassign the key to switch to the next input source eventually. I normally use the "Pause"-key to toggle between languages.


- Now fire up some text-editor and try it by clicking on "Anthy" in the menu bar and type some japanese. Switching between candidates is done by pressing the spacebar and katakana-conversion is done by pressing F7.

That's it for Anthy. If you want to add Symbols (e.g. the aforementioned ☎) and want to know more about Anthy, you can head over to my article "Some Secrets of IBus / Anthy".
OK, next is Mozc.
Mozc
- To install Mozc, you have to open a terminal by pressing Ctrl+Alt+T and enter "sudo apt-get -y install ibus-mozc".
moritz@master:~$ sudo apt-get -y install ibus-mozc
- After you installed the package, you have to logout. Otherwise Mozc won't show up in the available input-sources.
- Once you did a logout / login-cycle, open the System Settings and click on Text Entry.

- In the "Text Entry"-window, click on the small Plus-sign at the bottom of "Input sources to use".

- Select the entry "Japanese (Mozc)" from the list and click on "Add".

- "Japanese (Mozc)" should now show up inside the "Text Entry"-window and Mozc should be available in menu-bar's menu. You probably want to change the setting "Use the same source for all windows" to "Allow different sources for each window" and switch to "New windows use the default source". Also you want to reassign the key to switch to the next input source eventually. I normally use the "Pause"-key to toggle between languages.


- Now fire up some text-editor and try it by clicking on "Mozc" in the menu bar and type some japanese. Switching between candidates is done by pressing the spacebar and katakana-conversion is done by pressing F7.

I hope, this article answered all your first questions regarding Japanese input in Ubuntu.
If this article was useful to you, you might also be interested in my (short) list of extremely useful Japanese software and websites and how to type specific symbols and radicals in Mocz / Google’s Japanese IME.
I tried this, but neither anthy or mozc shows up as an option for when trying to add Japanese in “Text Entry”. Anthy worked fine for the last several releases. I upgraded to 14.04 and lost Japanese support. I’ve tried removing and re-adding Japanese in the “Language Support”. I’ve logged out and back in. No luck.
If you upgraded from a previous release and took over your old settings, I recommend to open a terminal and enter
dconf reset -f /desktop/ibus/
to reset the old ibus-configuration. Eventually a re-login could be necessary.
Thank you for detailed instructions. Unfortunately, I encounter the same problem as Andy – neither mozc, nor Anthy are among Text Entry input sources. I used Anthy in 13.10 without any problems but it just stopped working after upgrading to 14.04 :-/
“dconf reset -f /desktop/ibus/” didn’t solve the problem.
The options were available when running Gnome-Shell instead of Unity when I ran into this problem and I added them there. Later on I reset the old ibus configuration in dconf and now it’s working fine for me in Unity as well. It could be that I also deleted some other ibus-related config-files though…
I finally solved it. Somehow…
I usually use Gnome Classic which, as I explained, has Text Entry which does not allow to add mozc. However, if I go to iBus preferences, I can add mozc in the “Input Method” tab. It then shows up in iBus menu and when I select it, I can write in Japanese. Half a problem solved. Another half is that I couldn’t assign a hotkey to switch between English keyboard and mozc because hotkeys are set only for input methods selected in Text Entry but not for iBus. So what I did is to log into Gnome (non-classic). There I couldn’t find Text Entry. Instead there was another keyboard settings window and, surprise surprise, there I could add mozc. This way I could use ctr+alt or another hotkey to switch between input methods. When I logged back to Gnome Classic, the changes I made remained and everything now works fine. However, Text Entry still doesn’t show mozc so I don’t know how it works… but it works. :-)
Hi!
I had the same problem, but I solved it!
I was not able to add the Anthy text entry in Ubuntu 14.04 using Gnome Fallback. Then I switch to Gnome Shell and I add it. Finally I switch back to Gnome Fallback and I can use it now.
まったね!
Bless you! I searched a long while before finding your explanation, which is crystal-clear. It all works. ありがとう!
Separate question: I notice that some of the keys on my JIS keyboard OADG 109A don’t match up with the Anthy / Mozc layout. For example, the @ symbol is printed on one of the lefthand upper keys on OADG 109A, but to type it with Anthy or Mozc, I need to type Shift and the numeral 2 key. Is there a simple way to edit the keys?
I don’t know if this solves your problem but you can try to open the IBus preferences (type “ibus-setup” in a terminal), go to the Advanced-tab and toggle the “Use system keyboard layout”-checkbox. This setting needs a re-login if I remember correctly.
Thanks for this perfect recipe.
I think the Japanese translation page would be appreciated by many ubuntu users in Japan. Did you put such a page anywhere ?
Anyway, 感謝、多謝、深謝です
ありがとうございます! This was really helpful!
どうもありがとう!:D
ありがとう
Something basic…What do you mean by “Open terminal”? Thank you!
It means to start the program called “Terminal” (端末). You can start it either by pressing Ctrl+Alt+T or by running it through the Dash (Ubuntu’s start menu).
Further information can be found at https://help.ubuntu.com/community/UsingTheTerminal
Kind regards,
Moritz
簡単に出来ました。助かります。ありがとうございました。
ありがとうございました!!一人で無理でしたが、これをよんだあと、ちゃんとインストール出来ました!:)
It works perfectly. Thank you very much.
Thanks! This was a great help in getting me setup with Japanese.
One thing to note, you don’t need to log out if you restart ibus.
$ibus restart
あああ〜
すごいです。
ありがとうございました。^_^
Do you know how to interact with Anthy and Mozc via the command line? I’m a grad student in natural language processing and would like use these standard IME as baseline for experiments in building IME, but I cannot for the life of me figure out how to interact with these in a fashion that can be automated.
Thank you.
ありがとう。
それはいいです!
Whats the difference between Anthy and Mozc???
Thank you very much.
We don’t use this DE by default on Ubuntu anymore. Please update the guide.
Thanks, it was very helpful.
Thanks! I got in first try. It works perfectly!
Hi, I have tried all the methods above, but it didn’t work. Are there any other methods. I’m using Zorin OS 9.
I am running Ubuntu 16.04 Xeniel in TEXT mode i want to install Japanese fonts support please let me know how can i install
Regards,
Mansur
mansurali901@gmail.com