Japanese Text Entry in Linux Mint 17.1

📅 January 26, 2015
jp19a1Linux distributions offer superb multilingual support, and with it, we can communicate with others around the world using a wide assortment of languages that are easy to install.

Most English users, as well as many who speak other languages, have some form of the QWERTY keyboard, so what do you do when you wish to communicate by typing in a language that differs from your installed locale?

Linux supports input methods that allow you to type in your chosen language. The correct fonts also appear. As an example of what is possible, you can mix and match several languages within the same text file, enter non-locale text in a search engine, or compose an email to a faraway friend in his native tongue.

This updated article explains how to install support for the Japanese language on an English installation of Linux Mint 17.1 so we can type filenames, Internet searches, and compose emails from a QWERTY keyboard.

The process is similar for most Linux distributions, and any language can be installed. In this example, we are using Linux Mint 17.1 (Cinnamon) due to its excellent language support, and Japanese was chosen since its typed characters look nothing like English. When we see Japanese text, we will know for certain that everything is working properly.

Installing an alternate input method in Linux Mint 17.1 is not complicated, but it requires a number of steps. Here is a complete installation and usage tutorial with pictures.

Step 0: Linux

This article demonstrates with Linux Mint 17.1 with an English locale. The default language and keyboard layout is chosen during Linux installation. If you already have Linux installed with a different default language, there is no need to reinstall Linux.


Default language and locale chosen during Linux installation.

Here, I chose English (US) since that seems to be the most common. English (UK) or one of the others would also work. The different versions allow for nuances in the different varieties of English.

Step 1: Ensure Repository Support

You will need a working repository in order to install language files. Ensure that you can update Linux and install programs.

Step 2: Install Default Language Support

(This step can be skipped if all language packs already exist for your default language.)

Go to System Settings and open Languages (The blue icon with the EU symbol).


This is opens the Language Settings dialog.


On this dialog, we can install new languages and mange keyboard input methods.

The first thing we want to do is install language support for the default language. Click the Install / Remove Languages button located in the top half of the dialog. You will need to enter the root password because this makes system-level changes.

Surprisingly, a default installation of Linux Mint 17.1 might not have all language files installed.

    Even though English text functioned fine, my default installation showed all English language packs as partially missing.

Even though English text functioned fine as the system was usable, my default installation showed all English language packs as partially missing.

Notice text that reads, “Some language packs are missing.” We need to correct this now by install them. Since we chose English (US) as the default language, select it and then click the Install language packs button.

This is why we need a working repository. If one does not exist, then this message will appear:


A missing repository will produce this error message when attempting to install language packs.

After the language packs have installed, the green text will read, “Fully installed.”


All default English packs are now installed.

This is something that should be completed as part of a standard Linux installation whether on not you will use an additional language.

Step 3: Install the New Language

We install a new language similar to step 2. Click the Add… button to open the Add a New Language dialog.


So many languages to choose from!

This is where we can choose from a multitude of languages possible on Linux. There are many! Since this example demonstrates with Japanese, scroll down to find Japanese (or press “j” on the keyboard) and select the line that reads Japanese,Japan UTF-8 and click the Install button. You will return to the Install / Remove Languages dialog.

Did you notice that all English languages showed UTF-8? This is why we are choosing the UTF-8 version of Japanese. It has always worked well for me, so I never bothered with the EUC-JP version.

Back in the Install / Remove Languages dialog, scroll all the way to the bottom to find that Japanese has been added to the list. However, you cannot use it yet because its language pack is not installed.


Japanese appears in the list of available language present on the system, but we cannot type in Japanese yet.

Select the Japanese line and click the Install language packs button to install its language pack just like we did in Step 2 for English.

Once complete, the languages list will show that Japanese has been installed.


Japanese language packs are now installed on the system.

Close the dialog and return to the Language Settings dialog.

Step 4: Install an Input Method

Even though Japanese is available on the system, we cannot use it yet. Any typing will still be in English, not Japanese. We need a way to switch between languages in order to type in Japanese on the keyboard.

This is what an input method does, and we are going to install one now.

If you look at the Input method section located in the lower half of the Language Settings dialog you will see that Input method is blank with a list of five options below it labeled IBus, Fcitx, SCIM, UIM, and gcin.

Input method configuration is located in the lower half of the Language Settings.

Input method configuration is located in the lower half of the Language Settings.

These are various input methods and none of them are installed. We only need one. My personal favorite is the Intelligent Input Bus (IBus), and we will install that one. The others behave in a similar manner and offer their own features. For Japanese, IBus works well.

