im-config for Debian                     Osamu Aoki <osamu@debian.org>

This is updated for direct wayland support by ibus. (2026/03)

For modern DE such as GNOME(Wayland) or Plasma/KDE(Wayland), im-config
can be safely removed and let the DE configure input method(IM).

* GNOME 49 on (Wayland) -- integrated.
  Install one of the followings:
  * ibus framework: ibus-<your_input_method_engine_name> package
  * fcitx5 framework: fcitx5-<your_input_method_engine_name> package
     * fcitx5 framework offers ibus-compatible API
  Add and chose your IM engine in input source configuration of system
  setting.

* KDE Plasma DE (Wayland)
  Install one of the followings:
  * ibus framework: ibus-<your_input_method_engin_name> package
  * fcitx5 framework: fcitx5-<your_input_method_engin_name> package
     * fcitx5 framework offers ibus-compatible API
  Select an input method framework as the virtual keyboard

UNTESTED_TIPS: (related to https://bugs.debian.org/1052005 )
     For KDE, custom environment variables can be set in:
        $HOME/.config/plasma-workspace/env/path.sh
     If virtual keyboard setup has any issues, try something like:
       GTK_IM_MODULE=ibus
       QT_IM_MODULE=ibus
       QT_IM_MODULES=wayland,ibus
    Execute set up script such as ibus-setup to set IM engin

This im-config is still needed to configure IM frameworks on X11 based
DE.  Debian provides many old such DEs.

NOTE:
Under the good old X11 DE system, we could rely on /etc/X11/Xsession.d/
to initialize the IM framework.  Automation of this is the original
and current scope of this im-config package.

Under the wayland DE system, there is no single established common hook
script location.  Initially for GNOME, attempts to configure it from
im-config was made using /etc/profile.d/* .  But GNOME doesn't need any
help from im-config.  Also as I tested, KDE doesn't use /etc/profile.d/*
nor /etc/environment.d/* . So no stable method to set up environment
variables for KDE. 

Thus I decided to disable all im-config actions under Wayland.

If any other wayland based DEs have problem with this decision on IM
framework setup, please file a bug to the im-config package with common
hook script location proposal.

=============================================================================

If you want to disable im-config and set up IM without any interference from
im-config, set im-config to "none".

Please also read

* https://wiki.debian.org/Keyboard
* https://www.debian.org/doc/manuals/debian-reference/ch08.en.html#_the_keyboard_input

The modern keyboard input to a GUI application has 3 components:

* Linux kernel to accept incoming signal from connected input devices
  including keyboard.
* Input method (IM) framework to generate a sequence of characters from
  data accepted by Linux kernel.
* Application to read a sequence of characters from IM via specified
  data path.

The IM framework can generate sequence of over 130,000 characters in the
ISO/IEC 10646 using inputs using less than 90 keys.  The actual data
flow conversion is offloaded from IM framework to IM engines.  Simple IM
engines are ones which generate accented Latin characters (This can
emulate xmodmap(1) based mapping).  More elaborate IM engines are ones
which generate CJK (Chinese, Japanese, Korean) characters.  There are
IM engines supporting inputs of Arabic, Cyrillic, Ethiopic, Georgian,
Greek, Hebrew, Indic, Thai, ...  characters.

There are a few popular general purpose IM frameworks:

* iBus   -- default for GNOME Desktop (Yes, I use this and recommended)
* Fcitx5 -- good alternative (popular by Chinese users)
* uim    -- good alternative (used by Japanese task as of 2025)

You can install all these IM framework packages simultaneously but you
can activate only one IM framework for one desktop session.

This im-config package is a meta-framework to manage these IM frameworks
by offering:

* automatic selection of system wide best IM framework choice
* manually configurable system wide IM framework choice
* automatic selection of user's best IM framework choice
* manually configurable user's best IM framework choice

If only one IM framework is installed, that is used automatically as the
IM framework choice.

The activation of IM framework involves staring daemon for communication
and setting up pertinent environment variables to let the application
know data protocol and connection (IM framework specific data protocol
over dBus connection, or xim data protocol over X connection) to use to
obtain input data sequence.

The activation of IM engines is out of scope for this im-config package.
You must activate IM engines using configuration mechanism offered by
the IM framework.  (Some IM engine packages come with installation
script to activate it upon installation.)

In order to ensure im-config settings and IM engine setting to be
updated, you should restart the session or reboot the system.  (Yes, you
may be able to use systemctl but it is prone for problems.)

NOTE:
When adding support for Wayland GUI environment, GNOME decided to
integrate iBus IM infrastructure tightly by hard-coding environment
variable setting and start of daemon process in its startup code and by
writing its own IM engine configuration mechanism as a part of
"Settings".  So im-config does nothing for iBus under GNOME.

For specific IM environment set up, see Debian wiki pages.
* iBus   -- https://wiki.debian.org/I18n/ibus
* Fcitx5 -- https://wiki.debian.org/I18n/Fcitx5
* uim    -- https://wiki.debian.org/I18n/uim

You should consult the im-config(8) manage for the details of this
command behavior.

For the technical inner details of im-config, please read
README.internal in this source code.

 -- Osamu Aoki <osamu@debian.org>,  Wed, 04 Mar 2026 04:51:48 +0000
# vim: set tw=72 sts=4 sw=4 ai si et:
