Thursday, July 12, 2018

Chinese Input on Linux Mint

Linux is flexible enough to support users from around the world with various types of input method.

On Linux Mint there are 2 approach or framework for input methods. They are Fcitx and Ibus. These enable users to switch between typing Latin (e.g. a b c) and others like Chinese Pin Yin (e.g. 平 阔). To get a details on these frameworks there is a 2012 article "GNOME and input method integration". Language models are developed on top of any of these frameworks, depending on the target user devices.

Do you need to have both input method frameworks? The short answer is No. Only one is needed for the operating system being used. On Linux where users can change their Desktop Managers, then all the preferred input method framework should be installed.

Sunpinyin is a popular utility for chinese input on Linux that is available on Fcitx and Ibus.It is open source licensed with LGPLv2 and CDDL dual-licenses.

I choose the approach of Ibus since doing a apt-cache search yielded the following;

ibus-sunpinyin - sunpinyin engine for ibus
libsunpinyin-dev - Simplified Chinese Input Method from SUN (development)
libsunpinyin3-dbg - Simplified Chinese Input Method from SUN (debug)
libsunpinyin3v5 - Simplified Chinese Input Method from SUN (runtime)
sunpinyin-data - Statistical language model data from open-gram
fcitx-sunpinyin - fcitx wrapper for Sunpinyin IM engine
python-sunpinyin - Simplified Chinese Input Method from SUN (Python binding)
sunpinyin-utils - Simplified Chinese Input Method from SUN (utilities)
ucimf-sunpinyin - ucimf wrapper for Sunpinyin IM engine
xsunpinyin - Standalone XIM server for Sunpinyin

Ibus was first on the list.

I might have missed some steps as I did this over several weeks. There wasn't any rush and there were other chores that needed to get done.

Here are the steps taken.

Step 1: Install Sunpinyin

Open a command line terminal and type

sudo apt-get install ibus-sunpinyin sunpinyin-utils

Step 2: Install the language

At Menubar click Applications ->Settings ->Input Method

Choose Language tab then click Install/Remove Languages...
Click Add.
Choose Chines, China (UTF8), then click Install.

Back to the Language Settings window, click "Input method" tab. In Input method, choose "IBus".

In Language support, Simplified Chinese click the Install button. Follow the instructions.

Step 3: Load it.

Logout and log back in.

At the Menubar, appears the Input Method applet with the text "EN".

Click on "EN" and select "Simplified Chinese".

Open a text editor or web browser and try out typing in Chinese.


Note: If this disrupts special keys on the keyboard, try to setup and use fcitx, instead. You can only use either one at a time.

Blog Archive