![]() ![]() |
|
| $ apt-get install xfonts-intl-chinese xfonts-base unifont |
Then, these four nice Chinese TrueType fonts donated by Arphic Tech.
|
$ apt-get install ttf-arphic-bkai00mp ttf-arphic-bsmi00lp $ apt-get install ttf-arphic-gbsn00lp ttf-arphic-gkai00mp |
Or you can use KDE font installer (optional)
| Control Center -> System Administration -> Font Installer |
| $ apt-get install chinput rxvt-ml |
You need special X terminal emulators, such as crxvt-big5 and crxvt-gb, to view and edit Chinese characters. These two X terminal emulators are included in the package rxvt-ml. But the commands to open them are crxvt-big5 and crxvt-gb respectively, not "rxvt-ml".
|
$ apt-get install locales localeconf $ dpkg-reconfigure locales |
Then, select the locale zh_CN.GB2312 (not necessarily to set it as default).
Now it is time to set your environment variables. The simplest way is to copy the following lines in your ~/.bashrc
|
export LANG=zh_CN.GB2312 export LC_ALL=zh_CN.GB2312 export XIM_PROGRAM=Chinput export XIM=Chinput export XMODIFIERS="@im=Chinput" |
You should be able to use chinput by now. However, other system information such as error messages will also be displayed in Chinese (or some strange square characters). If that is not what you wish to see, fine-tuning of the environment variables is required.
The following are copied from my ~/.bashrc
|
export LANGUAGE=POSIX export LANG=zh_CN.GB2312 export LC_CTYPE=zh_CN.GB2312 export LC_COLLATE=POSIX export LC_TIME=POSIX export LC_NUMERIC=POSIX export LC_MONETARY=POSIX export LC_MESSAGES=POSIX export LC_PAPER=POSIX export LC_NAME=POSIX export LC_ADDRESS=POSIX export LC_TELEPHONE=POSIX export LC_MEASUREMENT=POSIX export LC_IDENTIFICATION=POSIX export XIM_PROGRAM=Chinput export XIM=Chinput export XMODIFIERS="@im=Chinput" |
I have given a brief description to each variable here . For more detailed explanation on the environment variables, please refer to "Debian Reference" Section 9.7.5 Activating a particular locale.
Now test your locale setting using command locale, you should see the following
|
hostname:/home/username~$ locale LANG=zh_CN.GB2312 LC_CTYPE=zh_CN.GB2312 LC_NUMERIC=... |
Try
|
chinput & mozilla & chinput & gaim & chinput & crxvt -bg black -fg white & |
,


)
| Couldn't load /home/username/.pyinput/usrphrase.tab. Please fix it. size or load error |
I solved this problem by simply removing the entire ~/.pyinput directory. It is no longer needed for later version of chinput.