record my way to ubuntu

Saturday, August 12, 2006

安装设置SCIM

本文中的设置是根据SCIM网站的wiki,加上我自己的设置所记录的。官方网址是:
http://www.scim-im.org/wiki/documentation/installation_and_configuration/ubuntu_kubuntu

Installation of scim on Ubuntu
先安装中文包
sudo apt-get install language-pack-zh
Make sure you have the universe repository enabled.
sudo apt-get install scim-gtk2-immodule
Then install the input method engines you plan to use.
sudo apt-get install scim-pinyin
System configuration
Environment variables
Create a file called 75custom-scim_init in /etc/X11/Xsession.d
Paste the following into it:
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim"
export XIM_PROGRAM="scim -d"
It is useless to export QT_IM_MODULE="scim" because the Qt-immodule patch is not applied in Ubuntu's Qt. Therefore, scim (or skim) interacts with KDE/Qt apps via XIM protocol.

Locale configuration
Please read the System configuration section to know which locale you should use. We strongly recommand you to choose a *.UTF-8 locale.
sudo dpkg-reconfigure locales
Select the locale you have chosen as default, it may be already.
Then edit the /etc/environment file. It must include the following:
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
**切记,这里不能是utf8
Where en_US.UTF-8 is to replace with the locale you have chosen.
The file must not define the LC_ALL variable !

If your locale is not en_US.UTF-8, you have to add it to scim supported unicode locales.
mkdir ~/.scim
echo '/SupportedUnicodeLocales = en_US.UTF-8,fr_FR.UTF-8' > ~/.scim/global
where fr_FR.UTF-8 is your locale.

Scim loading at start-up
Scim should be loaded when you start a Gtk application.
If you want it to be loaded automatically at start-up, go to System->Preferences->Sessions, choose Startup Programs, and add
scim -d
You can keep the order at 50.

OK,配置完成,重启X或者系统。

No comments:

Followers