ubuntu搜狗输入法安装

1 下载linux

    到这里下载搜狗拼音输入法安装包sogoupinyin_1.2.0.0056_i386.deb。程序员

2 安装app

  1. sudo dpkg -i sogoupinyin_1.2.0.0056_i386.deb   
sudo dpkg -i sogoupinyin_1.2.0.0056_i386.deb

2.1 依赖问题frontend

  1. dpkg: dependency problems prevent configuration of sogoupinyin:  
  2.  sogoupinyin depends on fcitx (>= 1:4.2.8.3-3~); however:  
  3.   Package fcitx is not installed.  
  4.  sogoupinyin depends on fcitx-frontend-gtk2; however:  
  5.   Package fcitx-frontend-gtk2 is not installed.  
  6.  sogoupinyin depends on fcitx-frontend-gtk3; however:  
  7.   Package fcitx-frontend-gtk3 is not installed.  
  8.  sogoupinyin depends on fcitx-frontend-qt4; however:  
  9.   Package fcitx-frontend-qt4 is not installed.  
  10.  sogoupinyin depends on fcitx-module-kimpanel; however:  
  11.   Package fcitx-module-kimpanel is not installed.  
  12.  sogoupinyin depends on fcitx-libs (>= 4.2.7); however:  
  13.   Package fcitx-libs is not installed.  
  14.  sogoupinyin depends on fcitx-libs-qt (>= 4.2.7); however:  
  15.   Package fcitx-libs-qt is not installed.  
dpkg: dependency problems prevent configuration of sogoupinyin:
 sogoupinyin depends on fcitx (>= 1:4.2.8.3-3~); however:
  Package fcitx is not installed.
 sogoupinyin depends on fcitx-frontend-gtk2; however:
  Package fcitx-frontend-gtk2 is not installed.
 sogoupinyin depends on fcitx-frontend-gtk3; however:
  Package fcitx-frontend-gtk3 is not installed.
 sogoupinyin depends on fcitx-frontend-qt4; however:
  Package fcitx-frontend-qt4 is not installed.
 sogoupinyin depends on fcitx-module-kimpanel; however:
  Package fcitx-module-kimpanel is not installed.
 sogoupinyin depends on fcitx-libs (>= 4.2.7); however:
  Package fcitx-libs is not installed.
 sogoupinyin depends on fcitx-libs-qt (>= 4.2.7); however:
  Package fcitx-libs-qt is not installed.

2.2 错误ui

  1. dpkg: error processing package sogoupinyin (--install):  
  2.  dependency problems - leaving unconfigured  
  3. .  
  4. .  
  5. .  
  6. Rebuilding /usr/share/applications/bamf-2.index...  
  7. Errors were encountered while processing:  
  8.  sogoupinyin  
dpkg: error processing package sogoupinyin (--install):
 dependency problems - leaving unconfigured
.
.
.
Rebuilding /usr/share/applications/bamf-2.index...
Errors were encountered while processing:
 sogoupinyin

2.3 解决方法spa

    根据参考资料[2]的提示,先执行下面的命令,而后再从新安装搜狗拼音输入法便可。.net

  1. sudo apt-get install -f  
sudo apt-get install -f

3 配置命令行

3.1 键盘输入方式设置code

    默认状况下,键盘默认输入方式是IBus,如今要改成fcitx。步骤以下:blog

(1) 在命令行终端中输入unity-control-center,打开System Settings版面,而后点击Language Support图标,弹出下图:

 

(2) 在上图中选择“Keyboard input method system:”为fcitx

(3) 重启Ubuntu系统。

3.2 配置键盘输入法

    通过3.1小节的设置以后,系统桌面的右上角出现了一个键盘符号,点击它,便可显示下拉菜单,以下图:


    点击上图中的“配置”菜单,弹出下图(也能够直接在命令行终端中使用fcitx-config-gtk3 命令打开下面的版面):


    点击上图左下角的“+”按钮,弹出下图:


    去掉上图中“Only Show Current Language”前面的勾,而后在“Search Input Method”编辑框中输入sougou,便可在上面的输入法列表中显示搜狗拼音,以下图:


    点击上图的OK按钮便可。

3.3 效果

    推出输入法设置版面后,再次点击桌面右上角的键盘符号,弹出下拉菜单以下:


    由上图可见,Sougou Pinyin已经出如今其中。用鼠标选择它,便可使用搜狗拼音输入法进行中文输入。

3.4 关于英文输入法

    3.2小节第2幅图所示的英文输入法“English(UK)”不太符合咱们的习惯,例如但愿输入#符号时候,倒是其它符号(这对程序员而言,是没法接受的)!所以要将其换成其它输入法,例以下图:


4 输入法切换快捷键

    因为常常须要在中英文输入法之间切换,所以快捷键仍是很是有必要的。

    (1) 搜狗拼音输入法默认状况下使用Shift键进行中英文输入切换,然而做为一个程序员,不少时候须要用到Shift键,可是不但愿这时候发生输入方式切换。所以须要禁止这个功能。在搜狗拼音输入法设置版面的按键(K)中,将中英文切换设置为便可(默认为Shift)。

   (2) 在命令行终端中输入下面命令,能够弹出Input Method Configuration版面(以下图所示):

  1. fcitx-config-gtk3   
fcitx-config-gtk3


    在上图中的Trigger Input Method设置为Ctrl + Space

   (3) 将其它占用Ctrl + space快捷键的设置取消。在Ubuntu中,可能有其它设置使用了这个快捷方式的话,会致使输入法切换失败。例如Text Entry。在命令行终端中输入下面的命令,便可弹出System Settings版面。

  1. unity-control-center  
unity-control-center

   点击System Settings版面中的Text Entry图标进入相关设置版面,将Switch to next source using:的值改成其它值(不能是Ctrl + Space!)。