Install Sogou IM 2.0 in Ubuntu14.04+/Xfce
2016-07-21 21:43
369 查看
Ubuntu14.04+ 安装搜狗输入法
搜狗输入法是一款非常友好的输入法产品,从Ubuntu14.04开始对Linux支持,不过只是Debian系的,是Ubuntu优麒麟组引入的。优麒麟是针对国人设计的Ubuntu的一个版本,不过我个人更喜欢 Deepin,他为linux舍弃带来了譬如「有道词典」,「网易云音乐」等优秀的应用,界面设计也区域人性化和美观考虑。不少中国linux圈的都是基于Debian的系统优化。Introduction
Sogou Input 2.0 新增了双拼的支持,提供了更为稳定的支持,数据可以同步,换皮肤。具体可以参见 搜狗输入法Linux版2.0更新日志。不过安装搜狗输入法Linux版2.0的时候会有一个问题
➜ sudo gdebi sogoupinyin_2.0.0.0078_amd64.deb
结果最后一行提示,
No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
提示
'Gtk/IMModule'不存在,查看这个schema确实没有
➜ ~ gsettings list-keys org.gnome.settings-daemon.plugins.xsettings disabled-gtk-modules priority hinting overrides rgba-order antialiasing active enabled-gtk-modules
代码的本意是要把这个key
Gtk/IMModule加入到
org.gnome.settings-daemon.plugins.xsettings中。
所有应该是1
[org.gnome.settings-daemon.plugins.keyboard] active=false [org.gnome.settings-daemon.plugins.xsettings] overrides={'Gtk/IMModule':<'fcitx'>} # 而不是 # Gtk/IMModule=fcitx [com.canonical.indicator.keyboard] visible=false
所以需要修改这个文件并重新打包
Solution
2 1mkdir -p extract/DEBIAN #prepare the environ # 准备环境 dpkg-deb -x sogoupinyin_2.0.0.0078_amd64.deb extract/ # extract the content files # 解压出内容文件 dpkg-deb -e sogoupinyin_2.0.0.0078_amd64.deb extract/DEBIAN # extract the control file # 解压出控制文件 vi extract/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override # correct the file # change line 4 to overrides={'Gtk/IMModule':<'fcitx'>} # 更正文件 # 把第四行改成 overrides={'Gtk/IMModule':<'fcitx'>} dpkg-deb -b extract/ ./sogoupinyin_2.0.0.0078_wkd.deb # pack the files into deb installer file san save to current dir with name sogoupinyin_2.0.0.0078_wkd.deb # 重新打包为... # 无果没有指定文件名,就和原文件名一样,这是在/extract/DEBIAN/control中定义的 sudo gdebi sogoupinyin_2.0.0.0078_wkd.deb # 安装 install
Conclusion
我把文件挂载在这里 [ Ubuntu x64 ]dpkg-deb 是对deb installer文件进行解压或者打包的。
相关文章推荐
- 无坑安装使用godep(golang.org/x/tools/go/vcs的错误解决方案)
- django学习之学前准备篇
- Proximal Algorithms--proximal gradient algorithm
- [Go语言]我的第三个Go语言程序
- [Go语言]我的第二个Go语言程序
- 导入GooGle ApiDemos
- django 验证码
- django1.9 实现模型变更三步走
- Mongoexport:关于“no reachable servers”问题
- Django输出csv文件
- django model field
- django(五)
- golang判断chan channel是否关闭的方法
- category探索
- mongoldb学习之初识mongoldb
- golang实现unicode转换为字符串string的方法
- GoogleContacts同步,删除太多联系人问题
- mongoexport导出数据
- Golang 实现简单的滚动读取文本更新
- Google论文(1) GFS:Google文件系统 - 思维导图