LinuxSir.cn,穿越时空的Linuxsir!

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

SUSE9.2系统升级KDE到3.3.3.92-1后输入法的问题

[复制链接]
发表于 2005-2-20 19:10:31 | 显示全部楼层 |阅读模式
KDE升级到3.3.3.92-1后,首先的问题是KONQUEROR与SCIM的冲突,一进入KDE就报错,终端打不开,主文件夹打不开,反正是KDE程序都打不开。(不管是原来的安装系统时安装的SCIM或者是我下载安装的SUSE网站上最新版的SCIM的RPM都有这个 问题)
于是删掉SCIM的RPM,下载FCITX的原码自己编译安装,由于在主目录下找不到.bashrc .bash_profile  .xinitrc .xsession等文件,只好将/etc/X11/xim文件里有scim全都换成了fcitx,以及在zh_CN*) # Simplified Chinese的那一段里改成了export XMODIFIERS=@im=fcitx
fcitx &
下面是我的那个xim:
#!/bin/bash
#
# $Id: xim,v 1.27 2004/12/03 16:30:50 mfabian Exp $
#
# Copyright ~ 2001 SuSE GmbH Nuernberg, Germany
#
# Mike Fabian <mfabian@suse.de>, 2000, 2001, 2002, 2004
#
# This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.


# /etc/X11/xim is used to start a default input method.

# /etc/X11/xim is sourced by ~/.xinitrc or ~/.xsession unless
# you have a file ~/.xim in your home directory. If you have
# a ~/.xim file, it is sourced instead.
# Therefore, if you don't like the default input method,
# just create a file ~/.xim in your home directory containing
# the necessary lines to start your preferred input method.
# Usually you need only a few lines, /etc/X11/xim is only so
# long because it tries to find a nice default depending
# on the language and the installed input methods.

# For example, if you want to use "fcitx" as your input method,
# it is enough to have the following 5 lines (and nothing else)
# in your ~/.xim file:

#       export XMODIFIERS="@im=fcitx"
#       export GTK_IM_MODULE=fcitx
#       export QT_IM_SWITCHER=imsw-multi
#       export QT_IM_MODULE=fcitx
#       fcitx -d

# Determine the LC_CTYPE locale category setting
tmplang=${LC_ALL-${LC_CTYPE-${LANG-en_US}}}

# make sure we have all the necessary directories in the path to find
# the input servers and the tools like "pidof" which are used below
# (Ami is usually in /opt/gnome/bin!):
OLD_PATH=$PATH
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/opt/kde3/bin:/opt/gnome/bin:/usr/lib/im/locale/ja/atokserver

