LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-05-2004, 10:02 PM   #1
Jiawen
Member
 
Registered: Aug 2003
Location: Twin Cities, MN, US
Distribution: Mandriva -> Ubuntu
Posts: 106

Rep: Reputation: 15
Chinese input driving me insane


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!
 
Old 02-07-2004, 07:12 PM   #2
JDW
Member
 
Registered: Feb 2003
Location: Melbourne, Australia
Distribution: Ubuntu 6.10, Slackware 11.0
Posts: 192

Rep: Reputation: 30
Chinese input driving me (and everyone) insane

Hi,

firstly, you will probably need to replace any line that exports XMODIFERS as "xcin" to "scim"...give that a try and log in again to initialize the new settings...

i never was able to get SCIM working myself, i should give it a go now, i haven't tried for a few months, so i hope my success will be better now...it looks good if you can get it working...

i use fcitx, but unfortunately this is Simplified only (but has great look and usability with many apps)...

jdw
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RPMs are driving me insane gauge73 Linux - Newbie 11 05-05-2005 01:02 PM
Samba driving me insane Lorend Linux - Newbie 7 02-16-2005 06:26 PM
Mplayer Driving Me Insane!!!!! njschroe Linux - Software 7 01-24-2005 05:31 PM
cvswinex driving me insane araldit Linux - Newbie 0 07-02-2004 05:05 PM
Sendmail is driving me insane. Please help me. ecroskey Linux - Newbie 1 03-02-2003 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration