[建议]Hardy纯英文系统中文输入两步到位

系统字体配置、中文显示和输入法问题
回复
头像
Mr.J
帖子: 204
注册时间: 2008-07-14 16:58

[建议]Hardy纯英文系统中文输入两步到位

#1

帖子 Mr.J » 2008-07-15 23:40

有些人喜欢用纯英文系统,简洁不用安装一堆的亚洲字库和汉字支持。由于ubuntu出色的国际化支持,即使是纯英文安装下来的系统,也能正确的显示和处理汉字。

Xubuntu8.04纯英文环境下,加入汉字输入只需两步。英文默认安装下有我们熟悉的scim,只是缺少输入法引擎,我从scim官网上拽下拼音模块的源码,编译安装即可。从目前的使用情况来看,相当不错,应当优于中文环境下的稳定性。

第一步:得到输入法模块
我这里提供8.04最新x86-64系统拼音的安装包,
sudo pdkg -i scim-pinyin_0.5.91-1_amd64.deb

其它环境需要自己编译(SF访问不佳)或者从源上获取

第二步:为Openoffice和Qt等特殊程序设置XIM
# scim
export XMODIFIERS=@im=SCIM #case matters for this variable!
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
可以放在.bashrc文件里。最好重启X(登出,登入),

我的环境是Xubuntu8.04.1纯英文安装,此步骤应该也完美适用于其它版本Ubuntu。
(Optional Step)可选将scim放到autostarted apps里面,并且设置scim在程序间共享。

好啦,输入法从此不再是问题了!
头像
QuITh
帖子: 85
注册时间: 2007-11-27 15:46
来自: USTC
联系:

Minimal install xfce4?

#2

帖子 QuITh » 2008-07-16 12:37

I install Debian GNU/Linux Lenny Beta2,

CD-ROM: [Debian GNU/Linux testing Lenny - Official Beta i386 CD Binary-1 20080616-10:19]

and while tasksel, Select and install software, I choose NONE.

To see how I install the base system, click HERE. And go to section *The file lenny*.

Then after reboot,

代码: 全选

 # nano /etc/apt/sources.list
<example>
My sources.list file:
</example>
<example><quote>
# deb cdrom:[Debian GNU/Linux testing Lenny - Official Beta i386 CD Binary-1 20080616-10:19]/ lenny main

# deb cdrom:[Debian GNU/Linux testing Lenny - Official Beta i386 CD Binary-1 20080616-10:19]/ lenny main

deb http://debian.cn99.com/debian/ lenny main non-free contrib
deb-src http://debian.cn99.com/debian/ lenny main non-free contrib

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
</quote></example>

代码: 全选

    # aptitude update

    # aptitude upgrade

    # aptitude install x-window-system xfce4 menu
    The package *menu* is for Debian Menu, optional.

    # reboot

代码: 全选

    # aptitude install scim scim-gtk2-immodule scim-pinyin scim-qtimm

    # nano /etc/X11/Xsession.d/95xinput

<quote>
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
export XMODIFIERS
</quote>

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

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

    # echo 'export XMODIFIERS="@im=SCIM"' >> /etc/X11/Xsession.d/74custom-scim_startup

    # echo 'export GTK_IM_MODULE="xim"' >> /etc/X11/Xsession.d/74custom-scim_startup

    # chmod 644 /etc/X11/Xsession.d/74custom-scim_startup

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

    # reboot
But I cannot use Ctrl+Space to toggle the IME.

Can you tell me why? I think it's the problem the CD-image version I use, am I wrong?
Patrick Hoo, a physics enthusiast.
OS: Debian(Xfce) GNU/Linux, LFS.
TeX, Vim, Emacs, JabRef, Wiki, etc.
头像
fire3
帖子: 76
注册时间: 2007-05-29 18:12
来自: THU
联系:

#3

帖子 fire3 » 2008-07-16 13:04

俺以前用debian时都是从最小的基本系统开始一点一点apt装的。。。看来ubuntu下也有勤快人啊:)
头像
QuITh
帖子: 85
注册时间: 2007-11-27 15:46
来自: USTC
联系:

#4

帖子 QuITh » 2008-07-16 13:07

I do not use Ubuntu or Windows or something else...
Patrick Hoo, a physics enthusiast.
OS: Debian(Xfce) GNU/Linux, LFS.
TeX, Vim, Emacs, JabRef, Wiki, etc.
头像
Mr.J
帖子: 204
注册时间: 2008-07-14 16:58

#5

帖子 Mr.J » 2008-07-16 13:16

Ctrl+Space to toggle the IME. Such sometimes is a problem when you prefer scim-bridge. Since I have abandonned it, it's not a problem any more and also the conflicts of key bindings should be double checked. good luck.
头像
QuITh
帖子: 85
注册时间: 2007-11-27 15:46
来自: USTC
联系:

#6

帖子 QuITh » 2008-07-16 15:13

Mr.J 写了:Ctrl+Space to toggle the IME. Such sometimes is a problem when you prefer scim-bridge. Since I have abandonned it, it's not a problem any more and also the conflicts of key bindings should be double checked. good luck.
Conflicts of key bindings :evil:, I DO think so :x ...
Patrick Hoo, a physics enthusiast.
OS: Debian(Xfce) GNU/Linux, LFS.
TeX, Vim, Emacs, JabRef, Wiki, etc.
头像
Mr.J
帖子: 204
注册时间: 2008-07-14 16:58

#7

帖子 Mr.J » 2008-07-17 9:07

I have viewed your profile. Very impressive. I want you to know that, as I said pure English system, in my language support section I did NOT choose any other languages than default English.

I hope this will help.

==========quote from your log=============
Choose language

English - English

Other --> Asia --> China
头像
QuITh
帖子: 85
注册时间: 2007-11-27 15:46
来自: USTC
联系:

#8

帖子 QuITh » 2008-07-18 3:01

Mr.J
Thanks for your quick reply, What I mean *Other --> Asia --> China* is that, choose your country. I was in the expertgui mode installing Debian Lenny Beta2.

Anyway, thanks for your help!

And NOW, I can input Chinese with Ctrl+Space.

Here is how:

代码: 全选

v@QuITh:~$ scim -d
Smart Common Input Method 1.4.7

Launching a SCIM daemon with Socket FrontEnd...
Loading simple Config module ...
Creating backend ...
Loading socket FrontEnd module ...
Starting SCIM as daemon ...
Launching a SCIM process with x11...
Loading socket Config module ...
Creating backend ...
Loading x11 FrontEnd module ...
GTK Panel of SCIM 1.4.7

/usr/share/themes/NewHuman/gtk-2.0/gtkrc:79: error: unexpected identifier `colorize_scrollbar', expected character `}'
Starting SCIM as daemon ...
SCIM has been successfully launched.
Then Ctrl+Space as the normal way...

And don't forget

代码: 全选

# apt-get update &&  upgrade
BEFORE you install the package *scim*, it seems very important to do this for me!
Patrick Hoo, a physics enthusiast.
OS: Debian(Xfce) GNU/Linux, LFS.
TeX, Vim, Emacs, JabRef, Wiki, etc.
回复