欢迎您光临本小站。希望您在这里可以找到自己想要的信息。。。

fedora20 安装搜狗输入法及各种问题的解决

Linux water 3334℃ 0评论

0 环境描述:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. 系统环境:Fedora20 64位  

  2. 截止2014年09月 8日17:50:18 搜狗输入法的时候最新版本为sogou_pinyin_linux_1.1.0.0037_amd64  

1 卸载Ibus:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sudo yum erase ibus    #绝对不能使用yum remove ibus, 会将桌面环境一同删掉.切忌!  

  2. gsettings set org.gnome.settings-daemon.plugins.keyboard active false    #解除gnome桌面与ibus守护进程的绑定(必须有这一步)  

2 安装fcitx输入法:

linux 搜狗输入法使用fcitx作为输入平台,因此要先安装fcitx输入法:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sudo yum install fcitx  

检查安装结果:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. # fcitx -v  

  2. 显示:fcitx version: 4.2.8.4  

说明fcitx的当前版本为4.2.8.4,安装成功.

下一步需要配置Fcitx的环境:在~/.bashrc中加入一下内容

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. export GTK_IM_MODULE=fcitx    

  2. export QT_IM_MODULE=fcitx    

  3. export XMODIFIERS="@im=fcitx"  

保存后重启电脑

3 安装搜狗拼音输入法:

到官网下载最新版本:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. http://pinyin.sogou.com/linux/  

我的是linux 64位版:sogou_pinyin_linux_1.1.0.0037_amd64.deb

CD到下载的目录,解压deb包, 执行以下命令:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. ar vx sogou_pinyin_linux_1.1.0.0037_amd64.deb   

此时获取包中文件:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. x – debian-binary  

  2. x – control.tar.gz  

  3. x – data.tar.xz  

执行以下命令,将包中内容配置到系统安装目录:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sudo tar -Jxvf data.tar.xz  -C /  

在fcitx中导入搜狗库,使fcitx识别并统一管理搜狗拼音,执行以下命令:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sudo cp /usr/lib/x86_64-linux-gnu/fcitx/fcitx-sogoupinyin.so  /usr/lib64/fcitx/fcitx-sogoupinyin.so  

4 启动搜狗拼音输入法, 安装完成

打开终端,先启动fcitx:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. fcitx  

再启动搜狗显示平台:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sogou-qimpanel  

遇到问题:

1 出现fcitx的小键盘后,右键点设置弹出:您正在图形界面下运行 fcitx,但是 fcitx-configtool
未被找到,软件包名通常为 fcitx-config-gtk,fcitx-config-gtk3,或者
fcitx-configtool。现在将用默认文本编辑器打开配置文件。

解决方案:执行:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. yum install fcitx-configtool  

2 不建议使用ALT+F2然后输入fcitx等命令的方式启动fcitx,无法获取fcitx运行状态.建议在Terminal中直接执行.

终端执行fcitx时中断,提醒IBUS进程正在运行.说明ibus输入法没有删除.执行第一步删除ibus的命令解决问题.

3 在安装完成,执行第四步的两个命令后, 也出现了fcitx的小企鹅(在最下方消息栏中), 桌面上也有搜狗拼音输入法的浮标,但无论怎么切换输入法,怎么打字,都不出现拼音.

解决办法:

配置Fcitx的环境:在~/.bashrc中加入一下内容

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. export GTK_IM_MODULE=fcitx    

  2. export QT_IM_MODULE=fcitx    

  3. export XMODIFIERS="@im=fcitx"  

保存后执行:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. gsettings set org.gnome.settings-daemon.plugins.keyboard active false<span>   </span>#解除gnome桌面与ibus守护进程的绑定(必须有这一步)  

重启.

4 出现搜狗拼音的浮标,打字时搜狗不断弹出"启动失败,请重启"等字样时, 说明没有启动搜狗自身的显示平台,执行以下命令:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. <pre name="code" class="cpp"><pre name="code" class="cpp">sogou-qimpanel  

注:不需要再安装/启动fcitx自己的浮动平台

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. fcitx-qimpanel  

因为有一堆的依赖问题,搞完了还很丑.

5 如果问题4每次开机都会出现,则设置开机自起搜狗输入法:

在终端中输入命令:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sudo gnome-session-properties  

在弹出的窗口右栏点"添加",

"名称"随便写,写sogou就行.命令写:

[cpp] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sogou-qimpanel  

完成.

或在gnome-tweak-tools中直接将搜狗添加到启动项

参考帖子:

http://my.oschina.net/wallenheng/blog/226272

http://blog.chinaunix.net/uid-23851468-id-4215194.html

http://blog.sina.com.cn/s/blog_67e34ceb01013enf.html

转载请注明:学时网 » fedora20 安装搜狗输入法及各种问题的解决

喜欢 (0)or分享 (0)

您必须 登录 才能发表评论!