Another Japan in the World

Jun Aruga's blog.

i3: Install & set up Japanese input environment

I installed and did set up Japanese input environment on i3 window manager on Fedora.

Here is the working log.

Install

Install the following packages at first.

$ sudo dnf install fcitx

$ sudo dnf install fcitx-configtool

$ sudo dnf install fcitx-anthy

Fcitx [1] is an input method framework.

$ rpm -q -i fcitx
...
Summary     : An input method framework
Description :
Fcitx is an input method framework with extension support. Currently it
supports Linux and Unix systems like FreeBSD.

Fcitx tries to provide a native feeling under all desktop as well as a light
weight core. You can easily customize it to fit your requirements.

fcitx-configtool is the Gtk based GUI config tool.

$ rpm -q -i fcitx-configtool
...
Summary     : Gtk+-based configuring tools for Fcitx
Description :
fcitx-config-gtk and fcitx-config-gtk3 are Gtk based configuring tools for
Fcitx.

fcitx-anthy is Anthy's wrappter for Fcitx.

$ rpm -q -i fcitx-anthy
...
Summary     : Anthy Engine for Fcitx
Description :
Fcitx-anthy is an Anthy engine wrapper for Fcitx. It provides a Japanese input
method. You can input hiragana and katakana by romaji or using a Japanese
keyboard. And fcitx-anthy also supports converting hiragana or katakana to
kanji.

Anthy is one of the Input Method (IM) engines for Japanese. Seeing ArchLinux's Localization/Japanese page [2] - Input methods, there are other engines, libkkc, Mozc, Skk. I found the libkkc and Skk's package too. Maybe if I install it, I can enable the engine too. This time I use fcitx-anthy.

$ dnf search fcitx | grep Japanese
fcitx-kkc.x86_64 : Japanese Kana Kanji Engine for Fcitx
fcitx-skk.x86_64 : Japanese SKK (Simple Kana Kanji) Engine for Fcitx
fcitx5-skk.x86_64 : Japanese SKK (Simple Kana Kanji) Engine for Fcitx5

Set up

I referred the document [3].

Add the following lines to .bash_profile in case of using Bash.

$ vi ~/.bash_profile
...
# Japanese input
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
...

Add the following lines to i3 config file.

$ vi ~/.config/i3/config
...
# Japanese input
exec --no-startup-id fcitx -d
...

Then logout i3 and login i3 again. You see the task icon on the right bottom. Mouse right click and left click "Toggle Virtual Keyboard" or Type "Ctrl + Space" to toggle it.

References