Ubuntu Edgy, chinese input in en_US.UTF8 local, why fcitx is better than scim.
Saturday, 25. November 2006, 19:13:03
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:
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.
This is the fonts you might interested in
It should be easy obtain in your repo, if it doesn't visit http://ubuntuguide.org/wiki/Ubuntu_Edgy.
Okay, steps bellow are important.
Next,
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.
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.
This is what I do, first I backup ~/.fcitx/config then I open the file with gedit.
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.
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.














Anonymous # 25. November 2006, 22:38
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
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