Skip navigation.

Beyond the Sky

The place where surface stop and share the experience of life

Ubuntu Edgy, chinese input in en_US.UTF8 local, why fcitx is better than scim.

I am going to write this fast, because now I am very sleepy.
Scim is simple to setup, Its GUI is also nicer, but got one problem. I cannot write chinese directly in firefox. Maybe it have solution, but for so far, I can't find one. Tell me if you have one.

"Updates: scim do support input in firefox" thanks to Yeam
You need to set scim as a default input:
im-switch -s scim



So fcitx is another alternative to try out. To install fcitx is easy, but to make it work at en_US.UTF is a bit tricky. Hope this will solves your problem

Okay, first, you need to download chinese fonts, locale support, which do some google to find it, if you haven't done that. Bellow are those dependencies needed, I am not sure whether it will fully works. So let me know, if you have trouble, or it works fine.

P.S. The dependencies here is quite large, so ignore first, if it doesn't works, come back and install the dependencies.
apt-get install language-pack-zh language-support-zh zh-autoconvert


This is the fonts you might interested in
apt-get install  xfonts-intl-chinese xfonts-intl-chinese-big ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gkai00mp


It should be easy obtain in your repo, if it doesn't visit http://ubuntuguide.org/wiki/Ubuntu_Edgy.

Okay, steps bellow are important.
apt-get install fcitx im-switch


Next,
sudo im-switch -s fcitx

I have no idea what it does, I think it is important to do that. Tell me if you know why need to do that.

Edit /etc/gtk-2.0/gtk.immodules and search for the keyword "xim".
p.s. I uses vi, you can use nano or gedit.
"/usr/lib/gtk-2.0/2.4.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk20" "/usr/share/locale" "[B]en:[/B]ko:ja:th:zh"

Add in "en" which indicate in Bold

The problem bellow might not happen at your side,
I need to edit the file ~/.fcitx/config, add in the "chinese font" I use, but when I view the file, it is unreadable. ( view the file using vi or gedit)

So I uses firefox to view the file, type this into your firefox.
/home/yourname/.fcitx/config


This is what I do, first I backup ~/.fcitx/config then I open the file with gedit.
cp ~/.fcitx/config{,-bk}
gedit ~/.fcitx/config


Earse all unreadable symbolz, copy and paste the readable config from firefox then add in the chinese fonts I want and save the file. Gedit will prompt the error saving file, and ask you to select locale, ADD a NEW locale which is gb2312 and save it.

Relogin and It should be working. To prove that, I am now write some chinese on the spot, 你好! 我要睡了.

In case it doesn't, maybe i miss some steps, let me know.

Ref: http://dengpeng.name/blog/2006/10/16/fcitx-with-en_us-new-method/

Although fcitx interface is ugly, but I like it because it is lightweight and most important is it allows me to type chinese word directly to firefox!

I wanna hit the sack now .... so tired.

ASCII Ubuntu LogoLatest Screen shot!

Comments

Anonymous 25. November 2006, 22:38

Felix Leong writes:

Funny why you can't, because I didn't have any problems with the SCIM/Firefox combo. But to be fair, I'm using Gentoo and probably I had done something which might have made it work in some way or the other.

Anonymous 26. November 2006, 01:11

Yeam writes:

NO, SCIM can support Firefox.
This is because unlike some Linux Distro, Ubuntu default input method is not SCIM.
We only need to input the following command to input chinese in firefox

#this make scim as default ime for en_US locale
im-switch -z en_US -s scim

Log-out, Restart

mysurface 26. November 2006, 02:39

Alright! Thankyou guys. I should try it out!.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

Type the two words displayed in the image below:


Smilies

July 2009
S M T W T F S
June 2009August 2009
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31