start_fcitx () {
            export XMODIFIERS=@im=fcitx
            export GTK_IM_MODULE=fcitx
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=fcitx
            case $WINDOWMANAGER in
                *kde)
                 export XMODIFIERS=@im=fcitx
                 fcitx &
                ;;
                 *)
                 export XMODIFIERS=@im=fcitx
                 fcitx &
                ;;
            esac
}
case $tmplang in
    ja*) # Japanese
        # Wnn7
        if test -d /usr/lib/wnn7 \
           && pidof jserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=_XWNMO"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            # The Gnome integration of OpenOffice still has bugs which prevent
            # Wnn7 from working well with OpenOffice when the Gnome integration
            # ist used. When typing slowly, Japanese input with Wnn7 works well
            # but when typing fast preedit strings are oftten comitted too
            # early. As a workaround we disable the Gnome integration for
            # OpenOffice when Wnn7 is used:
            case $WINDOWMANAGER in
                *gnome)
                    export OOO_FORCE_DESKTOP=none
                    xwnmo -map -g 1x1-0-28
                ;;
                *)
                    xwnmo -map -g 1x1-0-60
                ;;
            esac
            if [ ! -f $HOME/.kde/share/config/skimrc ]
            then
                echo "[General]" > $HOME/.kde/share/config/skimrc
                echo "Autostart=false" >> $HOME/.kde/share/config/skimrc
            fi
        # ATOK-X?
        elif type -p atokx_client > /dev/null 2>&1 \
           && pidof /usr/lib/im/htt > /dev/null 2>&1 \
           && pidof atokmngdaemon > /dev/null 2>&1
        then
            # setting the variable USE_XOPENIM to something not empty
            # is needed to make ATOK-X work with OpenOffice:
            export USE_XOPENIM=yes
            export XMODIFIERS="@im=htt"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            LANG=ja_JP LC_ALL=ja_JP atokx_client &
        elif type -p fcitx > /dev/null 2>&1 \
            && rpm -q uim fcitx-uim > /dev/null 2>&1
        then
            start_fcitx
        # WXG?
        elif type -p kinput2 > /dev/null 2>&1 \
            &&  pidof wxgserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -canna -cannaserver unix &
        # Canna?
        elif type -p kinput2 > /dev/null 2>&1 \
             &&  pidof cannaserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -canna -cannaserver unix &
        # Wnn6?
        elif type -p kinput2 > /dev/null 2>&1 \
             && pidof jserver > /dev/null 2>&1 \
             && test -d /usr/local/OMRONWnn6
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -wnn \
                     -wnnenvrc6 /usr/local/OMRONWnn6/wnn6linux/ja_JP/wnnenvrc &
        # FreeWnn?
        elif type -p kinput2 > /dev/null 2>&1 \
             && pidof jserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -wnn &
        fi
    ;;
    ko*) # Korean
        if type -p fcitx > /dev/null 2>&1 \
           && rpm -q fcitx-hangul > /dev/null 2>&1
        then
           start_fcitx
        elif type -p ami > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=Ami"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            case $WINDOWMANAGER in
                *kde|*windowmaker|*wmaker)
                    ami -wm -wait &
                ;;
                *)
                    ami &
                ;;
            esac
        fi
    ;;
    zh_HK*) # Traditional Chinese for Hongkong
        if type -p fcitx > /dev/null 2>&1 \
            && rpm -q fcitx-tables-zh > /dev/null 2>&1
        then
            start_fcitx
        elif type -p xcin > /dev/null 2>&1
        then
            export XMODIFIERS="@im=xcin-zh_HK"
            LANG=zh_HK LC_ALL=zh_HK xcin &
        fi
    ;;   
    zh_TW*) # Traditional Chinese
        if type -p fcitx > /dev/null 2>&1 \
            && rpm -q fcitx-tables-zh > /dev/null 2>&1
        then
            start_fcitx
        elif type -p xcin > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=xcin-zh_TW"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            LANG=zh_TW LC_ALL=zh_TW xcin &
        fi
    ;;
    zh_CN*) # Simplified Chinese
        export XMODIFIERS=@im=fcitx
        fcitx &
    ;;
    *)  # all other languages:
   
        # probably an XIM server is not needed.
        # Nevertheless it may be useful to set XMODIFIER="@im=local"
        # because "@im=local" means "use compose and dead-keys" and
        # some programs will use compose and dead-keys only if XMODIFIERS
        # is set to either "@im=local" or "@im=none".
        
        export XMODIFIERS="@im=local"
        
    ;;
esac

# probably better to restore the old value of PATH...
PATH=$OLD_PATH
我所用的locale始终提utf8,QT版本是3.3.4-3,fcitx安装好了以后,问题又来了:fcitx只能在KDE程序里使用,(比如KONQUORER KEDIT KATE等等,)在FIREFOX GAIM里死活不能输入。在LUMAQQ里只要一打开聊天对话框,LUMAQQ就崩溃了。
所以请问各位一下,我该怎么办?
发表于 2005-2-20 21:11:52 | 显示全部楼层
你是怎么升级KDE的?是自己从源码编译安装?还是从哪里下载的二进制包直接安装的?

Post by chen1960
KDE升级到3.3.3.92-1后,首先的问题是KONQUEROR与SCIM的冲突,一进入KDE就报错,终端打不开,主文件夹打不开,反正是KDE程序都打不开。(不管是原来的安装系统时安装的SCIM或者是我下载安装的SUSE网站上最新版的SCIM的RPM都有这个 问题)
于是删掉SCIM的RPM,下载FCITX的原码自己编译安装,由于在主目录下找不到.bashrc .bash_profile  .xinitrc .xsession等文件,只好将/etc/X11/xim文件里有scim全都换成了fcitx,以及在zh_CN*) # Simplified Chinese的那一段里改成了export XMODIFIERS=@im=fcitx
fcitx &
下面是我的那个xim:
#!/bin/bash
#
# $Id: xim,v 1.27 2004/12/03 16:30:50 mfabian Exp $
#
# Copyright ~ 2001 SuSE GmbH Nuernberg, Germany
#
# Mike Fabian <mfabian@suse.de>, 2000, 2001, 2002, 2004
#
# This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.


