I'm having massive problems with Chinese input. Please help!
First, I decided to try a different Chinese input system that the one I had, xcin, which frequently crashed and became unresponsive, requiring a new login to restart it. The new input method I chose was SCIM, which looks great. It has intelligent Pinyin and many other features that make it look much better than XCIN.
So I installed SCIM from RPMs. (I'm using Mandrake 9.1.) I had to edit a bunch of different files -- /etc/sysconfig/i18n, /etc/X11/xinit/xinitrc, /etc/X11/xinit/XIM and ~/.xinitrc -- but I finally got it to run. However, when I logged in again, OpenOffice.org started up by itself and then started crashing every time I tried to save anything. I asked for help on several forums, but no one could give any, so I finally decided to reinstall OpenOffice.org. I did that -- and it was strange, because Mandrake told me I needed to install the mainland Chinese localization modules for OpenOffice.org, even though I'm using Taiwanese localization. However, even reinstalling OO.o didn't stop it from opening by itself or crashing, so I deleted my ~/.openoffice directory. That stopped it from crashing, but it hasn't stopped it from opening by itself every time I log in.
I checked all around the web for information on SCIM crashing with OO, but found nothing. So finally decided to uninstall SCIM and go back to XCIN. I uninstalled the SCIM RPMs, reinstalled the XCIN ones and edited all those configuration files again. However, XCIN won't start now!
I'm going crazy. An attempt to get a better Chinese input system has left me with no Chinese input at all and a malfunctioning OpenOffice.org. What am I doing wrong?
Here are the contents of those config files as they are now:
/etc/sysconfig/i18n:
Code:
LANGUAGE=zh_TW.Big5:zh_TW:zh_HK:zh
LC_ADDRESS=zh_TW
LC_COLLATE=zh_TW
LC_NAME=zh_TW
XIM=XCIN
LC_NUMERIC=zh_TW
LC_TIME=zh_TW
LC_MEASUREMENT=zh_TW
LANG=zh_TW
LC_MESSAGES=zh_TW
LC_IDENTIFICATION=zh_TW
LC_CTYPE=zh_TW
LC_TELEPHONE=zh_TW
CONSOLE_NOT_LOCALIZED=yes
ENC=big5
LC_MONETARY=zh_TW
XIM_PROGRAM=XCIN
LC_PAPER=zh_TW
XMODIFIERS="@im=XCIN-zh_TW"
/etc/X11/xinit/xinitrc:
Code:
#!/bin/sh
# (c) 2000-2002 MandrakeSoft
# $Id: xinitrc-xinitrc,v 1.2 2002/09/10 05:53:43 flepied Exp $
# Set a background here because it's not done anymore
# in Xsesion for non root users
if [ "`whoami`" != root ]; then
xsetroot -solid "#21449C"
fi
exec /etc/X11/Xsession $*
xcin -d
export XMODIFIERS=@im=XCIN-zh_TW
/etc/X11/xinit/XIM:
Code:
#!/bin/bash
# read the user (~/.i18n) or system-wide (/etc/sysconfig/i18n) i18n settings
. /etc/profile.d/10lang.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=Chinput
;;
ja*)
XIM=kinput2
;;
ko*)
XIM=Ami
;;
*)
XIM=none
;;
esac
fi
if [ -z "$XIM_PROGRAM" ]; then
case "$XIM" in
Chinput) XIM_PROGRAM=chinput ;;
scim*) XIM_PROGRAM=scim ;;
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
elif [ -x /usr/bin/ami_applet ]; then
XIM_PROGRAM=ami_applet
else
XIM_PROGRAM=ami
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
$XIM_PROGRAM $XIM_PROG_ARGS &
fi
~/.xinitrc:
Code:
#!/bin/sh
# (c) 2000-2002 MandrakeSoft
# $Id: xinitrc-xinitrc,v 1.2 2002/09/10 05:53:43 flepied Exp $
# Set a background here because it's not done anymore
# in Xsesion for non root users
if [ "`whoami`" != root ]; then
xsetroot -solid "#21449C"
fi
exec /etc/X11/Xsession $*
XCIN -d
export XMODIFIERS=@im=XCIN
Please help! Thank you!