Click the Add support for IBus button to install it. Leave the others alone since they are not necessary uless you wish to experiement.

(After installation, consult man ibus for more IBus information.

Once installed, we should see green text below IBus that reads, “50 optional components available.”


IBus installed, but not the extras.

Let’s install them too, so click the Install the optional components button. Remember that language installation requires root privileges, so you will need to enter the root password to perform these steps.

When complete, IBus will be fully installed.


IBus fully installed.

Now, select IBus from the Input method dropdown menu.


A list of all installed input methods will appear in the dropdown menu. Only IBus is installed here. The input method chosen is the method used by the system.

We have Japanese installed. We now have an input method selected. But we are not finished yet! Attempting to type with Japanese text does nothing at this point.

Step 5: Log Out or Reboot

Yes, reboot. Actually, a simple log out and logging back in should work, but I tend to update the system at the same time, so a reboot ensures that all system updates are applied.

Step 6: Add Japanese – Anthy to the IBus List

When logged back in, look at the panel and there should be a new keyboard icon added.


Keyboard icon in the panel allows you to switch among installed keyboard input methods. Themes might alter the icon’s appearance.

If we click it now, we will see English – English (US).


Clicking the icon shows a list of the available input methods.

This is the IBus menu showing a list of languages available on the system from which to choose to type with. But Japanese is not present in the list even though we installed its language packs earlier. We need to add Japanese to the list.

Right-click the IBus keyboard icon and choose Preferences.


Mouse right-click, not left-click!

This opens the IBus Preferences dialog.


IBus configuration dialog.

Select the Input Method tab check Customize active input methods.


Here is where we add languages to the input method list.

The languages that appear here are the languages that will appear in the IBus menu from which to choose. Since English is the only language in the list, this is why only English appeared when we clicked the panel’s IBus icon.

Open the Select an input method dropdown list and choose Show all input methods.


To see all available languages, we must choose Show all input methods.

The list will close. Open the list again and scroll down until you find and highlight Japanese. Notice that a submenu appears with suboptions to choose from.



Anthy, Japanese, SKK, and more appear in the submenu. These are the various input methods for Japanese. Choose Anthy, a dictionary/utility input method that I find to be quite useful. Not perfect, but very convenient for Japanese typing.

If Anthy does not appear, then you might need to install it separately using the Software Manager.


Linux Mint 17.1 Software Manager showing the Anthy package already installed.

Back at the IBus Preferences dialog, we will see Anthy chosen. Click the Add button to add it to the list. We should see it added below English.


Japanese – Anthy is now an available input method.

Japanese – Anthy is added to the list, and we can now use Japanese. Close the dialog.

Now, if we click the IBus keyboard icon in the panel, we will see English and Japanese – Anthy from the menu.


Both languages now appear in the list.

Selecting Japanese – Anthy will switch the input method to Japanese text entry. By default, Ctrl + Space will also cycle through the input methods.

Step 7: Quick Test

At this point, Japanese text entry should be possible, so let’s test it. Open a text editor, and then choose Japanese – Anthy from the IBus keyboard icon. The IBus icon should change to show the Anthy icon to indicate that Japanese – Anthy is now active.


The icon will change to indicate the current input method.

Type the word “watashi” (without the quotes) in the text editor by typing the QWERTY keys w-a-t-a-s-h-i (without the dashes). You should see Hiragana characters underlined like this:


Entering Japanese text in gedit using a QWERTY keyboard.

If so, then all is good. If not, then Japanese text entry is not working properly. A reboot or log out might be required. Personally, I have never experienced any problems at this point, but you might want to check that the IBus service is running.

To do this, open Input Method from the Linux Mint menu (type input and it will appear). Do not confuse this with Keyboard Input Methods, which opens IBus Preferences.


Input Method Configuration will help set up the input method on your system in case of problems.


More Input Method Configuration.

From here you can choose which input method the system will use and it should start the daemon for you. Usually, if Japanese text entry is not working, I have found that the problem was usually because the IBus process was not running, so check that first. Or, try another input method, such as SCIM.

Step 8: Customize

At this point, your chosen language is fully functional, so any tweaks will be language-specific. In this case, there are two shortcuts we want to add to ease Japanese typing.

We want a way to quickly switch between Hiragana and Katakana (Japanese symbols that represent sounds) by using keyboard shortcuts. No such shortcuts exist yet, so switching between them requires the mouse and menus to select input modes from the Anthy menu, which can be interruptive when typing.


We can switch between Hiragana and Katakana using the IBus menu, but this means lifting the hands from the keyboard, which interrupts the flow of typing.

With the Japanese – Anthy input method active, left-click the Anthy icon in the panel and choose Preferences – Anthy.


When Japanese – Anthy input method is active, a different menu appears.

This opens a dialog specific to the current input language.

The IBus Anthy Setup dialog provides a wealth of customizations unique to Anthy.

The IBus Anthy Setup dialog provides a wealth of Anthy customizations.

We can also obtain the Anthy setup dialog by choosing Keyboard Input Methods from the Linux Mint menu.

This allows you to customize Japanese typing to a great level of detail. It’s well worth exploring to suit your tastes, but keep in mind that the preferences might be different for different languages. For now, we want to assign two keyboard shortcuts for Hiragana and Katakana in order to avoid using the mouse and menus.

Go to the Key Binding tab and select hiragana_mode.


Key Binding is where we set keyboard shortcuts that become active for the Japanese – Anthy input method.

Click Edit or double-click the selection to open the Edit Shortcut dialog.


Keyboard shortcuts are entered here.

Click the small button and enter a non-conflicting keyboard shortcut when prompted.


Enter whatever keyboard shortcut you prefer. Try to choose a unique shortcut to avoid conflicts.

Ctrl + h works well for me. We should see the updated dialog with the chosen keys.


Edit Shortcut will show the registered keys, but it will not be added as a shortcut yet.

Do not click OK yet. Click Add first! Click the Add button to add the shortcut to the list.


Ctrl+H added to the list. If you exit the dialog while the list is still blank, then the shortcut is discarded.

Once added, click OK to exit. If the shortcut does not appear in the list, then it will have no effect.

Back at the Setup-IBus-Anthy dialog on the Key Binding tab, we should see that the new shortcut has been assigned to hiragana_mode.


Ctrl+H shortcut associated with Hiragana mode.

Do the same to assign a shortcut to Katakana. For me, Ctrl+k works well.


Hiragana and Katakana both have shortcuts assigned to them for quicker switching.

With both shortcuts assigned, click Apply to apply the changes and then click OK to close the dialog.

It’s time to have fun!

Everything we need for Japanese text entry is alive and active. We are now ready to begin typing in Japanese on a QWERTY keyboard. The technical installation details were the simple part. At this point, a knowledge of the Japanese language itself is required in order to communicate in Japanese.


Typing in another language is similar to speaking the language. Now, you must learn your chosen language. In this example, we used Japanese, but it could be Korean, Mandarin, Thai, Spanish, French, or any other. The same rules apply.

All we did was install the software needed to type in an alternate language. Japanese – Anthy is not a translator that magically translates English into Japanese as you type. It only provides a means to enter Japanese text from an English QWERTY keyboard, so you will still need to know the language in order to use it.

Switching between languages

By default, Ctrl + Space switches through languages in the order they appear in the IBus language menu. To switch to Japanese, Anthy, press Ctrl + Space and the Anthy icon should appear in the panel. Press Ctrl + Space again to return to English.


Only one input method is active at a time, and the current method is indicated by the IBus icon in the panel.

If more languages are installed, then each press of Ctrl + Space will cycle through the list. You may have as many languages as you like, and if the Ctrl + Space is too time-consuming, you can always click the IBus icon in the panel with the mouse and choose a language from the menu.

The default shortcut can be changed in IBus Preferences.

Entering Text

This is what we have been waiting for! Let’s open a text editor. Here I am using gedit, but any other should work. Practically all programs I have used support any type of language, so there is no need to install special software that accommodates new languages.

Start by typing in English. Switch to the default English input mode, and type, “English.”


When the input method is set to English, text appears exactly as entered from the keyboard.

Entering Hiragana

Press Enter to start a new line, and this time, switch to Japanese – Anthy by pressing Ctrl + Space. Type “hiragana” using the QWERTY keys. Even though we have switched the input method to Japanese – Anthy, key locations remain the same. (H still maps to the h key, pressing A still maps to a, and so on.)


Typing “hiragana” converts to Japanese text as you type.

Underline Indicates the Current Word

Notice the underline when you type? Typing is performed by words. An underline indicates that whatever characters you type will be applied to form a single word. This is necessary because most Hiragana and Katakana (Kana) characters require two or three key presses (ASCII characters) to register a single Kana.

For example, to make か  (ka) appear, you must type a “k” and then an “a” on the keyboard. For the word ひらがな, it takes two key presses to form one Kana symbol. So, we type, hi ra ha na (no spaces) to produce ひらがな.

By default, Japanese words are entered as romaji. This requires that you know how to “spell” in Japanese using English keyboard characters.

While we can simply write ひらがな on paper by scribbling the characters directly, on a keyboard, we must type h-i-r-a-g-a-n-a and then press Enter to complete the word.


Enter completes a word and removes the underline.

Pressing Enter says, “I am finished typing this word. Let’s move on to another.”

New Line

Notice that pressing Enter makes finishes word entry and removes the underline. It does not begin a new line immediately like it did after we type the word “English.” You must press Enter twice in a row to move to a new line.

Press Enter now, and the cursor will move to a new line.


The cursor is now on the third line.

Switching to Katakana

We will enter Katakana text on this line, but if type now, we will be entering Hiragana characters: かたかな

This is not what we want. Recall the keyboard shortcuts we created? Press Ctrl + k (or whatever shortcut you chose) to switch to Katakana input mode. (You can also choose Katakana from the IBus menu.)

Now, type “katakana” on the keyboard to see the Katakana characters appear: カタカナ. Press Enter to complete the word.


English, Hiragana, and Katakana in the same text file.

Mixing Hiragana and Katakana Together

Good. Now, press Enter twice (once to complete the word entry and a second time to jump to a new line) to begin a new line. Switch back to Hiragana by pressing Ctrl + h, and type “sono” (that). We are going to write a simple “that cake” in Japanese.


その begins a new line.

Press Enter to complete the word その,  but do not move to a new line. Since the word for “cake” is usually written as ケーキusing Katakana, switch to Katakana mode and type the Japanese word for cake as k-e-HYPHEN-k-i. To produce the dash symbol, press the hyphen key on the keyboard.



Press Enter to complete the word, and we should see そのケーキ

This is how we combine the two Kana in one line.

Entering Kanji

Ah, Kanji. The 1,945 jouyou Kanji should keep you occupied, and you can type them all from the keyboard…and then some.

During the example above, you might have noticed a dropdown menu that appeared. Especially if you made a few mistakes. If not, then anytime you press the space bar while a Japanese word is underlined, you can view a list of Kanji suggestions.


Anthy provides a list of Kanji for words that are spelled alike using Kana. Choose the Kanji you intend.

The Japanese language is filled with homonyms, and this convenience feature allows you to select the appropriate Kanji.

To enter Kanji, you type in romaji as before, but before pressing Enter, press space (or use the arrow keys as a shortcut) to find the Kanji for the word you are typing. Let’s try this with the common word 私.

On a new line in the text editor, type “watashi” (oneself). You should see わたし in Hiragana.


We will change the Hiragana word わたし to its Kanji equivalent.

Do not complete the word yet. We want to use the Kanji for わたし,  which is 私. Press the space bar. A list of homonyms appears, with the most likely candidate selected by default.


Pressing space when the word is underlined will produce a list of possible Kanji. Press space repeatedly or use the Up/Down arrows to select the Kanji you want. The Kanji will replace the typed Kana.

When this Kanji appears in place of the typed Hiragana, press Enter to complete the word.

Practice Sentence

Let’s combine Hiragana, Katakana, and Kanji in one basic sentence by writing, “This is my cake.” complete with the period, called a maru ( 。) in Japanese. In romaji, we type “kore wa watashi no kēki desu.” (without the spaces) which will look like これは私のケーキです。


“This is my cake.” Combining Hiragana, Kanji, Katakana, a particle, and the maru in one sentence.

Here is a sequence of keyboard actions:


Type kore and press Enter


Type ha and press Enter.

This is the particle “wa,” but to type it, we must type “ha” because typing “wa” produces わ,  which is incorrect here. The same applies to the particle を for which we must type “wo,” not “o” lest we get the vowel お.

Be careful with particles. There might be a better way to enter them on a QWERTY keyboard, but I have yet to discover it. For now, type the sequence of characters that make the correct particle appear.


Type watashi, press space, and then press Enter. The same as before.


Type no, and press Enter.

Another particle showing possession in this case. We can type this one as it is.


Ctrl + k (switch to katakana), type ke-HYPHEN-ki, and then press Enter.


Ctrl + h (switch to Hiragana mode), type desu, type a period, and then press Enter.

A period produces the maru symbol (  。). The following illustration might help explain the text entry process better.


Japanese text is entered from a QWERTY keyboard as romaji. There are exceptions for some particles.

Another Practice Sentence

Are you having fun switching between input modes? Let’s try something trickier by using a longer sentence and combining English. We are going to write この本は面白そうでわありません。and on the same line, provide the English translation, “This book doesn’t look interesting.”

This is easier since it consists of hiragana with a few Kanji. The point to note is that to switch to English, press Ctrl + Space after the maru ( 。) and begin typing in English.


Japanese and English text together.


Keyboard entry in detail.

In case of typos, it’s usually fine to use backspace while entering Kana. Anthy is intelligent enough to work with the mistakes, but it’s not perfect. Sometimes, you might need to delete the entire word and begin anew.

“What can I do with this?”

Anything that accepts text entry, whether it be a text editor, filename, a terminal command prompt, filenames in a file manager, or search bars in web sites, for example, can receive Japanese text. You can even mix and match English and Japanese in the same text by switching input methods.

Here are a few examples.

Japanese Internet Search

Suppose you wish to browse a Japanese site, such as amazon.co.jp, and search for a product. In the Amazon search bar, you could enter 自転車 (jitensha = bicycle) to look for bicycles.


Entering Japanese text in the search bar on the Japanese version of the Amazon.com site.


Kanji characters are also allowed.

This allows you to search directly in Japanese by typing in Japanese. Entering English text might return unwanted results.

Search Engine

Perhaps you wish to search Google for Japanese movie dramas. Even though Google open with English (assuming you are connecting with an English-language user agent from an English-region IP address), once you enter something like 動画ドラマ (douga dorama = movie drama), Google will return Japanese links in Japanese text.


Searching by entering Japanese text.

Folders and Filenames

In a file manager, you can give new names to files and folders you create.


Folders and Files with Japanese names.

Here is a directory containing two subdirectories and two files. All were named by selecting Create New Folder and Create New Document from the Nemo context menu. Names were entered by switching to Japanese – Anthy and entering Katakana and Kanji.

Mixing English and Kanji in Paths

Did you notice the path in the location bar above? The directory is named 漢字 located in /tmp. The absolute path is /tmp/漢字, so we see a mix of English and Kanji. The is perfectly allowed. We must use this to access it in a terminal.


Bash showing Japanese text for filenames and folder names. We can type Japanese text at the command prompt.

This leads to more typing due to switching input methods, so one language is probably more convenient for paths.

Composing Emails

You can write emails in Japanese. While the subject and body may be any mix of English and Japanese text, the email addresses must be in ASCII.


Telling Mr. Ninja to stay away from my cake.

For those using email encryption, such as GPG and EnigMail, Japanese body text encrypts fine just like any other text. Keep in mind that the destination computer must contain Japanese language display support with the needed fonts. Sending Japanese text will not make it magically appear on your friend’s computer if his system only supports ASCII.

This should not be much of an issue with today’s modern systems, but if you receive a reply to the effect of, “I couldn’t read the email you sent because it showed numbers and other random garbage characters,” then missing fonts and Japanese support could be the reason.

However, if he cannot read Japanese and the Kana look like gibberish to him, then that is another matter entirely that no computer can resolve.


Unencrypted Kanji/Kana in email will look something like this in the email source. Notice the subject line. It contained Kana characters.


Similar message encrypted. This email message contains only Kana/Kanji, but the characters are encrypted like any other text. The subject line here is English only.

IBus and the Japanese language packs need not be installed on the recipient Linux systems due to excellent UTF-8 support in today’s Linux. In my tests, every Linux system that received a Japanese email was able to display the Kanji and Kana characters without IBus or the Japanese language pack present. However, composing emails does require IBus and the Japanese language pack.

Be Careful With Passwords

When Linux prompts you to log in or enter passwords, such as when using sudo, take note of which input method is currently selected. If you are in the wrong mode, then Linux will reject the login and password information entered. Use the input method you installed Linux with and all should be well. If you find yourself wondering why your password no longer works despite entering it properly several times in a row, then this could be the reason.


Some of us live almost exclusively in one language, so it is easy to ask, “Why bother learning how to install additional language support?” But when we find situations where we need to communicate with people from other countries via email, web sites, forums, or other message formats, then knowing how to type in the target language when limited to a QWERTY keyboard becomes vital.

Have fun, and learn a new language in the process!



Entering Japanese Text (or any other language) in Ubuntu 10.10 (Older article)

, , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: