第六章 安装输入法(xsim)
1.先下载 xsim-0.3.9.3源包和DB4包:
db-4.1.24.tar.gz xsim-0.3.9.3.tar.gz
放在/root/tmp下
分别解压
2.按照xsim自带的README.cn的说明安装DB4:
%cd db-dir/build_unix
%../dist/configure --enable-cxx --prefix=/usr/local
%make
%make install #maybe need be root
并找到编译出的 libdb_cxx-4.1.so 拷到/usr/lib/下:
cp /root/tmp/db-4.1.24/build_unix/.libs/libdb_cxx-4.1.so /usr/lib
3.apt-get install xlibs-dev libqt3-dev
4.有了前面三步,就不会编译报错了。按照README.cn的说明安装xsim:
./configure(不用加locale=GB2312,默认就是)
make
make install
make install-data
5.xsession文件:(如上)
6./usr/local/xsim/etc/xsimrc文件:
主要改三处一是 XIM_LOCALE;二和三是两处 FONT_NAME。参考如下:
# xsim config file
XIM_NAME "XSIM"
XIM_LOCALE "zh_CN"
XIM_EXT_LOCALE ""
#XIM_EXT_LOCALE "zh_TW,ja_JP,zh_CN.UTF-8"
ON_SPOT_ENABLED Yes
DICT_LOCAL /usr/local/xsim/dat
PLUGIN_LOCAL /usr/local/xsim/plugins
TRIGGER_KEY "ctrl space"
SWITCH_KEY "ctrl Shift_L"
SHOW_STATUS_PANEL Yes
# Refer to /usr/lib/X11/rgb.txt for details of colors
INPUT_PANEL "std"
FG_COLOR "black"
BG_COLOR "gray92"
SUFFIX_COLOR "blue"
CARET_COLOR "blue"
#FONT_NAME "AUTO"
FONT_NAME "-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-*,-*-simsun-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0"
# avliable status_panel "std" "kde2" "kde3"
STATUS_PANEL std
FG_COLOR "black"
BG_COLOR "gray92"
STATUS_COLOR "green"
#FONT_NAME "AUTO"
FONT_NAME "-adobe-helvetica-medium-r-normal--16-*-*-*-*-*-iso8859-*,-*-simsun-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0"
# input mothed should define at last
# can define up to 10
# by now, we got three
INPUT_METHOD "jianpin"
IM_DESC 简拼
CARE_H No
CARE_NG Yes
CHARDB chardb
WORDDB worddb
#maybe u need these key
#PREV_KEY "Page_Up"
#NEXT_KEY "Page_Down"
PREV_KEY "comma"
NEXT_KEY "period"
B2Q_KEY "shift space"
#<N> will be replaced by 1-9
WORDDELETE_KEY "ctrl N"
INPUT_METHOD "wubi"
IM_DESC 五笔
WORDDB worddb.wubi
#maybe u need these key
#PREV_KEY "Page_Up"
#NEXT_KEY "Page_Down"
PREV_KEY "comma"
NEXT_KEY "period"
B2Q_KEY "shift space"
NEW_WORD_KEY "ctrl Insert"
#<N> will be replaced by 1-9
WORDDELETE_KEY "ctrl N"
#INPUT_METHOD "table"
# IM_DESC 苍颉
# WORDDB worddb.cj
#maybe u need these key
#PREV_KEY "Page_Up"
#NEXT_KEY "Page_Down"
# PREV_KEY "comma"
# NEXT_KEY "period"