FCITX (Free Chinese Input Toy of X) is a collection of Simplified Chinese input methods for Linux.
Using FCITX to input Chinese
Before you can make use of FCITX for input, you have to setup some environment variables. It is quite simple.
- Open the Template:Filename or (.profile?) file in your home directory and add following lines:
#setup XIM environment, need not if use SCIM as gtk-immodules export GTK_IM_MODULE=xim export QT_IM_MODULE=xim export XMODIFIERS="@im=fcitx"
- Re-login to make such environment effective.
After you re-login, open your favorite terminal, type:
To see if fcitx is working correctly, open an application such as leafpad and press CTRL+Space to invoke FCITX and input some words.
If everything goes well, you may want to start FCITX automatically whenever you start X.
killall fcitx fcitx &
That is it.
If you use any type of XDM (gdm for example), you should set up such environment in Template:Filename instead of above two files.
Fcixt with KDM
To have FCITX start automatically with KDM, add the following lines to Template:Filename
LANG=zh_CN.UTF-8 export LANG LC_CTYPE=zh_CN.UTF-8 export LC_CTYPE export XMODIFIERS="@im=fcitx" #pkill fcitx fcitx&
Add following lines to Template:Filename
export XIM=fcitx export XIM_PROGRAM=fcitx export GTK_IM_MODULE=xim export QT_IM_MODULE=xim export XMODIFIERS="@im=fcitx"
CTRL+Space does not work
If you cannot invoke FCITX by pressing the CTRL+Space keyboard combination, but FCITX runs in background without problem, please check your locale:
[ganlu@A ~]$ locale LANG=en_US LC_CTYPE=en_US.utf8 LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE=C LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_PAPER="en_US" LC_NAME="en_US" LC_ADDRESS="en_US" LC_TELEPHONE="en_US" LC_MEASUREMENT="en_US" LC_IDENTIFICATION="en_US" LC_ALL=
Above is what I get from command 'locale', so you can know for sure FCITX does support utf8 (en_US.utf8 at least) locale without problem. If your locale output shows you having set up a utf8 locale correctly, then I suggest you check if your bash does support utf8 locale:
$ locale -a
to see if your current locale in there, if not, do not worry, make it yourself:
$ localedef -vci en_US -f utf8 en_US.utf8
then, relogin to see if that works. If terrible things continue, I have to suggest you try any locale with "zh_CN", for example:
For more information about locale, please find it in Google.
Characters are displayed as blank boxes
If you can trigger FCITX but the characters on it are displayed as blank boxes, open Template:Filename and change the line:
显示字体(中)=AR PL ShanHeiSun Uni
I am using uming font here, so be sure you have installed Template:Package Official. Restart FCITX:
$ pkill fcitx $ fcitx &
If you have no config file after setup 3.6.3, you could generate it by:
All configuration of FCITX can be found in Template:Filename, however you had better understand Chinese. :- )