im-config
Configure input method for different locales
SYNOPSIS
im-config [ -a | -c | -d | -x | -s | -m ] [ -n im_prog ] [ -r im_prog ] [ -o filename ]
PARAMETERS
-a
Enables automatic mode. im-config attempts to automatically select the best available input method based on installed packages and locale settings.
-c
Starts the interactive configuration mode. This presents a curses-based menu (or a GUI dialog if available) allowing the user to choose their preferred input method from a list of installed options.
-d
Disables the input method configuration. This effectively prevents any input method from being loaded by im-config.
-x
Displays the current X Input Method (XIM) configuration, including the selected input method program and the environment variables that would be set.
-s
Shows a list of all input method programs currently supported and detected on the system.
-m
Initiates manual configuration mode. This advanced mode allows users to specify an input method not automatically detected or to fine-tune settings.
-n im_prog
Sets the specified input method program (e.g., 'ibus', 'fcitx') as the default. This is a non-interactive way to select an IM.
-r im_prog
Removes the specified input method program from the default configuration. Useful for reverting or cleaning up settings.
-o filename
Redirects the generated configuration output to the specified filename instead of the default user or system configuration files. Useful for testing or custom setups.
DESCRIPTION
im-config is a utility designed to simplify the setup and management of input method (IM) frameworks for the X Window System on Linux. It provides a standardized way for users to select their preferred IM system, such as IBus, Fcitx, SCIM, or UIM, ensuring that applications correctly load the chosen input method modules. The command manages crucial environment variables like XMODIFIERS, GTK_IM_MODULE, and QT_IM_MODULE, which are essential for input methods to function across various toolkits (e.g., GTK+, Qt). It aims to alleviate the complexities of manually configuring these settings, especially for new users or those switching between different IMs. im-config can operate in various modes, allowing for automatic configuration, interactive selection, disabling IMs, or displaying current settings, making it a flexible tool for both system administrators and end-users. It typically generates configuration files like ~/.xinputrc or modifies system-wide settings, ensuring that the selected input method is activated upon logging into a graphical session.
CAVEATS
Locale settings: Incorrect locale settings can prevent im-config from functioning correctly or displaying the desired input methods. Users should ensure their system locale is properly configured for the languages they intend to type.
X session startup: For the configuration to take effect, the user's X session typically needs to be restarted or the generated configuration file (e.g., ~/.xinputrc) must be sourced.
Program availability: The tool relies on the actual input method programs (like ibus-daemon, fcitx) being installed on the system; im-config itself does not install them.
HOW IT WORKS
im-config typically generates or modifies the ~/.xinputrc file in the user's home directory. This file is then sourced by X session managers (like startx or display managers like GDM, LightDM, SDDM) when an X session starts, ensuring that the XMODIFIERS, GTK_IM_MODULE, and QT_IM_MODULE environment variables are set correctly for the chosen input method.
SYSTEM-WIDE VS. USER-SPECIFIC
When run as a regular user, im-config configures settings for that specific user. When run with root privileges, it can modify system-wide defaults, typically by placing configuration snippets in /etc/X11/xinit/xinputrc.d/ or similar locations, which are then processed for all users on the system.
HISTORY
im-config was developed primarily within the Debian and Ubuntu ecosystems to standardize and simplify the process of setting up input methods for the X Window System. Before its introduction, configuring input methods often involved manual editing of environment variables and X startup scripts, which could be complex and error-prone. im-config provides a consistent user interface and automated backend processes to manage the selection and activation of various IM frameworks (like IBus, Fcitx, SCIM), aiming to make the desktop experience more accessible for users needing to type in multiple languages. Its development reflects a broader effort to improve internationalization and localization support in popular Linux distributions.