Fedora Gnome下fcitx微信无法中文输入问题
原因分析
应该是由于微信使用的QT框架,需要指定下。
处理方法
sudo nano /usr/share/applications/wechat.desktop
# 主要修改Exec这行
[Desktop Entry]
Name=wechat
Name[zh_CN]=微信
Exec=env XMODIFIERS=@im=fcitx GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx /usr/bin/wechat %U
StartupNotify=true
Terminal=false
Icon=/opt/wechat/icons/wechat.png
Type=Application
Categories=Utility;
Comment=Wechat Desktop
Comment[zh_CN]=微信桌面版
还需要配置环境变量:
mark@fedora:~$ cat ~/.xprofile
# ~/.xprofile
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export GLFW_IM_MODULE=fcitx
mark@fedora:~$ cat ~/.profile
# ~/.profile
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export SDL_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export GLFW_IM_MODULE=fcitx
重启解决。