How to Install Japanese Keyboard on Arch (Hyprland + fcitx5 + Mozc)

So I recently needed to type in Japanese on my Arch Linux setup using Hyprland, and lemme tell you, it wasn’t exactly plug and play. But once I figured it out, it was actually kinda straightforward. Here's a full step-by-step of what I did to get fcitx5 + Mozc working for Japanese input.

TL;DR: Install fcitx5-mozc, set environment variables, add Mozc in the fcitx5 GUI, and don't forget to save hyprland.conf (yes, I forgot lol).

Step 1: Install the necessary packages

sudo pacman -S fcitx5-mozc fcitx5-configtool fcitx5-gtk

Step 2: Tell Hyprland to start fcitx5

nano ~/.config/hypr/hyprland.conf

Add this line (under existing exec-once entries or at the end):

exec-once = fcitx5 &

Don't be like me: I forgot to save the file before rebooting, so the fcitx5 doesn't load on startup. Be sure to press Ctrl+O, then Enter to save, and Ctrl+X to exit.

Step 3: Add environment variables

nano ~/.bashrc

Add these at the bottom:

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

Then reload it:

source ~/.bashrc

If you use zsh, put them in ~/.zshrc instead.

Step 4: Reboot (or log out and back in)

After saving everything, reboot or just log out and back into Hyprland. This should start fcitx5 automatically.

Step 5: Add Japanese (Mozc) in fcitx5

fcitx5-configtool

Final Thoughts

If you're using Arch with Hyprland and want to type Japanese, fcitx5 + mozc is solid. Let me know if you run into any issues!