vufa / deepin-wine-wechat-arch

Tencent WeChat on Deepin Wine(com.qq.weixin.deepin) For Archlinux
https://aur.archlinux.org/packages/deepin-wine-wechat/
1.13k stars 58 forks source link

fcitx输入法无法上词 #12

Open gcell opened 5 years ago

gcell commented 5 years ago

如题先后测试了搜狗拼音和中州韵(均为fcitx),都无法上词。英文状态下直接输入英文是可以的,输入法开启状态下输入中文,候选词不会商品,混合输入英文也是一样,如输入则上屏结果为空。 先后尝试了rm -rf ~/.deepinwine/Deepin-WeChat 以及在run.sh中定义输入法环境变量都无效。 同样deepin的QQ无问题。

vufa commented 5 years ago

抱歉回复晚了,参照deepin-wine-tim#issue5试试,在Archlinux + kde上用搜狗输入法(fcitx)可以正常输入

kmvan commented 5 years ago

xfce fcitx 装上这些貌似没问题。 image

zerobikappa commented 5 years ago

抱歉回复晚了,参照deepin-wine-tim#issue5试试,在Archlinux + kde上用搜狗输入法(fcitx)可以正常输入

我试过还是不行,我分别尝试过在以下文件加入环境变量, /etc/environment $HOME/.pam_environment /opt/deepinwine/apps/Deepin-WeChat/run.sh 然后删除~/.deepinwine/Deepin-WeChat/,再重登录。可是结果还是不行,在wechat窗口是可以切换到fcitx的,但就是不能上词。

我用的是arch + kde + fcitx-rime

williamlwclwc commented 5 years ago

我之前遇到了类似的问题,不过我微信和tim都有问题,我是因为没有设置中文的locale,run.sh加上环境变量,设置完locale,再重启之后就好了

我的是arch+kde+fcitx搜狗拼音

qcy8cloud commented 4 years ago

我的arch+i3-gaps+fcitx,和LZ一样的问题,现在解决了

先设好locale,我用了LANG=en_US.UTF-8

$HOME/.pam_environment加入环境变量 GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx

locale设置了还不行的话,可以把/opt/deepinwine/apps/Deepin-WeChat/run.sh的环境变量WINE_CMD修改为 WINE_CMD="LC_ALL=zh_CN.UTF-8 deepin-wine"

Windforce17 commented 4 years ago

抱歉回复晚了,参照deepin-wine-tim#issue5试试,在Archlinux + kde上用搜狗输入法(fcitx)可以正常输入

我试过还是不行,我分别尝试过在以下文件加入环境变量, /etc/environment $HOME/.pam_environment /opt/deepinwine/apps/Deepin-WeChat/run.sh 然后删除~/.deepinwine/Deepin-WeChat/,再重登录。可是结果还是不行,在wechat窗口是可以切换到fcitx的,但就是不能上词。

我用的是arch + kde + fcitx-rime

/opt/deepinwine/apps/Deepin-WeChat/run.sh也添加环境变量,另为使用命令行启动试试

thend03 commented 3 years ago

使用的manjaro kde 20.2 deepin-wine-wechat版本是3.0.0.57-1,wine 版本是5.22-1 ,输入法使用的是fcitx5 安装了fcitx5-chinese-addons,fcitx5-rime

突然无法切换输入法了,fcitx5的切换输入法的快捷键是ctrl+space,在别的地方,比如浏览器,kconsole,钉钉等,都是可以切换输入法的

尝试了修改/etc/evviroment ~/.pam_environment ~/.xprofile /opt/deepinwine/apps/Deepin-Wechat/run.sh 的配置,添加了变量

并且手动修改run.sh的WINE_CMD为deepin-wine5,reboot之后还是无法切换输入法

playasmegumin commented 2 years ago

