- Go to System Settings–> Language Support–> Install/Remove Languages, select Chinese(Simplified)
- Open the terminal and install the IBus framework with following command:
sudo apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4
- Start the IBus framework. In terminal input:
im-config -s ibus
- Install the Pinyin engine
sudo apt-get install ibus-pinyin
- Restart IBus daemon
ibus restart
- Setting the IBus
ibus-setup
In the popup window, switch to Input Method tab,click the Add button to choose the Chinese input method installed just now.
- Go to the Text Entry (from the right-top corner of the window or from the System Settings -> Text Entry) for the shortcut of input method exchange.
Side note: I came across the following error in this step:
Failed to download package files Check your Internet connection.
For solving it, I did the following:
Press Alt+F2 and type software-properties-gtk.
Change the download location to Main Server or another server close to the country you live in (in my case, it’s already server for Canada by default, so I changed it to Main Server) and do the first step again. Succeed!
After trying above method, I found the chinese input is different from what I get used to use. I decided to install google pinyin. The steps are as follows:
sudo apt-get install fcitx-googlepinyin
im-config
In the windows, click “OK”, then “Yes”, and select fcitx. Click “OK” to confirm and then “OK” to exit.
Now log-out and log-in back. You should see a Keyboard on the top right corner (the task bar of ubuntu in the top).
Click on it you’ll see from the drop-down menu an option ConfigureFcitx . Click on it opening up a panel, where in the Input Method, click the little + button in the bottom to add the method you like. After exploring a bit, I found Sunpinyin is more comfortable for me.
For more details, refer to this post from askubuntu.