首先确认一下环境,因为不同的配置可能不适用本教程。
硬件:小米笔记本Air四核增强版
操作系统:Win 10 + Ubuntu 16.04
下载搜狗拼音输入法的Linux安装包。
搜狗输入法Linux版下载地址:http://pinyin.sogou.com/linux/?r=pinyin
下载好之后,查看一下:
ls

先尝试安装一下:
sudo dpkg -i sougoupinyin_x.x.x.deb
一般都不能正常安装,要是能正确安装,就不会有这篇文章。 当然,错误的原因是缺少重要组件fcitx.
安装fcitx
搜狗输入法基于fcitx,Ubuntu默认使用的是iBus。不过在高版本的Ubuntu中,已经自带了fcitx,如果你的Ubuntu版本高于16.04,可以查看是否安装好了fcitx。我的机器直接操作第7步。
点击桌面右上角齿轮,点击system settings - > Lanuguage Support。如果能在下图中keyboard input method system
中找到fcitx,就不用在安装fcitx了。

1、添加源
sudo add-apt-repository ppa:fcitx-team/nightly
2、更新源
sudo apt-get update
3、安装fcitx
sudo apt-get install fcitx
4、安装fcitx的配置工具:
sudo apt-get install fcitx-config-gtk
5、安装fcitx的table-all软件包:
sudo apt-get install fcitx-table-all
6、安装im-switch切换工具:
sudo apt-get install im-switch
7、安装依赖包:
sudo apt-get install -f

安装完成以后,点击桌面右上角齿轮,点击system settings - > Lanuguage Support。

选择下图中keyboard input method system
为fcitx。

这个时候,有个关键的动作,一定不能忽略:注销用户。如果不知道怎么注销,直接重启电脑就可以了。
现在,电脑右上角就可以选择一个企鹅图标。

安装搜狗输入法:
sudo dpkg -i sougoupinyin_x.x.x.deb

配置输入法
点击企鹅图标,选择Text Entry Settings
,第一次进来,是没有Sougo Pinyin(Fcitx)
这个选项,点击左下角的+
.

可以在搜索框中输入sougou
,选择Sougo Pinyin(Fcitx)
,点击Add
。

点击输入法图标(小企鹅),找到设置,进入设置界面。点击左下角的+
,在弹出的对话框中,先把Only show current language
的选项去掉,在搜索框中输入sougou
。点击Sougou Pinyin
,然后确认。

这下,应该大功告成了。

网友评论