Google
 

6/10/06

Setup Chinese Input for debian Sarge.

This will demonstrate my process to setup the Chinese input.
1. Setup the Xwindow system correctly.
2. Generate locale > dpkg-reconfigure locales
(if locales is not installed yet, use: apt-get install locales)
Select the following locales:
en_US.ISO-8859-1
en_US.UTF-8
zh_CN.GB2312
zh_CN.UTF-8
You can check what locales are installed in your computer by: locale -a
3. Install the required fonts.
> apt-get install ttf-arphic-bkai00mp ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp
ttf-arphic-gkai00mp
4. Install scim input method
> apt-get install scim scim-tables-zh
5. Make scim startup once xwindows is activate.
When Debian start the X windows, it will execute the shell script in /etc/X11/Xsession.d/. We can set up a script file and save it there. In this script file, we will define the variable "XMODIFIERS" and execute "scim" which is installed in the previous step. We call this script file as "95xinput" (save it in /etc/X11/Xsession.d/), and it contains the following:

case "$LANG" in
zh_TW*)
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
;;
zh_HK*)
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
;;
zh_CN*)
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
;;
esac
export XMODIFIERS

The above script will start "scim" when you login using Chinese as the system language.

6. If you are using GDM, you can choose "Chinese" as the system language. But if you are using xdm or kdm where you have no options to choose system language, you may need to add
" export LANG=zh_CN.UTF-8"
at the beginning of the above file (95input). This will choose the system language for you.
If you start the X window from a console, before you type in "startx" to start the X window system, you may want to "export LANG=zh_CN.UTF-8" first. Or you can put it in your ~/.bash_profile. Now scim should be activated automatically, and should be able to use. Part of this help comes from here

Here are some other good references.

Good poster http://www.linuxquestions.org/questions/showthread.php?t=262442
another one
This is a very sysmatic one.
and this

No comments: