I encountered a issue when using fcitx5 in Steam. I’ve successfully dealt with it, so I’m putting the solution here for anyone’s reference in similar situation.
The environment is Fedora 44 KDE. I choose Rime as Chinese input method. First install by
sudo dnf in fcitx5 fcitx5-rime
Then I add rime IME from right clicking the keyboard layout entry in system tray.
Following fcitx5 wiki, I set environment variable XMODIFIERS=@im=fcitx (I set it in ~/.config/environment.d/90-fcitx.conf) while no GTK_IM_MODULE, QT_IM_MODULE, SDL_IM_MODULE. And in KDE setting, under Virtual Keyboard I choose Fcitx 5.
After these setup, in native Wayland applications the IME is working smoothly. To make Chinese IME works in Steam (I’m using RPM fusion version throughout), following some other guides and I set LANG=zh_CN.UTF-8 for Steam. But still IME is just not working in Steam.
Since Steam is running through XWayland, I check the XMODIFIERS env in a terminal and find
> $ echo $XMODIFIERS
@im=none
Basically our env setting in environment.d is not working. So I manually add the env directly by
XMODIFIERS=@im=fcitx LANG=zh_CN.UTF-8 steam
yet still the IME is not available.
Further investigation shows that
> $ xprop -root XIM_SERVERS
XIM_SERVERS(ATOM) = @server=ibus, @server=none
so it seems simply setting XMODIFIERS would be no use.
In the end, I find the issue is somehow related to imsettings package. I don’t know exactly why and how it mess with our IME setting, but simply removing it
sudo dnf rm imsettings
saves the day. The XMODIFIERS is set correctly and xprop -root XIM_SERVERS include the fcitx5 server (no need to remove the pre-installed ibus). And fcitx5 is now functioning correctly in Steam.