Home >System Tutorial >LINUX >Teach you how to set up a Japanese environment in Arch Linux
In this tutorial, we will discuss how to set up a Japanese environment in Arch Linux. In other Unix-like operating systems, setting up a Japanese layout is not a big deal. You can easily select Japanese keyboard layout from settings. However, it is a bit difficult under Arch Linux and there is no proper documentation in ArchWiki. If you are using Arch Linux and/or its derivatives such as Antergos, Manajaro Linux, please follow this guide to use Japanese in Arch Linux and its derivatives.
First, in order to view Japanese characters correctly, install the necessary Japanese fonts:
sudo pacman -S adobe-source-han-sans-jp-fonts otf-ipafont pacaur -S ttf-monapo
If you haven't installed pacaur yet, please see this link.
Make sure you comment out (add # comments) the following lines in /etc/locale.gen.
#ja_JP.UTF-8
Then, install iBus and ibus-anthy. For those wondering why, iBus is an input method (IM) framework for Unix-like systems, and ibus-anthy is a Japanese input method for iBus.
sudo pacman -S ibus ibus-anthy
Add the following lines in ~/.xprofile (create one if it does not exist):
# Settings for Japanese input export GTK_IM_MODULE='ibus' export QT_IM_MODULE='ibus' export XMODIFIERS=@im='ibus' #Toolbar for anthy ibus-daemon -drx
~/.xprofile allows us to execute commands at the beginning of the X user session but before the window manager is started.
Save and close the file. Restart your Arch Linux system for the changes to take effect.
After logging in to the system, right-click the iBus icon in the taskbar and select "Preferences". If not, run the following command from the terminal to start iBus and open the preferences window.
ibus-setup
Select “Yes” to start iBus. You will see a page like the one below. Click Ok to close it.
Now, you will see the iBus Preferences window. Go to the “Input Method” tab and click the “Add” button.
Select "Japanese" in the list:
That’s it. You will now see "Japanese - Anthy" in the input method bar:
Change the Japanese input method options in the preferences according to your needs (click "Japanese-Anthy" -> "Preferences").
You can also edit the default shortcut keys in the keyboard bindings. Once you've made all changes, click Apply and OK. That's it. Select Japanese from the iBus icon in the taskbar, or press the SUPER Spacebar (LCTT Annotation: The SUPER key is usually the Command or Window key) to switch between Japanese and English (or other default languages on the system). You can change keyboard shortcuts from the iBus Preferences window
.Now you know how to use Japanese in Arch Linux and its derivatives. If you find our guide useful, please support us by sharing it on your social and professional networks.
The above is the detailed content of Teach you how to set up a Japanese environment in Arch Linux. For more information, please follow other related articles on the PHP Chinese website!