1. I installed Ubuntu in a pure English environment. First install Fcitx:
Sudo apt-get install fcitx im-switch
Setting Process:
Sudo im-switch-s fcitx-z all_ALL
2. edit/etc/gtk-2.0/gtk. immodules (if any) or/usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0. in the immodules file, add the en in the xim local, that is,:
"Xim" "X Input Method" "gtk20" "/usr/share/locale" "ko: ja: th: zh"
Changed:
"Xim" "X Input Method" "gtk20" "/usr/share/locale" "en: ko: ja: th: zh"
3. Create an empty text file/etc/X11/Xsession. d/95fcitx_start
Sudo gedit/etc/X11/Xsession. d/95fcitx_start
Paste the following content:
Export LC_CTYPE = zh_CN.UTF-8
Export XMODIFIERS = @ im = fcitx
Export XIM = fcitx
Export XIM_PROGRAM = fcitx
Fcitx
And grant the execution permission:
Sudo chmod + x/etc/X11/Xsession. d/95fcitx_start
Last run:
Sudo apt-get autoremove
Note:
1. In a pure English environment (without any Chinese support for security protection), the fcitx still displays the square after the above modification. This means that your computer does not generate the cn environment, you can make the following changes to generate the cn environment.
Sudo gedit/var/lib/locales/supported. d/zh
Add the following content:
Zh_SG.UTF-8 UTF-8
Zh_HK.UTF-8 UTF-8
Zh_TW.UTF-8 UTF-8
Zh_CN.UTF-8 UTF-8
Zh_CN.GB2312 GB2312
Zh_CN.GBK GBK
Zh_CN.GB18030 GB18030
Zh_HK.Big5 Big5
Zh_TW.Big5 Big5
Then execute:
Sudo locale-gen
Generation may take several minutes. In this case, fcitx can normally display the text on the status bar in an English-only environment.
Author: Dongting scattered Source: http://phinecos.cnblogs.com/