QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 497|回复: 0

菜鸟安装FC4 Test2输入法问题解决,可能菜鸟们用得着。

[复制链接]
发表于 2005-4-16 17:38:22 | 显示全部楼层 |阅读模式
我是第一次安装FC4 Test2(前天,刚下的),因为从没有在liunx上混过,所以首先遇到的就是输入法问题。看网上的帖子,大多是介绍在FC3中安装scim的方法,而帖子中提到的xinput.sh文件内容,又已经大不一样了。呵呵,偶只好找了个以前的文件,其内容如下,希望遇到同样问题的朋友,只要把以下内容拷贝替换xinput.sh文件内容即可:
#!/bin/sh
# Copyright (C) 1999-2001 Red Hat, Inc.
#
# XIM( X Input Method ) script
#
# Korean part,etc contributed by
# Won-kyu Park <[email protected]>
#

oldterm=$TERM
unset TERM
# Load up the user and system locale settings
if [ -f /etc/profile.d/lang.sh ] ; then
. /etc/profile.d/lang.sh
fi
export TERM=$oldterm

tmplang="en_US"
#if test x$GDM_LANG != x ; then
# tmplang=$GDM_LANG
if test x$LC_ALL != x ; then
tmplang=$LC_ALL
elif test x$LC_CTYPE != x ; then
tmplang=$LC_CTYPE
elif test x$LANG != x ; then
tmplang=$LANG
elif [ -e /etc/sysconfig/i18n ]; then
. /etc/sysconfig/i18n
tmplang=$LANG
fi

#
# check to see if the user has a preferred desktop
#

PREFERRED=

# runlevel 5 - checks which session manager it will load
# runlevel 3 - checks which desktop manager it will load
if [ -f /etc/sysconfig/desktop ]; then
# FIXME: This grep regex can be combined when someone has copious spare time.
if grep -q "GNOME" /etc/sysconfig/desktop 2>/dev/null || grep -q "\"\"" /etc/sysconfig/desktop 2>/dev/null; then
# runlevel 5 with gdm - checks for $GDMSESSION and set the $PREFERRED
if [ x$GDMSESSION = xDefault ]; then
PREFERRED=gnome
elif [ x$GDMSESSION = xGNOME ]; then
PREFERRED=gnome
elif [ x$GDMSESSION = xKDE ]; then
PREFERRED=kde
else
# applies if no env and runlevel 3
PREFERRED=gnome
fi
elif grep -q "KDE" /etc/sysconfig/desktop 2>/dev/null; then

if [ -z $1 ] || [ x$1 = xdefault ]; then
# applies if no arg passed by kdm and runlevel 3
PREFERRED=kde
else
# otherwise assign $PREFERRED from arg
PREFERRED=$1
fi
fi
fi

if [ -z $PREFERRED ]; then

GSESSION=gnome-session
STARTKDE=startkde

# by default, we run GNOME.
if which $GSESSION > /dev/null 2>&1; then
PREFERRED=gnome
fi

# if GNOME isn't installed, try KDE.
if which $STARTKDE > /dev/null 2>&1; then
PREFERRED=kde
fi
fi


#
# check $XIM and set a default $XIM value.
#
if [ -z "$XIM" ]; then
case $tmplang in
ko*)
if [ -e /usr/bin/ami ]; then
XIM="Ami"
elif [ -e /usr/bin/hanIM ]; then
XIM="hanIM"
fi
;;
ja*)
if [ -e /usr/X11R6/bin/xwnmo ]; then
XIM="_XWNMO"
elif [ -e /usr/X11R6/bin/kinput2 ]; then
XIM="kinput2"
elif [ -e /usr/X11R6/bin/skkinput ]; then
XIM="skkinput"
fi
;;
zh_CN*)
if [ -e /usr/bin/scim ]; then
XIM="SCIM"
elif [ -e /usr/X11R6/bin/xcin ]; then
export LC_CTYPE=zh_CN.GB2312
XIM="xcin-zh_CN.GB2312"
fi
;;
zh_TW*)
if [ -e /usr/X11R6/bin/xcin ]; then
export LC_CTYPE=zh_TW.Big5
XIM="xcin"
fi
;;
*)
XIM="none"
;;
esac
fi

#
# set a proper XIM program with respect to $XIM
#
if [ -z "$XIM_PROGRAM" ]; then
case "$XIM" in
Ami)
case "$PREFERRED" in
gnome)
if which ami_applet >/dev/null 2>&1 ; then
DELAY_START=2
XIM_PROGRAM=ami_applet
XIM_ARGS=""
elif which ami >/dev/null 2>&1 ; then
XIM_PROGRAM=ami
fi
;;
kde)
if which wmami >/dev/null 2>&1 ; then
XIM_PROGRAM=wmami
XIM_ARGS="-wait"
elif which ami >/dev/null 2>&1 ; then
XIM_PROGRAM=ami
fi
;;
*)
if which ami >/dev/null 2>&1 ; then
XIM_PROGRAM=ami
fi
;;
esac
;;
hanIM)
if which hanIM >/dev/null 2>&1 ; then
XIM_PROGRAM=hanIM
fi
;;
SCIM)
XIM_PROGRAM=scim ;;
xcin)
XIM_PROGRAM=xcin ;;
xcin-zh_CN.GB2312)
XIM_PROGRAM=xcin
XIM_ARGS="-x xcin-zh_CN.GB2312" ;;
_XWNMO)
XIM_PROGRAM=x



替换完成该文件后,再到这里下载SCIM RPM包安装,然后注销重新进入就可以了
http://www.linuxfans.org/nuke/modules.php?name=Site_Downloads&op=geninfo&did=2902
不过此方法,需要每次在进入X时,都手工启动/usr/bin/scim文件(我是在桌面上作了个快捷方式来解决)
希望高手们能告知解决此问题的方法。我也继续再看看。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-14 22:14 , Processed in 0.057898 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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