sudo dpkg-reconfigure locales选择生成en_US.UTF-8, zh_CN.UTF-8, zh_CN.GBK,默认locale选在en_US_UTF-8
新装的系统得安装输入法。以前一直用scim-pinyin,这次打算换scim-python。Google真是好人,呵呵。
首先当然是从scim-python的google code主页下载scim-python的源码。
http://scim-python.googlecode.com
新系统安装essential包
sudo aptitude install build-essential
scim-python依赖一些包,需要提前装上。
- dependences:
gcc这里scim-python的作者们少写了一个python(>=2.5),这个包对我使用的Debian stable而言比较痛苦。。。
gettext-devel
scim-devel
python-devel
pygtk2-devel
python-enchant
sudo aptitude install python2.5 gettext-devel scim-devel python2.5-devel pygtk2-devel python-enchant
etch源中的python-enchant是针对python2.4的,需要在安装之后拷贝给python2.5
cd /usr/lib
sudo cp -a python2.4/site-packages/enchant python2.5/site-packages/
安装Debian打包需要的软件
sudo aptitude install dpkg-dev autoconf automake dh-make fakeroot
设置deb包
tar xzvf scim-python-0.1.13rc1.tar.gz这里选择single binary
cd scim-python-0.1.13rc1
dh_make -f ../scim-python-0.1.13rc1.tar.gz
现在就可以开始打包scim-python了
dpkg-buildpackage -rfakeroot此时在上级目录会生成scim-python_0.1.13rc1-1_i386.deb,大概39MB大小
fakeroot debian/rules binary
现在开始安装scim-python
scim-python作为scim的language binding,工作在scim之上的,所以需要安装相应的包
sudo aptitude install scim im-switch scim-gtk2-immodule scim-module-socket
sudo dpkg -i scim-python_0.1.13rc1-1_i386.deb
编辑/etc/X11/Xsession.d/95xinput
export XMODIFIERS=@im=SCIM
export XIM=scim
export XIM_PROGRAM=scim
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
scim -d
重启X,ctrl+space调出scim,选择chinese->python pin yin,OK。
遗留问题:
1.scim-setup无法运行,因为scim-python使用的python2.5,而Debian etch中python-gtk2只有对python2.4的支持,在运行/usr/share/scim-python/setupui/__init__.py line 27
import gtk时报错,暂未找到解决办法。。。不想因为这个升级gtk....
No comments:
Post a Comment