Fcitx

From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.
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

USE flags

USE flags for app-i18n/fcitx Fcitx 5 is a generic input method framework

+X Add support for X11
+autostart Enable XDG-compatible autostart of Fcitx
+emoji Enable emoji loading for CLDR
+enchant Enable Enchant backend (using app-text/enchant) for spelling hinting
+keyboard Enable key event translation with XKB and build keyboard engine
+server Build a fcitx as server, disable this option if you want to use fcitx as an embedded library
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
presage Enable presage for word predication (not stable)
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
wayland Enable dev-libs/wayland backend

Note
It is strongly recommended to add the gtk2 or gtk3 USE flags when applications are installed that make use of these toolkits.

Emerge

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.

When using login managers such as LightDM to start the X server, add them to the ~/.xprofile file.

If the gtk2 or gtk3 USE flags were 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>

When using the startx command or SLiM to login, add them to the ~/.xinitrc file.

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

For KDE users, if these environment variables are not getting loaded either from ~/.xprofile or ~/.xinitrc, try adding them to a Plasma startup script, such as ~/.config/plasma-workspace/env/fcitx.sh.

Fcitx relies on the Dbus service to run. If it is a systemd init system, no additional configuration is generally required. Otherwise, you need to manually configure the operation of dbus. For details, refer to the Dbus entry.

Warning
When desiring to use Fcitx in X, the system locale cannot be C or POSIX.

Configuration

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

Configure Fcitx using graphical tools, install app-i18n/fcitx-configtool. For KDE settings integration, enable kcm USE flag.

Specific language support

Chinese

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-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.

Japanese

Note
See also: How to read and write in Japanese — how to read and write in Japanese on a non-Japanese system.

Install app-i18n/fcitx-anthy:

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

Korean

Install app-i18n/fcitx-hangul:

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

Vietnamese

Install app-i18n/fcitx-unikey:

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


See also

  • Dbus — an interprocess communication (IPC) system for software applications.
  • IBus — an open source input framework for Linux and Unix.

External resources