From Gentoo Wiki
Jump to: navigation, search

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


USE flags

Optional USE flags for app-i18n/fcitx:
USE flag (what is that?) Default Recommended Description
X Yes Add support for X11
autostart Yes Yes Enable xdg-compatible autostart of fcitx
cairo Yes Yes Enable support for the cairo graphics library
dbus Yes Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
debug No Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see Backtraces
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 Yes Add 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
static-libs No Build static versions of dynamic libraries as well
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
It is strongly recommended to add the gtk, gtk3, and qt4 USE flags when applications are installed that make use of these toolkits.


root #emerge --ask app-i18n/fcitx

Using Fcitx

In order to use Fcitx in X, the following environment variables must be added to start up files and exported:

When using login managers such as GDM, KDM or LightDM to start the X server add them to the ~/.xprofile file. When using the startx command or SLiM to login, add them to the ~/.xinitrc file.

If the gtk, gtk3 or qt4 USE flags where used upon installation, <module> (in the examples below) will be fcitx, otherwise it should be xim.

FILE ~/.xprofile
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=<module>
export GTK_IM_MODULE=<module>

Remember, make ~/.xinitrc look like the example below only if using startx or SLiM to start the X server:

FILE ~/.xinitrc
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=<module>
export GTK_IM_MODULE=<module>

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

FILE ~/.xprofile or ~/.xinitrc
eval "$(dbus-launch --sh-syntax --exit-with-session)"
FILE ~/.xinitrc
eval "$(dbus-launch --sh-syntax --exit-with-session)"
When desiring to use Fcitx in X, the system locale cannot be C or POSIX.


Edit Fcitx's configuration file at ~/.config/fcitx/config

Also, there are GUI tools to configure Fcitx. Install app-i18n/fcitx-configtool (based on GTK2 or GTK3) or app-i18n/kcm-fcitx (based on KDE) to use them.


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 flag must be enabled to use Kimpanel. Once installed, add the kimpanel plasmoid to the plasma panel and fcitx will switch to it by its self.

Specific Language Support


Fcitx itself has built-in pinyin support. Enabling the table USE flag will provide multiple table-based input methods such as WuBi and Ziranma.

Install app-i18n/fcitx-cloudpinyin to have better results in the candidate words list.

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

For Bopomofo support app-i18n/fcitx-chewing or app-i18n/fcitx-libpinyin can be installed.

For Cangjie or Boshiamy support install app-i18n/fcitx-table-extra.


Install app-i18n/fcitx-anthy:

root #emerge --ask app-i18n/fcitx-anthy


Install app-i18n/fcitx-hangul:

root #emerge --ask app-i18n/fcitx-hangul


Install app-i18n/fcitx-unikey:

root #emerge --ask app-i18n/fcitx-unikey