Software & AppsOperating SystemLinux

Effortlessly Setting Up Chinese Pinyin Input on Ubuntu 22.04

Ubuntu 7

In this guide, we will walk you through the process of setting up Chinese Pinyin input on Ubuntu 22.04. We will cover two methods: using Intelligent Pinyin for IBus, which is the default option, and using Fcitx5, which is an alternative option. Both methods are straightforward and will provide you with Pinyin input support for simplified characters.

Quick Answer

To set up Chinese Pinyin input on Ubuntu 22.04, you can use the default option of Intelligent Pinyin for IBus or the alternative option of Fcitx5. Both methods are straightforward and provide Pinyin input support for simplified characters.

Method 1: Using Intelligent Pinyin for IBus

Step 1: Install Chinese Language Support

Open Settings and navigate to Region & Language. Click on Manage Installed Languages and then Install / Remove languages.

In the list that appears, select Chinese (Simplified). Make sure that Keyboard Input method system has Ibus selected. Click Apply and reboot your system.

Step 2: Add Chinese Input Source

After logging back in, reopen Settings and navigate to Keyboard. Click on the “+” sign under Input sources.

Select Chinese (China) and then Chinese (Intelligent Pinyin). This will add Intelligent Pinyin as an input source.

Method 2: Using Fcitx5

Step 1: Install Fcitx5 and Chinese Add-ons

Open Terminal and run the following command:

sudo apt install fcitx5 fcitx5-chinese-addons fcitx5-frontend-gtk3

This command installs Fcitx5, a flexible input method framework, along with Chinese add-ons and a GTK3 frontend.

Step 2: Configure Input Method

In Settings, navigate to Keyboard -> Input Source and remove Chinese Pinyin from the list.

Next, run im-config in Terminal. Follow the wizard and choose fcitx5 as the Input Method Engine (IME).

Step 3: Set Environment Variables

Run the following command in Terminal:

sudo vi /etc/environment

This will open the /etc/environment file in Vim, a text editor. Add the following environment variables:

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=ibus

These variables ensure that different types of applications use Fcitx5 as the input method.

Step 4: Add Fcitx5 to Startup Applications

Open Tweaks (install it by running sudo apt install gnome-tweaks if you haven’t already) and add Fcitx5 to Startup Applications. This ensures that Fcitx5 starts automatically when you boot your system.

Finally, reboot your system.

Step 5: Configure Fcitx5

After the system boots, you should see a keyboard icon in the system status bar. This is the Fcitx application. Click on it and choose “Configure” to add IME and change hotkeys.

Conclusion

Both methods should provide you with Pinyin input support for simplified characters. Method 1 uses the default Intelligent Pinyin for IBus, while Method 2 involves installing and configuring Fcitx5, which some users find more reliable. Choose the method that suits your preferences and needs.

Remember, it is recommended to use the vanilla Ubuntu 22.04 version for these instructions, as different versions may have varying compatibility and requirements. Happy typing!

Can I use these methods to set up Chinese Pinyin input on other versions of Ubuntu?

These methods are specifically tailored for Ubuntu 22.04. While they may work on other versions of Ubuntu, there could be differences in compatibility and requirements. It is recommended to use the vanilla Ubuntu 22.04 version for these instructions.

What is the difference between Intelligent Pinyin for IBus and Fcitx5?

Intelligent Pinyin for IBus is the default option for Chinese Pinyin input on Ubuntu. It is a simple and straightforward method to set up Pinyin input support. Fcitx5, on the other hand, is an alternative option that some users find more reliable. It is a flexible input method framework that provides additional features and customization options.

Do I need to install any additional software to use Intelligent Pinyin for IBus?

No, the Intelligent Pinyin for IBus method does not require any additional software installation. It is included by default in Ubuntu 22.04.

Will using Fcitx5 affect other input methods on my system?

Fcitx5 should not affect other input methods on your system. However, it is important to properly configure Fcitx5 and set the environment variables as mentioned in the guide to ensure that different types of applications use Fcitx5 as the input method.

Can I switch between Intelligent Pinyin for IBus and Fcitx5 after setting up one of them?

Yes, you can switch between the two methods. To switch from Intelligent Pinyin for IBus to Fcitx5, you would need to uninstall Intelligent Pinyin for IBus and follow the steps to install and configure Fcitx5. Similarly, to switch from Fcitx5 to Intelligent Pinyin for IBus, you would need to uninstall Fcitx5 and follow the steps to set up Intelligent Pinyin for IBus.

Leave a Comment

Your email address will not be published. Required fields are marked *