Setting Up Japanese Input Environment with Flatpak Fcitx5-mozc on Vanilla OS

 2025-01-19

 Vanilla OS

This article is the English translation of the Japanese article titled ‘Vanilla OSにFlatpakのFcitx5-mozcで日本語入力環境を整える’.


In this article, I will guide you through setting up a Japanese input environment on Vanilla OS using Fcitx5 and Fcitx5-Mozc. Vanilla OS is a distribution that aims to balance robust security with ease of use, making it immutable so that the host system cannot be modified. However, setting up Japanese input using Fcitx5-Mozc requires some trial and error, which is why I decided to write this article.

What is Vanilla OS?

Vanilla OS is an immutable distribution where the host system is fixed, preventing users and applications from making changes to it. It features atomic system updates, which help make the system stable and robust. However, the unchangeable root system means that flexibility, such as modifying settings or customizing applications, is limited. To address this limitation, the system utilizes virtual environments and universal package managers like Flatpak. Users can install and configure applications within these virtual environments, and the changes are reflected on the host system. The system supports not only its default virtual environment, VSO (Vanilla System Operator), but also other distributions such as Ubuntu, Fedora, and OpenSUSE.

Due to the immutable nature of the host system, configuring settings like Japanese input can be more difficult compared to other distributions. For example, when you open the default terminal in Vanilla OS, Black Box, you enter the VSO virtual environment. If you install Fcitx5 in this environment, it won’t be usable on the host system. This can leave users who want to enable Japanese input scratching their heads. In this article, we will walk through an easy way to set up a Japanese input environment on Vanilla OS.

Why Use Flatpak?

While the official Vanilla OS repository contains Fcitx5 and Fcitx5-Mozc that can be installed using ABRoot, there are two main reasons I chose to use Flatpak. First, the convenience of Flatpak is highly appealing. It allows you to install packages without affecting the host system, making it a perfect match for Vanilla OS. Second, as of January 2025, the official Mozc package has an issue where it causes input errors, making it unusable. This issue affects both Fcitx5 and IBus. Therefore, using Flatpak to install Mozc as the input engine is the most appropriate solution.

Installing Fcitx5 and Fcitx5-Mozc

First, let’s install Fcitx5 and Fcitx5-Mozc. Open Black Box and run the following command:

flatpak install org.fctix.Fcitx5 org.fcitx.Fcitx5.Addon.Mozc

If you are not comfortable using the command line, you can also install these packages via the GUI by using the Gnome Software Center.

Setting Up Fcitx5 to Start Automatically

Manually starting Fcitx5 every time the system boots can be a hassle, so let’s set it to start automatically. Run the following command to copy the Fcitx5 desktop file to the ~/.config/autostart directory:

cp ~/.local/share/flatpak/exports/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart

After copying the file, log out and log back in.

Switching to Japanese Input

Once you log in, Fcitx5 should be available automatically. You can switch to Japanese input by pressing Ctrl + Space. You should now be able to input Japanese.

fcitx5-mozc input

Conclusion

In this article, we set up a Japanese input environment using Fcitx5-Mozc via Flatpak. This method is simple and doesn’t affect the core system. Not only for Vanilla OS, but the Flatpak installation of Fcitx5 is a method that can be applied to other distributions as well. If Japanese input is easily available, more Japanese users might be encouraged to try Vanilla OS. I hope this article helps you set up your own Japanese input environment.