admin管理员组

文章数量:1583063

本文转自https://www.codenong/jsd36ec6bd99bc/,如果侵权,请联系本人,立马删除。(本人亲测简单有效)

适合Centos 7 所有版本
不用卸载ibus ,别信那些坑比,卸载了图形页面都没了。

下载sogou 2.2.0(注意!不要下官网最新版2.3 会失败)

wget cdn2.ime.sogou/dl/index/1524572264/sogoupinyin_2.2.0.0108_amd64.deb?st=jpTlz-vO-Of4mW1f10EBCg&e=1570252581&fn=sogoupinyin_2.2.0.0108_amd64.deb
mv sogoupinyin_2.2.0.0108_amd64.deb?st=jpTlz-vO-Of4mW1f10EBCg   sogoupinyin_2.2.0.0108_amd64.deb

配置Centos7的epel源

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun/repo/epel-7.repo

安装fcitx和必要软件

yum -y install fcitx-configtool libQtWebKit* fcitx

设置环境变量

cat >> /etc/profile << EOF
 export XMODIFIERS=@im=fcitx
 export GTK_IM_MODULE=fcitx
 export QT_IM_MODULE=fcitx
 export XIM=fcitx
EOF

安装dpkg(用来解压deb包)

yum -y install dpkg
ar -x sogoupinyin_2.2.0.0108_amd64.deb #解压,会有三个文件,只要data.tar.xz 就行
tar -xvf data.tar.xz -C /
cp /usr/lib/x86_64-linux-gnu/fcitx/fcitx-sogoupinyin.so /usr/lib64/fcitx/
yum install -y im-chooser #切换输入法工具
sudo imsettings-switch fcitx  #这步需要切换到普通用户桌面环境用sudo 执行

配置待启动的输入法
执行以下命令,并按照提示选择fcitx.conf所在的序号后回车:
(切回root桌面环境)
alternatives --config xinputrc --> 5(对应 /etc/X11/xinit/xinput.d/fcitx.conf)

echo '/usr/bin/fcitx &> /dev/null'  >> /etc/bashrc

注销或重启
按ctrl + space 切换到搜狗输入法,之后按shift切换就可以了
有图有真相

本文标签: 搜狗输入法