Get fcitx5 input into a Qt 6 app that ships its own Qt
Confirmed /usr/lib/environment.d/10-omarchy-fcitx.conf sets QT_IM_MODULE=fcitx, but it is a packaged file owned by omarchy-settings 4.0.4-1, not a copy made at install. Qt 6.8 qplatforminputcontextfactory.cpp reads QT_IM_MODULES first and falls back to QT_IM_MODULE only when it is empty, as stated. The fcitx wiki states QT_IM_MODULES arrived in 6.7, recommends wayland;fcitx for Qt 6.8.2+, and that Qt below 6.7 only speaks text-input-v2/v4. Hyprland v0.56.2 source has TextInputV1, TextInputV3 and InputMethodV2 and no V2, so the Qt 5 caveat holds. The uwsm README (0.26.7 installed) confirms it sources ~/.config/uwsm/env.d/*, and 10-omarchy names that directory as preferred. Gap: the wayland IM module only works when the app itself runs on the Wayland platform. Omarchy sets QT_QPA_PLATFORM=wayland;xcb, and a bundled Qt without its Wayland platform plugin (common, per the fcitx wiki) silently runs on xcb, where this fix does nothing. The fix added no check for that, so I added one. Not exercised: an actual bundled-Qt app.
Symptom
Fcitx5 works in kitty, Firefox, Chromium and every Qt app from the repos, but in one app that ships its own Qt libraries (an AppImage, or a vendor binary under /opt) Ctrl+Space does nothing and no candidate window ever appears. You cannot type Chinese, Japanese or Korean there at all. fcitx5-diagnose reports nothing wrong.
Cause
Omarchy 4 sets QT_IM_MODULE=fcitx for the whole session in /usr/lib/environment.d/10-omarchy-fcitx.conf, which the omarchy-settings package installs. That tells Qt to load exactly one input context plugin, the fcitx one. Qt from the repos finds it because fcitx5-qt installs it into the system plugin directory. An app that bundles its own Qt only searches its own plugin directory, and if the vendor did not ship libfcitx5platforminputcontextplugin.so, Qt loads no input method at all. It does not fall back to the Wayland text-input protocol, which Hyprland 0.56 implements (text-input-v3) and which needs no plugin.
Qt 6.7 added QT_IM_MODULES (plural), a semicolon-separated list that is tried in order. Qt's QPlatformInputContextFactory::requested() reads QT_IM_MODULES first and only looks at QT_IM_MODULE when the plural one is empty, so setting it lets a bundled Qt fall through to wayland while system Qt still gets fcitx. The wayland module only works when the app is itself running as a Wayland client. Omarchy sets QT_QPA_PLATFORM=wayland;xcb, so a bundled Qt that also lacks its Wayland platform plugin runs on XWayland, and there neither wayland nor a missing fcitx plugin helps. The fcitx project recommends wayland;fcitx for Qt 6.8.2 and later, because text-input-v3 had important fixes in the 6.8 series. Qt older than 6.7 ignores the plural variable.
Fix
- Confirm the app bundles Qt and lacks the fcitx plugin (adjust the path):
find /opt/<app> -name 'libQt6Core.so*' -o -name 'libfcitx5platforminputcontextplugin*' -o -name 'libqwayland*'
A libQt6Core.so with no fcitx plugin beside it is this problem. The file name of libQt6Core.so.6.x.y gives the Qt version.
- Confirm the app runs as a Wayland client. Start it, then:
hyprctl clients -j | jq -r '.[] | "\(.class) xwayland=\(.xwayland)"'
If it shows xwayland=true (usually because no libqwayland* plugin was found in step 1), this fix cannot work. The app is on XWayland with no fcitx plugin, and the only fixes are a vendor build that ships the fcitx plugin or one that ships Qt's Wayland plugin.
- Try it for one launch first:
QT_IM_MODULES='wayland;fcitx' /opt/<app>/<binary>
- Make it permanent. **Omarchy 4**: Omarchy's uwsm env file (
/usr/share/uwsm/env.d/10-omarchy) names~/.config/uwsm/env.d/as the preferred place for user overrides, and uwsm sources every file in it:
mkdir -p ~/.config/uwsm/env.d
printf '%s\n' "export QT_IM_MODULES='wayland;fcitx'" > ~/.config/uwsm/env.d/20-qt-im
Leave Omarchy's QT_IM_MODULE=fcitx alone. Qt 5 apps and Qt older than 6.7 still need it.
**Plain Arch with uwsm**: the same file works. Without uwsm, add QT_IM_MODULES=wayland;fcitx to ~/.config/environment.d/qt-im.conf.
- Log out and back in, because the variable must reach the systemd user environment before the launcher sees it.
- If the bundled Qt is between 6.7 and 6.8.1, fcitx recommends against text-input-v3 on it. Scope the override to that app with a desktop entry instead of the session file, and accept the known preedit bugs, or ask the vendor to ship the fcitx plugin.
A bundled **Qt 5** app with no fcitx plugin is not fixed by this. Qt 5 has no text-input-v3 support and Hyprland does not implement text-input-v2.
Verify
systemctl --user show-environment | grep QT_IM_MODULES prints QT_IM_MODULES=wayland;fcitx after logging back in. In the app, Ctrl+Space switches input method and a candidate window appears while typing.