LinuxSir.cn,穿越时空的Linuxsir!

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

grep XMODIFIERS * -r 的结果

[复制链接]
发表于 2002-6-24 17:40:24 | 显示全部楼层 |阅读模式
grep XMODIFIERS * -r 的结果在
我上传的streen.png 文件里
发表于 2002-6-24 18:29:59 | 显示全部楼层

原来如此

请将/etc/sysconfig/i18n中的XMODIFERS的行去掉,再试试。如果行了,说一声(您用的好象是MDK)。如果不行,请再执行一下
$ cd /etc
$ grep kinput2c * -r
非常感谢
 楼主| 发表于 2002-6-25 12:21:58 | 显示全部楼层

I can't use the gWuBi too

I cant't use the gWuBi too
 楼主| 发表于 2002-6-25 12:29:43 | 显示全部楼层

The X11 file

#!/bin/bash

# read the user (~/.i18n) or system-wide (/etc/sysconfig/i18n) i18n settings
. /etc/profile.d/lang.sh

# The Gnome applets must not be launched each time if they are already
# managed by Gnome; here is the file path to the Gnome Applets config file;
# so we can do a grep to see if a given applet is already managed by Gnome
GNOME_APPLET_CONFIG="$HOME/.gnome/panel.d/default/Applet_Config"

if [ -z "$XIM_PROGRAM" -a -z "$XIM" ]; then
   locale=C
   if [ ! -z "$LC_ALL" ]; then
        locale=$LC_ALL
   elif [ ! -z "$LC_CTYPE" ]; then
        locale=$LC_CTYPE
   elif [ ! -z "$LANG" ]; then
        locale=$LANG
   fi
   case $locale in
    zh_TW*)
        export LC_CTYPE=zh_TW.Big5
        XIM=xcin
        ;;
    zh_CN*)
        XIM=kinput2c
        ;;
    ja*)
        XIM=kinput2
        ;;
    ko*)
        XIM=Ami
        ;;
    *)
        XIM=none
        ;;
   esac
fi
if [ -z "$XIM_PROGRAM" ]; then
   case "$XIM" in
    kinput2c) XIM_PROGRAM=kinput2c ;;
    xcin*) XIM_PROGRAM=xcin ;;
    kinput2) XIM_PROGRAM=kinput2 ;;
    Ami)
            # now ami determine which mode it will take from $DESKTOP variable
        # (not from this script's first argument given by Xsession script)
        # i think this way seems better.
        # -- Jaegeum --
        case $DESKTOP in
        # Gnome init program automatically restore previous session's
        # ami_applet. If you put ami_applet here, you may experience a lot of
        # repeated error windows that report "an applet died abruptly".
        # so we first check if the ami_applet is referenced in Gnome config
        # files

        # I think removing ` and ` around grep command is more reasonable.
        # -- Jaegeum --
        Gnome|GNOME|gnome)
            if [ -f "$GNOME_APPLET_CONFIG" ] && \
                grep -q '\<ami_applet\>' "$GNOME_APPLET_CONFIG";
            then
                XIM_PROGRAM=/bin/true
            else
                XIM_PROGRAM=ami_applet
            fi ;;
        # Now new wmami supports KDE2 docking mode.
        # XIM_PROG_ARGS variable is added to send xim's arguments if
        # they are needed.
        # -- Jaegeum --
        KDE|Kde|kde)
                        XIM_PROGRAM=wmami
                        XIM_PROG_ARGS="-wait" ;;
        WindowMaker|WINDOWMAKER|Windowmaker|windowmaker)
                        XIM_PROGRAM=wmami
                        XIM_PROG_ARGS="-wait" ;;
        # Following three WM entries should be added
        # because that wmami supports them is already well known fact.
        # -- Jaegeum --
        AfterStep|AFTERSTEP|Afterstep|afterstep)
                        XIM_PROGRAM=wmami
                        XIM_PROG_ARGS="-wait" ;;
        Enlightenment|ENLIGHTENMENT|enlightenment)
                        XIM_PROGRAM=wmami
                        XIM_PROG_ARGS="-wait" ;;
        BlackBox|BLACKBOX|Blackbox|blackbox)
                        XIM_PROGRAM=wmami
                        XIM_PROG_ARGS="-wait" ;;
        *)
                        XIM_PROGRAM=ami ;;
        esac ;;
    *) XIM_PROGRAM=/bin/true ;;
   esac
fi
[ -z "$XMODIFIERS" -a -n "$XIM" ] && export XMODIFIERS="@im=$XIM"

if which $XIM_PROGRAM >/dev/null 2>/dev/null
then
# Following is needed
# because some xims lose their reason when they are running before xmanagers.
# increase delay time if you need to.
# -- Jaegeum --
        ( sleep 5 && $XIM_PROGRAM $XIM_PROG_ARGS ) &
fi
 楼主| 发表于 2002-6-25 12:33:43 | 显示全部楼层

The i18n file

CONSOLE_NOT_LOCALIZED=yes
LC_CTYPE=zh_CN.GB2312
LC_MONETARY=zh_CN.GB2312
XIM_PROGRAM=kinput2c
LC_NUMERIC=zh_CN.GB2312
ENC=gb
LC_MESSAGES=zh_CN.GB2312
LANGUAGE=zh_CN.GB2312:zh_CN.gb2312:zh_CN:zh
LC_TIME=zh_CN.GB2312
LC_COLLATE=zh_CN.GB2312
XIM=kinput2c
LANG=zh_CN.GB2312
发表于 2002-6-25 14:45:06 | 显示全部楼层

非常感谢

给的信息足够解决问题了。我不会shell编程,谁要能帮我做一个就好了。
废话少说,解决倒也不难,将文件/etc/sysconfig/i18n和/etc/X11/xinit/XIM中所有的kinput2c改为gWuBi,重新启动X应该就可以了。
或是更简单点,不改上面的文件,而是修改文件/usr/bin/chinput,将其中的行
gWuBi -name Chinput&
改为
gWuBi -name kinput2c&
并将文件名也改为kinput2c。这样应该可以了。
成功了吱一声,OK?
 楼主| 发表于 2002-6-25 21:21:31 | 显示全部楼层

搞定了,哈哈,非常感谢YuKing!向YUKING致敬!!

我把所有的kinput2c改成gWuBi就可以用了,非常感谢YUKING
终于可以在LINUX上用五笔了

不过词组好像少了一点,希望可以加多一点进去就好了:)
是不是太多要求呢?:)))
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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