ILD

fedora 35 安装 fcitx5拼音输入法
作者:Yuan Jianpeng 邮箱:yuanjp89@163.com
发布时间:2022-3-17 站点:Inside Linux Development

系统自带的中文输入法给狗狗都不用,太难用了,而且经常导致输入卡死无反应。


因此安装fcitx输入法框架,以及fcitx拼音输入法。搜狗输入法也是基于fcitx框架的。后续再研究如何安装搜狗输入法。搜狗输入法官方是没有支持fedora的。


第一步:安装fcitx5

$ sudo dnf install fcitx5 kcm-fcitx5 fcitx5-chinese-addons fcitx5-table-extra fcitx5-zhuyin fcitx5-configtool


注意,严格安装上述package,之前想当然安装了fcitx5,安装的不全导致不支持。


此时,在一个终端手动执行fcitx5

$ fcitx5


在另一个终端,配置fcitx5

$ fcitx5-config-qt

选中中文输入法pinyin。


在其它窗口,按Ctrl+space,就可以切换到中文输入法了。


第二步:开机启动fcitx5

第一步安装,并手动启动,但要想开机启动,我们还需要配置一下启动相关的脚本。


1 设置默认输入法

$ sudo alternatives --config xinputrc


There are 2 programs which provide 'xinputrc'.

  Selection    Command
-----------------------------------------------
*  1           /etc/X11/xinit/xinput.d/ibus.conf
 + 2           /etc/X11/xinit/xinput.d/fcitx5.conf

Enter to keep the current selection[+], or type selection number: 2


2 添加自动启动

$ ln -s /usr/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/


3 设置环境变量

不设置好像不影响,但是可能某些程序需要这些环境变量。


$ cat << EOF > ~/.config/environment.d/00fcitx5.conf

INPUT_METHOD=fcitx5
GTK_IM_MODULE=fcitx5
QT_IM_MODULE=fcitx5
XMODIFIERS=@im=fcitx5

EOF


参考:

How to set up Chinese input methods on Fedora 35 (KDE)

https://gist.github.com/ukazap/6495324cf3220b1fef0484e8fdb244ab





Copyright © linuxdev.cc 2017-2024. Some Rights Reserved.