Ubuntu Edgy, chinese input in en_US.UTF8 local, why fcitx is better than scim.
Saturday, November 25, 2006 7:13:03 PM
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.













