Japanese input in linux with Fcitx-Mozc

  1. Install fcitx-mozc

  2. Create .pam_environment file in your home directory with the following contents:

XMODIFIERS=@im=fcitx
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
DefaultIMModule=fcitx
  1. Run fcitx-autostart in terminal. Re-login. Press Ctrl+Shift in text editor. Japanese input should become available. Pressing Ctrl+Shift should switch you back to your default language input. No need to add kbd layouts.

PS: if using KDE, add input method plasmoid to the panel.


further reading:

  1. xsession
  2. X Window Manager
  3. X Window System Protocols and Architecture
  4. Difference between .xinitrc, .xsession and .xsessionrc

sources:

  1. openminded’s post on Manjaro Forum