下载64位的ubuntu 64bit的安装包,提取其中的data.tar.gz
然后安装fcitx输入法基础环境
配置用户目录下的.bashrc即可
原文:
1. 卸载ibus
yum remove ibus
2. 将rhel 6.4的软件源更换为centos 6.4的软件源
3. 添加fcitx软件源
wget
http://download.opensuse.org/repositories/home:/cathay4t:/misc-rhel6/centos_centos-6/home:cathay4t:misc-rhel6.repo
-o /etc/yum.repos.d/fcitx.repo
4. 安装fcitx
yum install fcitx
安装完成后,运行fcitx -v,可以看到此处安装的fcitx版本为4.2.6.1
5. 升级和修改gtk.immodules
/usr/bin/gtk-query-immodules-2.0-32 > /etc/gtk-2.0/i686-redhat-linux-gnu/gtk.immodules
vi /etc/gtk-2.0/i686-redhat-linux-gnu/gtk.immodules
添加如下几行:
"/usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so"
"xim" "x input method" "gtk20" "/usr/share/locale" "ko:ja:th:zh"
6. 新建配置文件
vi /etc/x11/xinit/xinput.d/fcitx.conf
添加以下内容:
xim=fcitx
xim_program=/usr/bin/fcitx
xim_args=”-d”
gtk_im_module=fcitx
qt_im_module =fcitx
7. 建立到fcitx.conf的链接
mv /etc/alternatives/xinputrc{,.bak} #备份配置文件
ln -s /etc/x11/xinit/xinput.d/fcitx.conf /etc/alternatives/xinputrc
8. 启用fcitx输入法
编辑~/.bashrc文件
vi ~/.bashrc
添加以下几行:
export xmodifiers=@im=fcitx
export gtk_im_module=xim
export qt_im_module=xim
然后,在操作系统的gui上进行如下操作:
system -> preferences -> input method
此时会弹出“im chooser”窗口,勾选“enable input method feature”,然后点击“log out”按钮,注销后重新登录
9. 从deepin的搜狐源中下载搜狗拼音的deb包
<a target="_blank" href="http://mirror.sohu.com/deepin/pool/non-free/f/fcitx-sogoupinyin-release/">http://mirror.sohu.com/deepin/pool/non-free/f/fcitx-sogoupinyin-release/</a>
此处下载fcitx-sogoupinyin_0.0.4-1_i386.deb,放在/root/downloads/目录下
10. 安装搜狗拼音输入法
双击fcitx-sogoupinyin_0.0.4-1_i386.deb,找到data.tar.gz文件,将其提取至/root/downloads/目录下,然后运行以下命令:
cd /root/downloads/
tar -xvzf data.tar.gz -c /
然后,将搜狗拼音插件移动到centos发行版中的相应位置,运行以下命令:
mv /usr/lib/i386-linux-gnu/fcitx/fcitx-sogoupinyin.so /usr/lib/fcitx/
注销后重新登录,此时搜狗拼音应该已经可以用了
11. 从deepin的搜狐源中下载搜狗拼音默认皮肤
<a target="_blank" href="http://mirror.sohu.com/deepin/pool/main/f/fcitx-skins/">http://mirror.sohu.com/deepin/pool/main/f/fcitx-skins/</a>
此处下载fcitx-skin-sogou_0.0.3_all.deb,放在/root/downloads/目录下
12. 安装搜狗拼音默认皮肤
双击fcitx-skin-sogou_0.0.3_all.deb,找到data.tar.gz文件,将其提取至/root/downloads/skin/目录下,然后运行以下命令:
cd /root/downloads/skin/
13. 禁用其他不用的输入法
vi /usr/share/fcitx/addon/fcitx-pinyin.conf # 拼音和双拼的配置文件
vi /usr/share/fcitx/addon/fcitx-table.conf # 五笔和五笔拼音的配置文件
在这两个配置文件中找到“enabled”项,改为“false”即可关闭这四个输入法
重启fcitx即可生效
14. 设置搜狗拼音的每页候选词数
vi ~/.config/fcitx/config
找到“candidatewordnumber”,将数字改为“10”
测试环境:
vmware workstation 9.0.0 build-812388
rhel 6.4
ps:64位的rhel 6.4也可以按照以上步骤安装搜狗拼音输入法,只要修改一些步骤中的路径即可,centos 6.4也可以参考以上步骤。