LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 491|回复: 0

Slackware 8.1 miniChinput mini-HOWTO

[复制链接]
发表于 2003-12-18 18:11:50 | 显示全部楼层 |阅读模式
This is for Slack 8.1 since its support of Chinese input need some tricks:

April 29, 2003 (v1.0.1)

October 11, 2002 (v1.0)

Good news in Slackware 9:

. XFree86 4.3.0 has fixed the problem of missing XI18N_OBJS. Now you do not need to copy it. . XFree86 4.3.0 has introduced a program mkfontscale to build font.scale for TrueType fonts. Now you do not need to edit the font.scale manually. . XFree86 4.3.0 has included the fontconfig. Now the latest miniChinput can be built on Slackware 9. . Gcc 3.2.2 has fixed the problem of rxvt crashing. Now you do not need to change the Makefile.

Alternatively you may try XSIM or something else. There are a lot of new Chinese X Input Server available now. But I have not tested them out. For XSIM, it need DB4 with cxx support. The DB4 in the extra packages of Slackware 9 is not compiled with cxx support.


I know that some prople, like me, want to be able to view and input Chinese
in Slackware Linux, especially under XFree86 4.2. However, due to some tricks,
it sometimes seems to be a hard job. As I know, some people found it is easy to
let miniChinput work under XFree86 4.1, but not 4.2. So here are several steps
to achieve this task in a nutshell! :-)

. Software requirements Slackware 8.0, 8.1, 8.1.01, current Linux kernel 2.4.18, 2.4.19 or later XFree86 4.2.0, 4.2.1 Glibc 2.2.5 with i18n support

. XFree86 related tricks In the XFree86 4.2 and 4.2.1 with Slackware 8, a critical file is missing: /usr/X11R6/lib/X11/locale/zh_CN/XI18N_OBJS. Patrick said that it is a problem of XFree86 project and he did not intend to fix it by himself. However it is not hard to fix it. You can copy this file from /usr/X11R6/lib/X11/locale/zh_CN.gbk.

. Rxvt related tricks It seems rxvt 2.6.4 is compiled with gcc -O option in default. However, it leads to crash every time under miniChinput. So you should compile it as the following: ./configure --enable-gb --enable-xim --enable-next-scroll --with-x vi src/Makefile, replace -O of CFLAGS with -g make

. TTF fonts Many people would like to use some truetype fonts, like simsun from M$ Windows. So you can do the following steps: . Copy simsun.ttc from Windows fonts directory to /usr/X11R6/lib/fonts/TTF/. . Modify fonts.scale and fonts.dir in /usr/X11R6/lib/fonts/TTF/, add these lines: simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0 simsun.ttc -misc-SimSun-medium-r-normal--0-0-0-0-p-0-gbk-0 . Modify /etc/X11/XF86Config, in Section "Module", add one module "xtt". And in Section "File", add one line: FontPath "/usr/X11R6/lib/X11/fonts/TTF" . Restart X Window System.

. miniChinput Though miniChinput is still under heavy development, it is one of the best X Input Servers to input Simplified Chinese, and it is quite mature currently. You can find the source RPM packages from major Linux distributions, i.e. RedHat, Mandrake, or www.rpmfind.net. The latest version is 0.0.3-27 from RedHat 8.0. However it requires fontconfig packages which is not available for Slackware. So You may choose 0.0.3-18 or 0.0.3-20 from RedHat 7.3. After install miniChinput, you may need to modify the config file /usr/local/lib/chinput/Chinput.ad and use simsun font instead.

. locale setting Now you need to set some environment variables correctly in shell. For C shell users, add the following lines in your ~/.cshrc: setenv LC_ALL zh_CN setenv LANG zh_CN setenv XMODIFIES @im=Chinput For Bash shell users, add the following lines in your ~/.profile: export LC_ALL=zh_CN export LANG=zh_CN export XMODIFIES=@im=Chinput

. GTK application For applications based on GTK, if you want to use simsun font, you should modify /etc/gtk/gtkrc.zh_CN.

That's it! Enjoy your Chinese input environment now!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表