CentOS7下安装Fcitx小企鹅输入法
感觉CentOS7自带的ibus输入法用得不尽人意,考虑安装个Fcitx小企鹅输入法试试,心动不如行动,Let's go~
1. 加入EPEL源
EPEL7几乎是CentOS必备的源:
$ sudo yum install epel-release
2. 添加mosquito-myrepo源
mosquito-myrepo是一个私人制作的第三方源,其中包含了fcitx输入法。
项目地址: https://github.com/1dot75cm/myrepo 支持的发行版: Fedora 19/20/21/rawhide 以及RHEL/CentOS 7
$ sudo yum-config-manager --add-repo=https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-7/mosquito-myrepo-epel-7.repo
3. 卸载原来的ibus输入法
$ sudo yum remove ibus $ sudo yum remove imsettings imsettings-libs im-chooser
4. 安装输入法
可以选择下面的各种输入法中的某一个或多个:
$ sudo yum install fcitx-table-wbpy # 五笔拼音输入法 $ sudo yum install fcitx-googlepinyin fcitx-cloudpinyin # 谷歌拼音输入法 $ sudo yum install fcitx-qimpanel-configtool # 输入法面板设置
5. 配置Fcitx
在~/.bashrc中添加如下内容
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=”@im=fcitx”
6. 关闭gnome-shell 对键盘的监听,然后切换输入法为fcitx:
$ sudo pkill ibus-daemon $ sudo gsettings set org.gnome.settings-daemon.plugins.keyboard active false $ sudo imsettings-switch fcitx
7. 清理工作
mosquito-myrepo在不断地支持更多的软件,这也进一步造成该repo中的软件与base、EPEL中的软件存在版本冲突,在该repo的项目主页中建议安装yum的优先级插件 yum-plugin-priorities
,这在一定程度上会缓解版本冲突问题,但无法从根本上避免。
鉴于多个repo的版本冲突会造成一些麻烦,最好的办法还是在安装完需要的软件之后就禁用该repo,需要的时候再启用。
编辑 /etc/yum.repos.d/mosquito-myrepo-epel-7.repo
,将其中的 enable=1
改成 enable=0
即可。
8. 启用fcitx输入法
重启系统,fcitx自动启动,但图标藏在桌面右下角的通知栏中 打开fcitx的配置工具,选择输入法标签点”+”可以搜索并添加输入法
使用Ctrl+空格
开关输入法
使用Ctrl+Shift
切换输入法