This page show you how to setup Chinese input on Linux.
Intelligent Input Bus (iBus) is a popular input system engine.
Install it like this:
sudo apt-get install ibus-googlepinyin
then, in terminal, type
ibus-daemon -d to start the process in background.
then, in the taskbar, you should see a new icon with a “i” on it. Click it, then choose 〖preferences〗, then in the tab 〖Input Method〗 , add a input method. Check other tab to see the keys to activate the input. (try not to change it now. After when you tested it's working, then you can change keys.)
now, close it. You should have Chinese input available.
try it. In terminal, type
gedit to launch a editor. Then press the hotkey to switch to Chines, then type something.
Gmail has pinyin input, and works very well. You just need to turn it on.
Emacs Chinese Input for Studying Chinese
sudo apt-get install ibus-sunpinyin
thanks to many Chinese friends on sina weibo.