HOWTO Configure SCIM to enable Chinese input

This howto details the steps required to enable Chinese input (Japanese, Arabic, and other languages) on a English (or other language) interface in #!CrunchBang Linux.

For details on installing applications and the terminal, see here.

Install Chinese fonts

In the terminal enter:

sudo apt-get install ttf-arphic-gbsn00lp ttf-arphic-gkai00mp ttf-arphic-bsmi00lp ttf-arphic-bkai00mp xfonts-wqy

To install the relevant fonts.

Install input method packages

In the terminal enter:

sudo apt-get install scim scim-pinyin scim-qtimm

To install Scim and scim-pinyin.

Create a custom SCIM startup

In the terminal enter:

sudo touch /etc/X11/Xsession.d/74custom-scim_startup

To create a file, then to modify the permissions for it:

sudo chmod 646 /etc/X11/Xsession.d/74custom-scim_startup

Then:

sudo echo 'export XMODIFIERS="@im=SCIM"' >> /etc/X11/Xsession.d/74custom-scim_startup
sudo echo 'export GTK_IM_MODULE="xim"' >> /etc/X11/Xsession.d/74custom-scim_startup
sudo chmod 644 /etc/X11/Xsession.d/74custom-scim_startup

Edit /etc/profile

In the terminal enter:

sudo nano /etc/scim/global

and check the line:

SupportedUnicodeLocales 

if:

SupportedUnicodeLocales = en_US.UTF-8 

then in the terminal enter:

sudo echo 'export LANG="en_US.UTF-8"' >> /etc/profile

To start SCIM at login

In the terminal enter:

echo 'scim -d' >> ~/.config/openbox/autostart.sh

or see this page on autostarting applications.

To enable switch between English and Chinese input mode

In the terminal enter:

locale | grep LANG=

The answer would be something like

LANG=en_US.UTF-8

Type in the terminal:

im-switch -z YOUR_LOCALE -s scim # replace "YOUR_LOCALE" by something like "en_US.UTF-8"

To enable modifications

Log off or reboot the computer for the modifications to take hold. Log back into the newly-configured user account. Note the keyboard icon that appears in the system tray.

Right-click on it to access the SCIM Setup menu and configured as preferred.

Open up Firefox. Hit Control+Space to toggle scim on/off.

Notes

Evidence of this howto is working : 谢谢

Links

 
howto_configure_scim.txt · Last modified: 2010/01/23 04:58 by puttiz
 

Copyright © 2010 CrunchBang Linux. Some rights reserved.