Linuxsir.org

                登录 注册 

 

返回列表
上一主题 下一主题

中文输入: miniChinput, fcitx和scim连锅端

用户头衔:注册会员

状态:我不在线

楼主
发表于 2004-05-04 17:26:47 |只看该作者 |倒序浏览
最新文档可从以下链接获得:
http://mariner.cs.ucdavis.edu/slackware/doc/chinese/chinese-input.txt


This is a mini-HOWTO to setup Chinese input method for X Window
applications.


Author:
Terminator

License
GNU Free Documentation License


Changelog:
May 04, 2004 Fix problem to start scim under WindowMaker
May 03, 2004 Add scim input method and rxvt
Apr 13, 2004 Initial release for miniChinput and fcitx


Objective
. Start Chinese Input Server in background automatically after
login X Window.
. Invoke chinput whenever one wants to input Chinese in mlterm,
mozilla and GTK2 applications by Ctrl_Space.
. Mozilla and GTK2 applicatioins start only with the English
interface because Chinese interface is often buggy (and personally I
do not like Chinese interface 扮鬼脸).


System
Slackware Linux -current (May 04, 2004) with glibc 2.3.2,
xfree86 4.4 and Xorg 11R6.7


Software
Chinese Input Server: miniChinput 0.1.9, fcitx 2.0.1, scim 0.9.6
Chinese Terminal: mlterm 2.8.0pl1, rxvt 2.7.10
Window Manager: WindowMaker 0.82


Settings
=================================================================
. /usr/X11R6/lib/X11/fonts/TTF/
=================================================================
Copy simsun.ttc into this directory, then execute the following
commands
# cd /usr/X11R6/lib/X11/fonts/TTF/
# mkfontscale
# cp fonts.scale fonts.dir
# fc-cache


=================================================================
. /usr/local/lib/Chinput/Chinput.ad
=================================================================
Set some parameters as the following lines
chinput.gblocale = zh_CN.GB18030
chinput.font = 8x16
chinput.gbfont = -misc-simsun-*-*-*--*-*-*-*-*-*-gb18030.2000-0
chinput.gbkfont= -misc-simsun-*-*-*--*-*-*-*-*-*-gb18030.2000-0
chinput.gb18030font = -misc-simsun-*-*-*--*-*-*-*-*-*-gb18030.2000-0

If use fcitx or scim, nothing is needed to change.


=================================================================
. /etc/csh.cshrc and /etc/csh.login
=================================================================
Comment out the following line in these two files
setenv LC_ALL POSIX


=================================================================
. /etc/X11/xinit/xinitrc.wmaker
=================================================================
Add the following lines before starting WindowMaker
export LC_CTYPE=zh_CN
LC_ALL=zh_CN LANG=zh_CN /usr/local/bin/chinput &

If use fcitx, start fcitx as the following line
LC_ALL=zh_CN LANG=zh_CN XIM=fcitx XIM_PROGRAM=fcitx XMODIFIERS=@im=fcitx fcitx &

If use scim, start scim by adding the following line into file
~GNUstep/Library/WindowMaker/autostart. Add the line to xinitrc.
wmaker does NOT work!!!
LC_ALL=zh_CN LANG=zh_CN /usr/local/bin/scim -f x11 -d &


=================================================================
. ~/.cshrc
=================================================================
Add the following lines
setenv LC_CTYPE zh_CN
unsetenv LC_ALL # make sure LC_ALL is not set

To use miniChinput, add the following lines
alias mlterm 'env LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=Chinput mlterm &'
alias bbs 'env LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=Chinput mlterm -T BBS -e telnet www.mitbbs.com &'

To use fcitx, add the following lines
alias mlterm 'env LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=fcitx XIM=fcitx XIM_PROGRAM=fcitx mlterm &'

To use scim, add the following lines
alias crxvt 'env LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=SCIM rxvt -km gb -fn 8x16 -geometry 80x25 &'

If use scim, replace Chinput with SCIM (case sensitive). Rxvt only
works with scim. Mlterm works with all three input servers.


=================================================================
. ~/.bashrc
=================================================================
Add the following lines
export LC_CTYPE=zh_CN
export LC_ALL= # make sure LC_ALL is not set

To use miniChinput, add the following lines
alias mlterm='LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=Chinput mlterm &'
alias bbs='LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=Chinput mlterm -T BBS -e telnet www.mitbbs.com &'

To use fcitx, add the following lines
alias mlterm='LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=fcitx XIM=fcitx XIM_PROGRAM=fcitx mlterm &'

To use scim, add the following lines
alias crxvt='LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=SCIM rxvt -km gb -fn 8x16 -geometry 80x25 &'

If use scim, replace Chinput with SCIM (case sensitive). Rxvt only
works with scim. Mlterm works with all three input servers.


=================================================================
. ~/GNUstep/Defaults/WMRoot
=================================================================
Start Mozilla/mlterm/GTK2 applications as the following lines. In
fact, it may not be necessary to start Mozilla nd GTK2 applications
with LC_CTYPE=zh_CN because it's already setted in xinitrc.wmaker.
("Multilang Terminal", SHEXEC, "LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=Chinput mlterm"),
("Mozilla Browser", SHEXEC, "LC_CTYPE=zh_CN mozilla"),
(Gaim, SHEXEC, "LC_CTYPE=zh_CN gaim"),
("GNOME Terminal", SHEXEC, "LC_CTYPE=zh_CN gnome-terminal"),
...


Diagnosis:
Check ~/.xsession-errors for error messages or set the variables
manually to test the input method.


Notice:
To input Chinese in abiword, you need to set language as Chinese
and use Chinese font.
To input Chinese in OpenOffice, you need to use Chinese font.
Proud Slacker since Slackware 3.4

用户头衔:注册会员

状态:我不在线

沙发
发表于 2004-05-05 05:56:58 |只看该作者 |倒序浏览
太好了,谢谢!
AMD Baton2500+<br /> ASUS A7V600(KT600)<br /> ATI 7500<br /> WinXP+VMware4.5
返回列表
Processed in : 0.014000 second(s) ©2014LinuxSir - 服务条款 - 免责声明 - 闽ICP备06025536号
回顶部