# /etc/X11/xim is used to start a default input method.

# /etc/X11/xim is sourced by ~/.xinitrc or ~/.xsession unless
# you have a file ~/.xim in your home directory. If you have
# a ~/.xim file, it is sourced instead.
# Therefore, if you don't like the default input method,
# just create a file ~/.xim in your home directory containing
# the necessary lines to start your preferred input method.
# Usually you need only a few lines, /etc/X11/xim is only so
# long because it tries to find a nice default depending
# on the language and the installed input methods.

# For example, if you want to use "fcitx" as your input method,
# it is enough to have the following 5 lines (and nothing else)
# in your ~/.xim file:

#       export XMODIFIERS="@im=fcitx"
#       export GTK_IM_MODULE=fcitx
#       export QT_IM_SWITCHER=imsw-multi
#       export QT_IM_MODULE=fcitx
#       fcitx -d

# Determine the LC_CTYPE locale category setting
tmplang=${LC_ALL-${LC_CTYPE-${LANG-en_US}}}

# make sure we have all the necessary directories in the path to find
# the input servers and the tools like "pidof" which are used below
# (Ami is usually in /opt/gnome/bin!):
OLD_PATH=$PATH
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/opt/kde3/bin:/opt/gnome/bin:/usr/lib/im/locale/ja/atokserver

start_fcitx () {
            export XMODIFIERS=@im=fcitx
            export GTK_IM_MODULE=fcitx
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=fcitx
            case $WINDOWMANAGER in
                *kde)
                 export XMODIFIERS=@im=fcitx
                 fcitx &
                ;;
                 *)
                 export XMODIFIERS=@im=fcitx
                 fcitx &
                ;;
            esac
}
case $tmplang in
    ja*) # Japanese
        # Wnn7
        if test -d /usr/lib/wnn7 \
           && pidof jserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=_XWNMO"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            # The Gnome integration of OpenOffice still has bugs which prevent
            # Wnn7 from working well with OpenOffice when the Gnome integration
            # ist used. When typing slowly, Japanese input with Wnn7 works well
            # but when typing fast preedit strings are oftten comitted too
            # early. As a workaround we disable the Gnome integration for
            # OpenOffice when Wnn7 is used:
            case $WINDOWMANAGER in
                *gnome)
                    export OOO_FORCE_DESKTOP=none
                    xwnmo -map -g 1x1-0-28
                ;;
                *)
                    xwnmo -map -g 1x1-0-60
                ;;
            esac
            if [ ! -f $HOME/.kde/share/config/skimrc ]
            then
                echo "[General]" > $HOME/.kde/share/config/skimrc
                echo "Autostart=false" >> $HOME/.kde/share/config/skimrc
            fi
        # ATOK-X?
        elif type -p atokx_client > /dev/null 2>&1 \
           && pidof /usr/lib/im/htt > /dev/null 2>&1 \
           && pidof atokmngdaemon > /dev/null 2>&1
        then
            # setting the variable USE_XOPENIM to something not empty
            # is needed to make ATOK-X work with OpenOffice:
            export USE_XOPENIM=yes
            export XMODIFIERS="@im=htt"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            LANG=ja_JP LC_ALL=ja_JP atokx_client &
        elif type -p fcitx > /dev/null 2>&1 \
            && rpm -q uim fcitx-uim > /dev/null 2>&1
        then
            start_fcitx
        # WXG?
        elif type -p kinput2 > /dev/null 2>&1 \
            &&  pidof wxgserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -canna -cannaserver unix &
        # Canna?
        elif type -p kinput2 > /dev/null 2>&1 \
             &&  pidof cannaserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -canna -cannaserver unix &
        # Wnn6?
        elif type -p kinput2 > /dev/null 2>&1 \
             && pidof jserver > /dev/null 2>&1 \
             && test -d /usr/local/OMRONWnn6
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -wnn \
                     -wnnenvrc6 /usr/local/OMRONWnn6/wnn6linux/ja_JP/wnnenvrc &
        # FreeWnn?
        elif type -p kinput2 > /dev/null 2>&1 \
             && pidof jserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=kinput2"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            kinput2 -xim -kinput -wnn &
        fi
    ;;
    ko*) # Korean
        if type -p fcitx > /dev/null 2>&1 \
           && rpm -q fcitx-hangul > /dev/null 2>&1
        then
           start_fcitx
        elif type -p ami > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=Ami"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            case $WINDOWMANAGER in
                *kde|*windowmaker|*wmaker)
                    ami -wm -wait &
                ;;
                *)
                    ami &
                ;;
            esac
        fi
    ;;
    zh_HK*) # Traditional Chinese for Hongkong
        if type -p fcitx > /dev/null 2>&1 \
            && rpm -q fcitx-tables-zh > /dev/null 2>&1
        then
            start_fcitx
        elif type -p xcin > /dev/null 2>&1
        then
            export XMODIFIERS="@im=xcin-zh_HK"
            LANG=zh_HK LC_ALL=zh_HK xcin &
        fi
    ;;   
    zh_TW*) # Traditional Chinese
        if type -p fcitx > /dev/null 2>&1 \
            && rpm -q fcitx-tables-zh > /dev/null 2>&1
        then
            start_fcitx
        elif type -p xcin > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=xcin-zh_TW"
            export GTK_IM_MODULE=xim
            export QT_IM_SWITCHER=imsw-multi
            export QT_IM_MODULE=xim
            LANG=zh_TW LC_ALL=zh_TW xcin &
        fi
    ;;
    zh_CN*) # Simplified Chinese
        export XMODIFIERS=@im=fcitx
        fcitx &
    ;;
    *)  # all other languages:
   
        # probably an XIM server is not needed.
        # Nevertheless it may be useful to set XMODIFIER="@im=local"
        # because "@im=local" means "use compose and dead-keys" and
        # some programs will use compose and dead-keys only if XMODIFIERS
        # is set to either "@im=local" or "@im=none".
        
        export XMODIFIERS="@im=local"
        
    ;;
