Skip to content

[Bug][Linux] AppImage: IBus input methods don't work — bundled immodules.cache has no im-ibus, GTK falls back to gtk-im-context-simple #7792

Description

@pfoot

Describe the bug

In the Linux AppImage, CJK input through IBus doesn't reach any text field. With ibus-hangul, English typing works, but in Hangul mode keystrokes produce nothing and the Hangul/English toggle has no effect. Other GTK apps in the same session work normally.

Environment

  • Buzz desktop 0.5.23, Buzz_0.5.23_amd64.AppImage from GitHub releases
  • Ubuntu 24.04, GNOME on X11, NVIDIA
  • IBus 1.5.29 + ibus-hangul (ibus-daemon --panel disable --xim, started by GNOME)
  • LANG=en_US.UTF-8, XSettings gtk-im-module = ibus

Cause

apprun-hooks/linuxdeploy-plugin-gtk.sh unconditionally exports

export GTK_IM_MODULE_FILE="$APPDIR//usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache"

The bundled cache lists only GTK's built-in modules (am-et, broadway, cedilla, cyrillic-translit, inuktitut, ipa, multipress, thai, ti-er, ti-et, viqr, wayland, xim) — no im-ibus.so, and no fcitx module either. GTK asks for the ibus module named by XSettings, doesn't find it in the cache, and silently falls back to gtk-im-context-simple, which never talks to IBus.

Reproduced outside Buzz with a minimal GTK 3 script (create a GtkIMMulticontext, focus_in(), print get_context_id()):

GTK_IM_MODULE_FILE chosen IM context
host default ibus
Buzz's bundled cache gtk-im-context-simple

Workaround

Force the bundled XIM module, which talks to IBus's XIM server:

GTK_IM_MODULE=xim \
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules \
./Buzz_0.5.23_amd64.AppImage

(LD_LIBRARY_PATH was needed in my host-GTK test because the cache names modules by bare filename; it may be unnecessary with the bundled GTK.)

Hangul input then works, but only off-the-spot: each syllable is composed in a popup outside the field and inserted when it commits. That is usable but noticeably worse than inline preedit in native GTK apps.

Suggested fix

Similar in spirit to #6971 (pointing the AppImage at host GStreamer plugins): let the bundled GTK see the host's IM modules instead of shadowing them, e.g. in desktop/scripts/fix-appimage.sh:

  • don't override GTK_IM_MODULE_FILE when the host has a cache (/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache, /usr/lib64/gtk-3.0/3.0.0/immodules.cache, …), or
  • generate a merged cache (host entries + bundled) at startup under $XDG_RUNTIME_DIR, or
  • bundle im-ibus.so and the fcitx5 GTK 3 module.

origin/main (77729ab) has no IM handling in fix-appimage.sh, so this likely still reproduces there.

Possibly related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions