redflag 4.0的输入法向redhat移植
前些天装了个redflag 4.0桌面版(虚拟机上装的),用了一下发现里面的网上邻居和输入法基本过的去(输入法就是因为里面的智能abc我很喜欢,毕竟用了好几年了,很有感情的),所以
想移植到别的系统里面用,上网找了一下资料,也有人讲过这个事,但是也没怎么看懂,报着
试一下的态度,我开始了
1寻找redflag里面的输入法的安装包,因为也是rpm包,所以我想应该是可以装上去的,
寻找到的包为rf-xim-input-5.0-49.i386.rpm
2当时就在magiclinux下装了一下,rpm -e 掉原来的输入法,结果是装不上去,说是差一个文件叫ctrlpanel,马上到http://bingle.pku.edu.cn/上找了一下,找到包如下ctrlpanel-1.5-8.i386.rpm , ,然后rpm -ivh ctrlpanel-1.5-8.i386.rpm
再rpm -ivh rf-xim-input-5.0-49.i386.rpm,init 3 然后init 5,结果是
可以看到输入法的图标有,但是打不了字,想应该是环境变量的问题
3 后来我想到redhat下面也试一下,结果是我的ntfs挂不上,没办法重编译系统又太麻
烦,只有上网找了一个叫kernel-ntfs-2.4.20-8.i686.rpm ,用这个一定要搞
清楚你的kernel是什么样的,运行uname -a,结果如下Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU
/Linux,现在一看就知道应该找什么样的包了,然后就上网找了一个kernel-ntfs-2.4.20-8.i686.rpm ,然后
cd /mnt
mkdir d
mount -t ntfs /dev/hda6 /mnt/d
因为我的目录都是英文的,所以就没有碰到中文显示?的问题
然后把装在我的xp下面的文件cp了过来,然后在redhat9.0上装了一下
最开始是rpm -e miniChinput
然后要先装ctrlpanel-1.5-8.i386.rpm
最后再装rpm -ivh rf-xim-input-5.0-49.i386.rpm
现在你init 3推出x,再startx进去后会发现你的输入法是启动不了的,然后你要修改
/etc/X11/xinit/xinitrc.d/xinput
我改后的内容如下,请对自己的系统酌情修改,改错了不要怪我哦,因为我是菜菜鸟,所以一点小事罗嗦了半天,还望大家见谅,改完了xinput文件以后重新启动x就可以用这个输入法了
#!/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/rfinput ]; then
XIM="rfinput "
elif [ -e /usr/X11R6/bin/xcin ]; then
export LC_CTYPE=zh_CN.GB2312
XIM="xcin-zh_CN.GB2312"
fi
;;
zh_TW*)
if [ -e /usr/bin/rfinput ]; then
export LC_CTYPE=zh_TW.Big5
XIM="xcin-zh_CN.Big5"
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
;;
rfinput)
XIM_PROGRAM=rfinput ;;
xcin)
XIM_PROGRAM=xcin ;;
zh_CN.GB2312)
XIM_PROGRAM=xcin
XIM_ARGS="-x zh_CN.GB2312" ;;
_XWNMO)
XIM_PROGRAM=xwnmo
;;
kinput2)
XIM_PROGRAM=kinput2
if [ X"`ldd /usr/X11R6/bin/kinput2 | grep libcanna`" = X ] ; then
XIM_ARGS="-wnnenvrc /etc/FreeWnn/ja/wnnenvrc"
else
XIM_ARGS="-canna"
fi
;;
skkinput)
XIM_PROGRAM=skkinput
XIM_ARGS="" ;;
*)
XIM_PROGRAM=/bin/true ;;
esac
fi
[ -z "$XMODIFIERS" -a -n "$XIM" ] && export XMODIFIERS="@im=$XIM"
# execute XIM_PROGRAM
if test x$DELAY_START != x; then
#spawn to new process with external shell
bash -c "
while [ x\`ps -C panel -o pid=\` == x ]; do
sleep $DELAY_START
done
[ -z "\$XMODIFIERS" -a -n "$XIM" ] && export XMODIFIERS="@im=$XIM"
sleep $DELAY_START
which $XIM_PROGRAM > /dev/null 2>&1 && LANG=$tmplang $XIM_PROGRAM $XIM_ARGS &
" &
else
which $XIM_PROGRAM > /dev/null 2>&1 && LANG=$tmplang $XIM_PROGRAM $XIM_ARGS &
fi lcnja, 期待你把他们的网络邻居移植过来。
页:
[1]