新闻  |   论坛  |   博客  |   在线研讨会
配置fedora8之英文环境下使用中文SCIM输入法
0750long | 2009-04-07 16:23:31    阅读:1813   发布文章

配置fedora8之英文环境下使用中文SCIM输入法

vi /etc/X11/xinit/xinitrc.d/xiinput.sh
在language_list=""列表中加入en即可,如:language_list = "..... zh en"
具体的样本文件:
!/bin/bash
# Copyright (C) 1999-2004,2007 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# X Input method setup script

USER_XINPUTRC="$HOME/.xinputrc"
SYS_XINPUTRC="/etc/X11/xinit//xinputrc"

# Load up the user and system locale settings
oldterm=$TERM
unset TERM
if [ -r /etc/profile.d/lang.sh ]; then
    # for Fedora etc
    source /etc/profile.d/lang.sh
elif [ -r /etc/default/locale ]; then
    # for Debian
    source /etc/default/locale
fi
[ -n "$oldterm" ] && export TERM=$oldterm

tmplang=${LC_CTYPE:-${LANG:-"en_US.UTF-8"}}

# unset env vars to be safe
unset XIM XIM_PROGRAM XIM_ARGS XMODIFIERS GTK_IM_MODULE QT_IM_MODULE AUXILIARY_PROGRAM AUXILIARY_ARGS
[ -z "$IM_CHOOSER_DISABLE_USER_XINPUTRC" ] && IM_CHOOSER_DISABLE_USER_XINPUTRC=no

if [ -r "$USER_XINPUTRC" -a "x$IM_CHOOSER_DISABLE_USER_XINPUTRC" = "xno" ]; then
    source "$USER_XINPUTRC"
elif [ -r "$SYS_XINPUTRC" ]; then
    # FIXME: This hardcoded list has to be gone in the future.
    _language_list="as bn gu hi ja kn ko ml mr ne or pa si ta te th ur vi zh en"
    for i in $_language_list; do
        if echo $tmplang | grep -q -E "^$i"; then
            source "$SYS_XINPUTRC"
            break
        fi
    done
fi

[ -z "$XIM" ] && XIM=none
[ -n "$GTK_IM_MODULE" ] && export GTK_IM_MODULE
[ -n "$QT_IM_MODULE" ] && export QT_IM_MODULE

# setup XMODIFIERS
[ -z "$XMODIFIERS" -a -n "$XIM" ] && XMODIFIERS="@im=$XIM"
[ -n "$XMODIFIERS" ] && export XMODIFIERS

# execute XIM_PROGRAM
[ -z "$IM_CHOOSER_ONLY_EVALUATE_VARIABLES" ] && IM_CHOOSER_ONLY_EVALUATE_VARIABLES=no
[ -n "$XIM_PROGRAM" -a "x$IM_CHOOSER_ONLY_EVALUATE_VARIABLES" = "xno" ] && which "$XIM_PROGRAM" > /dev/null 2>&1 && LANG="$tmplang" "$XIM_PROGRAM" $XIM_ARGS &

# execute AUXILIARY_PROGRAM
[ -n "$AUXILIARY_PROGRAM" -a "x$IM_CHOOSER_ONLY_EVALUATE_VARIABLES" = "xno" ] && which "$AUXILIARY_PROGRAM" > /dev/null 2>&1 && LANG="$tmplang" "$AUXILIARY_PROGRAM" $AUXILIARY_ARGS &

*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。

参与讨论
登录后参与讨论
推荐文章
最近访客
站长统计