gtk-query-immodules-2.0
Query GTK+ input method modules
SYNOPSIS
gtk-query-immodules-2.0 [--update-cache] [PATH...]
PARAMETERS
--help
Display usage help and exit
--update-cache
Update system immodules.cache file instead of stdout
--version
Display version information and exit
PATH...
Directories to scan for .so modules (defaults to GTK+ paths)
DESCRIPTION
gtk-query-immodules-2.0 is a utility in the GTK+ 2.0 toolkit that scans directories for input method (IM) modules, which enable text input support for complex scripts and languages like Chinese, Japanese, Korean, and others via virtual keyboards and converters.
It examines shared libraries (.so files) in specified or default paths, extracts module metadata using dynamic loading, and outputs structured text listing each module's file path, name, description, supported languages (comma-separated), and library name.
This output generates the immodules.cache file, allowing GTK+ applications to load modules efficiently at runtime without repeated directory scans, improving startup performance and internationalization.
Typically invoked during packaging or installation (e.g., post-install scripts) with --update-cache to populate system-wide cache at $libdir/gtk-2.0/$version/$gtk_binary_version/immodules.cache. If no paths given, it uses standard GTK+ directories like /usr/lib/gtk-2.0/2.10.0/immodules.
Essential for GTK+ 2.x apps supporting diverse input methods, but note GTK+ 2.0's age.
CAVEATS
Deprecated: GTK+ 2.0 unmaintained since ~2011; migrate to GTK 3/4. Requires write access for cache updates. Fails silently on invalid modules.
OUTPUT FORMAT
One line per module:
file_path ModuleName "Description" "zh,ko,ja" "libname.so"
USAGE EXAMPLE
gtk-query-immodules-2.0 --update-cache
gtk-query-immodules-2.0 /usr/lib/gtk-2.0/*/immodules/ > immodules.cache
HISTORY
Introduced in GTK+ 2.0 (2002) for IM support; evolved through 2.x (to 2011). Replaced by versionless gtk-query-immodules in GTK+ 3.0+. Used in distro packaging for cache generation.
SEE ALSO
gtk-query-immodules(1), gdk-pixbuf-query-loaders(1), gtk-update-icon-cache(1)


