背景

loong64架构的安同操作系统中安装微信后,无法使用中文输入法。

解决方法

1、编辑微信的快捷方式。

sudo vim /usr/share/applications/wechat.desktop

2、将正确的环境变量添加进去。
原来:

[Desktop Entry]
Name=wechat
Name[zh_CN]=微信
Exec=/usr/bin/wechat %U
StartupNotify=true
Terminal=false
Icon=/usr/share/icons/hicolor/256x256/apps/wechat.png
Type=Application
Categories=Utility;
Comment=Wechat Desktop
Comment[zh_CN]=微信桌面版

env GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx添加到Exec后面,如下所示:

[Desktop Entry]
Name=wechat
Name[zh_CN]=微信
Exec=env GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx /usr/bin/wechat %U
StartupNotify=true
Terminal=false
Icon=/usr/share/icons/hicolor/256x256/apps/wechat.png
Type=Application
Categories=Utility;
Comment=Wechat Desktop
Comment[zh_CN]=微信桌面版

3、保存,重启微信,问题解决。

标签: none

评论已关闭