Fcitx

From Gentoo Wiki
Jump to: navigation, search
External resources

Fcitx (Flexible Context-aware Input Tool with eXtension support) [ˈfaɪtɪks] is an input method framework with support for many languages and scripts.

Installation

Install app-i18n/fcitx:

→ Information about USE flags
USE flag Default Recommended Description
X Yes Adds support for X11
autostart Yes Yes Enable xdg-compatible autostart of fcitx
cairo Yes Yes Enable support for the cairo graphics library
debug No Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
enchant Yes Yes Use app-text/enchant for text prediction
gtk No Yes Install GTK2 IM module
gtk3 No Install GTK3 IM module
icu No Enable ICU (Internationalization Components for Unicode) support, using dev-libs/icu
introspection No Enable GObject Introspection
lua No Enable Lua scripting support
nls No Adds Native Language Support (using gettext - GNU locale utilities)
opencc No Enable OpenCC for Chinese Transform
pango Yes Yes Enable support for x11-libs/pango
qt4 No Yes Install Qt4 IM module
snooper No Enable Key Snooper for GTK app
static-libs No Build static libraries
table Yes Adds support for table-based IM systems like Wubi, Erbi
test No Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
xml Yes Add support for XML files
Note
It is strongly recommended to add the gtk, gtk3 and qt4 USE flags when you have applications using these toolkits.
root # emerge --ask app-i18n/fcitx

Using Fcitx

In order to use Fcitx in X, you need to add these environment variables and export them:

If you use GDM, KDM or LightDM to login, add them to ~/.xprofile. If you use startx, SLiM, etc. to login, add them to ~/.xinitrc.

File~/.xprofile or ~/.xinitrc

export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=<module>
export GTK_IM_MODULE=<module>

If you installed with gtk, gtk3 or qt4 USE flags <module> will be fcitx, otherwise it should be xim.

It is recommended to start the D-Bus session bus before Fcitx starts. Add these to the beginning of your X startup file (~/.xprofile or ~/.xinitrc):

File~/.xprofile or ~/.xinitrc

eval "$(dbus-launch --sh-syntax --exit-with-session)"
Warning
If you want to use Fcitx in X, your locale cannot be C or POSIX.

Configuration

You can edit Fcitx's configuration file at ~/.config/fcitx/config.

Also, there are GUI tools to configure Fcitx. You can install app-i18n/fcitx-configtool (based on gtk2 or gtk3) or app-i18n/kcm-fcitx (based on KDE) to use them.

Frontend

Other than the built-in classic UI, there is also a frontend which integrates into KDE well, called Kimpanel, included in kde-base/kdeplasma-addons. The dbus USE flag must be enabled to use Kimpanel. Just add the kimpanel plasmoid to your plasma panel and fcitx will switch to it by itself.

Specific Language Support

Chinese

Fcitx itself has built-in pinyin support. If you enable the table USE flag, you will have multiple table-based input methods, such as WuBi, Ziranma.

You can install app-i18n/fcitx-cloudpinyin to have better results in your candidate words list.

The built-in pinyin use a simple algorithm, and there are other pinyin input methods using other algorithms. You can install app-i18n/fcitx-sunpinyin, app-i18n/fcitx-libpinyin, or app-i18n/fcitx-rime to use those.

For Bopomofo support, you can install app-i18n/fcitx-chewing or app-i18n/fcitx-libpinyin.

For Cangjie, Boshiamy support, you can install app-i18n/fcitx-table-extra.

Japanese

Install app-i18n/fcitx-anthy.

Korean

Install app-i18n/fcitx-hangul.

Vietnamese

Install app-i18n/fcitx-unikey.