Home Arch Linux How To Setup Japanese Language Environment In Arch Linux

How To Setup Japanese Language Environment In Arch Linux

By sk
Published: Last Updated on 16.1K views

In this tutorial, we will be discussing how to setup Japanese language environment in Arch Linux. In other Unix-like operating systems, it is not a big deal to setup Japanese layout. You can easily choose the Japanese keyboard layout from Settings. However, it is bit difficult under Arch Linux and there is no proper documentation in ArchWiki. If you're using Arch Linux and/or its derivatives like EndeavourOS, Manajaro Linux, follow this guide to use Japanese language in your Arch Linux and its derivatives systems.

Setup Japanese Language Environment In Arch Linux

First, install the necessary Japanese fonts for viewing Japanese ascii arts properly:

$ sudo pacman -S adobe-source-han-sans-jp-fonts otf-ipafont
$ yay -S ttf-monapo

If you don't have Yay installed already, refer this link.

Make sure you have commented out (add # to comment out) the following line in /etc/locale.gen file.

#ja_JP.UTF-8

Then, install iBus and ibus-anthy. For those wondering, iBus is Input method (IM) framework for Unix-like systems and ibus-anthy is the Japanese input method for iBus.

$ sudo pacman -S ibus ibus-anthy

Add the following lines in ~/.xprofile (If it doesn't exist, create one):

# Settings for Japanese input
export GTK_IM_MODULE='ibus'
export QT_IM_MODULE='ibus'
export XMODIFIERS=@im='ibus'

#Toolbar for anthy
ibus-daemon -drx

The ~/.xprofile file allows us to execute commands at the beginning of the X user session before the window manager is started.

Save and close the file. Restart your Arch Linux system to take effect the changes.

After logging in to your system, right click on the iBus icon in the task bar and choose Preferences. If it is not there, run the following command from Terminal to start IBus and open the preferences window.

$ ibus-setup

Choose Yes to start iBus. You will see a screen something like below. Click Ok to close it.

Now, you will see the iBus preferences window. Go to Input Method tab and click "Add" button.

Choose "Japanese" from the list:

And then, choose "Anthy" and click Add.

That's it. You will now see "Japanese - Anthy" in your Input Method section.

Then change the options for Japanese input as per your requirement in the Preferences section (Click Japanese - Anthy -> Preferences).

You can also edit the default shortcuts in the key bindings section. Once you made all changes, click Apply and OK. That's it. Choose the Japanese language from iBus icon in the task bar or press SUPER KEY+SPACE BAR to switch between Japanese and English languages (or any other default language in your system). You can change the keyboard shortcuts from IBus Preferences window.


Suggested read:


Resources:

You May Also Like

3 comments

Connor September 26, 2018 - 12:44 pm

Wow, thank you so much for leaving a clear guide with pictures. I’m usually able to figure out how to do most things on Arch with the Arch Wiki, but this one had me stumped. Now, everything works fantastically!

Reply
sk September 26, 2018 - 3:51 pm

Glad you find it useful.

Reply
Kentaro T Vadney May 27, 2020 - 11:44 am

I’m new to ArchLinux and was confused since I tried to use this setup using gnome. There’s a few other things to do for people who want to set up Japanese input for Gnome: https://github.com/ibus/ibus/issues/2018

I hope this helps anyone with similar issues!

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More