Version 3 (modified by trac, 17 years ago) ( diff )


Input Methods

European users input national characters using keyboard layouts configured via XKB. BLFS already contains an example for Russia. However, XKB doesn't allow input of characters needed for East Asian languages. Special "Input Method" software is needed for this purpose.

While the hint on Setting up Japanese input and output for terminals and applications is still valid, approaches outlined there are out of fashion now. The setup below has the advantage of requring no system-wide daemons.

The following software is needed:

  • Anthy: converts Hiragana text to Kana Kanji mixed text. Needed for Japanese input only, otherwise it is optional.
  • SCIM. You may need the following modules:
    • SCIM itself: the daemon that provides the framework for text input (depends upon GTK+ 2.x)
    • scim-hangul: module that provides Korean input (depends on SCIM)
    • scim-pinyin: module that provides Simplified Chinese input (depends on SCIM)
    • scim-tables: module that provides table-driven input methods (many languages, depends on SCIM)
    • scim-input-pad: allows European users to enter various special, e.g., mathematical, characters (depends on SCIM)
  • SCIM-Anthy: module that provides Japanese input using the Anthy library (depends on SCIM and Anthy)
  • TTF fonts covering the desired languages: Chinese, Chinese (older, known to Fontconfig out of the box), Japanese, Korean.
  • Possibly other packages, but the above should be sufficient for Chinese, Japanese and Korean.

Build each of the packages you need in the order given above, with the following commands:

# As user:
./configure --prefix=/usr --sysconfdir=/etc

# As root:
make install

As root, update the GTK+2 input method module list:

gtk-query-immodules-2.0 | sed 's,ko:ja:th:zh,,' >/etc/gtk-2.0/gtk.immodules

The sed substitution above makes SCIM (instead of XIM, that would map to SCIM anyway, but has the potential of locking up the entire X session due to one buggy application) the preferred module for Chinese, Japanese, Thai and Korean.

The steps above would make SCIM available to all GTK+2 applications in the context menu of any editable field. To make SCIM available to non-GTK applications, the following steps are required:

Add the following line to /etc/profile.d/i18n:


Arrange the following command to start up in your X session before everything else:

scim -d

This would show the keyboard icon in the system tray area of your window manager. Click it or press Ctrl+Space to activate SCIM, press Ctrl+Space again to deactivate.

Japanese testcase from Ctrl+Space gakkou Space Enter Ctrl+Space should produce 学校 (school).


Note: See TracWiki for help on using the wiki.