esac

# probably better to restore the old value of PATH...
PATH=$OLD_PATH
我所用的locale始终提utf8,QT版本是3.3.4-3,fcitx安装好了以后,问题又来了:fcitx只能在KDE程序里使用,(比如KONQUORER KEDIT KATE等等,)在FIREFOX GAIM里死活不能输入。在LUMAQQ里只要一打开聊天对话框,LUMAQQ就崩溃了。
所以请问各位一下,我该怎么办?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-20 23:13:20 | 显示全部楼层
ftp://ftp.kde.org/pub/kde/unstable/3.3.92/SuSE/ix86/9.2/下载RPM包,(我太菜,太懒了,下载RPM包省事算了)   
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-21 16:41:40 | 显示全部楼层
搞定 ,自己重新编译的 SCIM。可以用啦。高兴。贴图庆祝一下。   

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-22 05:59:10 | 显示全部楼层
现在问题又来了,我用一个普通用户从KDM登陆KDE,SCIM不是自启动的,那我就在终端运行scim,结果scim崩溃,终端崩溃,KDE报错。
而我用ROOT从命令行用startx登陆KDE一切正常,SCIM是自启动的。(因为我发现ROOT无法从KDM登陆)
我又新建一个普通用户从KDM登陆KDE,还是和那个普通用户登陆时的情况一样,
我用这个普通用户从命令行运行startx登陆KDE,一切则正常。
这个是怎么回事?
是KDM的问题吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-22 09:00:22 | 显示全部楼层
已解决。
回复 支持 反对

使用道具 举报

发表于 2005-2-22 22:03:21 | 显示全部楼层
兄弟啊,怎么解决的?
我也有和你同样的问题,我的kde是通过ftp://ftp.gwdg.de用apt-get升级的,从菜单和桌面点击kde程序就崩溃,就是那个libscim冲突的问题。
但是,在gnome term的命令行中运行就没有什么大问题。
说说你是怎么解决的,用的scim的版本是多少啊。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-25 09:43:04 | 显示全部楼层
我到sourceforge.net下载SCIM最新版,自己编译解决问题。不过,可能是没有编译好,还是有问题,就是和LUMAQQ的问题,每次要打开聊天对话框,LUMAQQ就崩溃。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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