Ubuntu下的谷歌拼音输入法

17 Sep 2012

最近研究基于 Hadoop 的全网爬虫,又用回到了 Ubuntu 系统下。实验室统一要用长期稳定版,由于不习惯于12.04的结构,故还是选择了10.04(好古老的),而输入法自然是最最要优先解决的,爱 GooglePinyin 就看这里

libgooglepinyin

推荐使用 libgooglepinyin 项目,它支持IBus下添加 GooglePinyin 输入法

Step1 安装依赖

1 $ sudo apt-get install cmake build-essential opencc mercurial ibus

Step2 安装 libgooglepinyin 库

1 $ hg clone http://code.google.com/p/libgooglepinyin/
2 
3 $ cd libgooglepinyin
4 
5 $ mkdir build; cd build
6 $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
7 
8 $ make
9 $ sudo make install

Step3 安装 ibus-googlepinyin 外壳

1 $ hg clone http://code.google.com/p/libgooglepinyin.ibus-wrapper/ ibus-googlepinyin
2 
3 $ cd ibus-googlepinyin
4 
5 $ mkdir build; cd build
6 $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
7 
8 $ make
9 $ sudo make install

Step4 启用 IBus

在“语言支持”中切换到 ibus 并重启,打开 IBUS设置→输入法→选择输入法→汉语→GooglePinyin,然后将其上升到顶。亲切的 GooglePinyin 就会在 Ctrl+Space 的切换下现出原形了

补充

SCIM 下也有 GooglePinyin,但稳定性不高

在 Ubuntu10.04 系统 Eclipse 中输入双引号或者分号等,会出现键盘失效,无法输入字符的问题,但是在别的地方又能输入,点击一下别的地方再回到 Eclipse 中又能动,很快就又死了,原因是 Eclipse 选择的当前输入法( input method )与用户自行安装的输入法兼容性问题。解决方法如下:
在 Eclipse 的工作区 右键–> Input Method –> SCIM Input Method 即可。

Fork me on GitHub