After deeper investigation, I found the root cause on my system (Pop!_OS). There was a system-level script located at /etc/profile.d/pop-im-ibus.sh that was forcefully overriding the environment variables to ibus upon login, which neutralized the proposed adaptive script.
Since the issue stems more from specific distribution configurations rather than a general flaw in the Steam launcher, and my proposed script might not be robust enough to counter such system-level overrides, I am closing this request for now.
Thank you for the attention
SDL_IM_MODULEx1 2025-12SDL_IM_MODULE=fcitxx1 2025-12SDL_IM_MODULE=ibusx1 2025-12
Description:
Currently, many Linux users (especially CJK users) encounter issues where Input Method Editors (IME) like Fcitx5 or IBus fail to work within the Steam client or games. This is often due to missing or mismatched environment variables (
GTK_IM_MODULE,QT_IM_MODULE,SDL_IM_MODULE).While users can manually set these in
/etc/environment, it often leads to conflicts or fails to load correctly across different desktop environments.Proposed Solution:
Modify the Steam launcher script (e.g.,
/usr/games/steam) to include an adaptive IME environment setup logic. This approach is inspired by the implementation used in the WeChat Linux client, which has proven to be robust and user-friendly.Suggested Code Implementation:
Adding a function like this to the beginning of the steam wrapper script:
Why this is better:
Non-destructive: It only exports variables if they are currently empty (-z), respecting user-defined overrides.
Adaptive: It automatically aligns GTK, QT, and SDL modules with the active XMODIFIERS framework.
Out-of-the-box experience: New Linux users won't need to struggle with command-line environment configurations to type in their native language.