LinuxSir.cn,穿越时空的Linuxsir!

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

英文界面中文输入, 老调重弹

[复制链接]
发表于 2004-4-14 14:42:59 | 显示全部楼层 |阅读模式
懒得用中文写了, 将就着看吧. 我不喜欢用中文界面, 所以这里写的是如何
在英文界面的情况下输入中文, 参考了一些老贴子, 就不一一列举了.

我不喜欢用KDE和GNOME, 所以这里是给WindowMaker和其它Window Manager
用的. 而且我用的是miniChinput, 不过fcitx也是类似的.

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


Result
    . Start chinput 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 with English interface
only because Chinese interface is often buggy.


System
    Slackware Linux -current (Apr 13, 2004) with glibc 2.3.2 and
xfree86 4.4


Software
    Chinese Input Server: miniChinput 0.1.9, fcitx 2.0.1
    Chinese Terminal: mlterm 2.8.0pl1
    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

    . /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
        env LC_ALL=zh_CN LANG=zh_CN XIM=fcitx XIM_PROGRAM=fcitx XMODIFIERS=@im=fcitx fcitx &

    . ~/.cshrc
    Add the following lines
        setenv LC_CTYPE zh_CN
        unsetenv LC_ALL   # make sure LC_ALL is not set
        alias mlterm 'env LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=Chinput mlterm &'
        alias bbs 'alias bbs 'env LC_ALL=zh_CN LANG=zh_CN XMODIFIERS=@im=Chinput mlterm -T BBS -e telnet www.mitbbs.com &'

    . ~/.bashrc
    Add the following lines
        export LC_CTYPE=zh_CN
        export LC_ALL=   # make sure LC_ALL is not set
        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 &'

    . ~/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.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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