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
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_0.5.23_amd64.AppImagefrom GitHub releasesibus-daemon --panel disable --xim, started by GNOME)LANG=en_US.UTF-8, XSettingsgtk-im-module=ibusCause
apprun-hooks/linuxdeploy-plugin-gtk.shunconditionally exportsThe 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 theibusmodule named by XSettings, doesn't find it in the cache, and silently falls back togtk-im-context-simple, which never talks to IBus.Reproduced outside Buzz with a minimal GTK 3 script (create a
GtkIMMulticontext,focus_in(), printget_context_id()):GTK_IM_MODULE_FILEibusgtk-im-context-simpleWorkaround
Force the bundled XIM module, which talks to IBus's XIM server:
(
LD_LIBRARY_PATHwas 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:GTK_IM_MODULE_FILEwhen 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$XDG_RUNTIME_DIR, orim-ibus.soand the fcitx5 GTK 3 module.origin/main(77729ab) has no IM handling infix-appimage.sh, so this likely still reproduces there.Possibly related