环境Archlinux KDE Fcitx5。一开始是同样的问题:纯英文键盘可以键入,切换rime之后中文候选词有候选框但是无法上屏。经过一周的折腾后莫名其妙好了。 在我的案例里我认为LC_CTYPE和LC_ALL是关键。当我重启电脑之后立即查看locale时:

$ locale
LANG=en_US.UTF-8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

其中我认为最重要的是LC_CTYPE(zh_CN.UTF-8)和LCALL(设空),前者决定输入时的语言格式,后者优先级最高强制覆盖所有的LC*。我已经修改了若干配置文件以确保我的locale全是zh_CN.UTF-8,但是重启之后仍然变成en_US.UTF-8(除了LC_CTYPE,这个似乎决定了输入时的语言格式,也因此我认为这是关键)。 现在我的系统里登陆界面是中文,终端和KDE为英文,微信默认全中文。


此外,我在运行deepin-wine-wechat默认的那个run.sh里加入了:

env locale=zh_CN.UTF-8
export XIM="fcitx"
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"

也许是这里改变了微信里所有的locale设置。但问题是在前面提到的反复修改locale之后才解决的。


诸如:

export XIM="fcitx"
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"

这样的输入法框架相关的内容我添加到了/etc/environment~/.pam_environment/opt/apps/com.qq.weixin.deepin/files/run.sh(前面提到了)中。

我的`locale.conf'如下:

LANG=zh_CN.UTF-8
LC_CTYPE=zh_CN.UTF-8

我的locale.gen'中启用了en_US.UTF-8zh_CN.UTF-8`; 修改locale之后执行以下代码使其马上生效:

sudo locale-gen
unset LANG
source /etc/profile.d/locale.sh
locale

其中第一句使指定语言格式可用,第二三句来源于ArchWiki,第四句验证效果。

spking11 commented 2 years ago

Just adding export LC_ALL=zh_CN.UTF-8 to the top of /opt/apps/com.qq.weixin.deepin/files/run.sh solves this issue for me in ArchLinux Plasma 5.25.2(with fcitx5 and deepin-wine-wechat 3.7.0.30-1).

HowcanoeWang commented 2 years ago

Just adding export LC_ALL=zh_CN.UTF-8 to the top of /opt/apps/com.qq.weixin.deepin/files/run.sh solves this issue for me in ArchLinux Plasma 5.25.2(with fcitx5 and deepin-wine-wechat 3.7.0.30-1).

LC_ALL forces langage to only Chinese (will disable other languages, e.g. English and Japanese), and doesn't work for me. Because the main problem is the wine can not detect the fcitx program.

LC_ALL 强制规定语言仅为中文(会屏蔽其他的语言),个人感觉并没有解决问题,因为主要原因是wine没法检测到输入法的问题

According to this link, by add the following sentences to /opt/apps/com.qq.weixin.deepin/files/run.sh, solved my problem and support multi language perfectly.

通过参考上述链接,把下面的代码添加到运行脚本里,能完美解决我的问题并能够进行多语言适配

> sudo vim /opt/apps/com.qq.im.deepin/files/run.sh 

env locale=zh_CN
export XIM="fcitx"
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"
z2z63 commented 1 year ago

我也不能输入中文,ibus+rime,arch kde 仿照上面的做法,修改了/opt/apps/com.qq.im.deepin/files/run.sh 在开头加上了env locale=zh_CN,末尾加上了

export XIM=”ibus"
export XIM_PROGRAM="ibus" 
export XMODIFIERS=”@im="ibus"
export GTK_IM_MODULE="ibus" 
export QT_IM_MODULE="ibus"

这是我的run.sh run.sh.txt

重新启动还是不能输入中文

vufa commented 1 year ago

@z2z63 我没有在ibus上测试过,但放在run.sh末尾应该是无效的,尝试加在/etc/environment 中,或直接放在run.sh开头试试

WRXinYue commented 1 year ago

我的问题在于 /etc/locale.gen文件内容格式错误,修复之后重新sudo locale-gen,我并把我所有的fcitx5改为fcitx。成功输入中文