Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 搜索框无法输入中文 无法切换输入法 Ubuntu 24.04 fcitx5 #2072

Open
2 tasks done
Byron-Ding opened this issue Oct 6, 2024 · 2 comments
Open
2 tasks done

Comments

@Byron-Ding
Copy link

解决方案检查

预期行为

搜索框可以输入中文

实际行为

搜索框无法输入中文,连切换输入法的按键都无效

Lx Music 版本

2.9.0

最后正常的版本

2.9.0

操作系统版本

Ubuntu 24.01

附加信息

GUI=wayland
输入法引擎=fcitx5

@Byron-Ding Byron-Ding changed the title [Bug]: [Bug]: 搜索框无法输入中文 Ubuntu 24.04 fcitx5 Oct 6, 2024
@Byron-Ding Byron-Ding changed the title [Bug]: 搜索框无法输入中文 Ubuntu 24.04 fcitx5 [Bug]: 搜索框无法输入中文 无法切换输入法 Ubuntu 24.04 fcitx5 Oct 6, 2024
@Byron-Ding
Copy link
Author

Byron-Ding commented Oct 6, 2024

折腾了一阵子已经解决一部分,可以在命令行启动,但是desktop文件不生效,不知道对其他人是否有效
参考
https://my.toho.red/posts/solve-electron-wayland-input-problem/

同时参考Viusual Studio code(也是Electron应用)和Chrome的做法

根据你的默认shell在~/.zshrc 或者 ~/.bashrc 下添加(针对fcitx5),fcitx请自行修改为fcitx,(但我没试过)

# 解决 VS code 无法输入中文的问题
export GTK_IM_MODULE=fcitx5
export XMODIFIERS=@im=fcitx5
export QT_IM_MODULE=fcitx5
export XIM="fcitx5"

重启系统

然后
使用参数 --gtk-version=4 --enable-wayland-ime

将/usr/share/applications 下的 desktop 文件里面的
/opt/lx-music-desktop/lx-music-desktop %U
修改为
/opt/lx-music-desktop/lx-music-desktop %U --gtk-version=4 --enable-wayland-ime

即可正常在lx内部使用输入法

另:
别使用网上有的electron软件添加的选项 --ozone-platform-hint=auto
或者--ozone-platform-hint=wayland
亲测会lx打不开直接卡死

参数 --gtk-version=4 似乎没啥影响,但是以防万一,建议加上

@Byron-Ding
Copy link
Author

https://wiki.archlinuxcn.org/wiki/Fcitx5
参考这个,修改gtk的配置文件问题似乎解决了。不知道对其他人是否有帮助

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant