Install Fcitx Chinese Input Method in Ubuntu

Source: Internet
Author: User

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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.