您的位置:首页 > 编程语言 > Go语言

Debian下安装Google、云中文输入法

2014-09-20 15:39 148 查看
Debian下安装Sougou、Google中文输入法

第一步 安装add-apt-repository

在ubuntu下安装python-software-properties和software-properties-common之活,即可使用add-apt-repository。

在Debian下要麻烦一点:

1. 下载add-apt-repository脚本:

$ wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt
2. 将下载的脚本保存为/bin/add-apt-repository

$ cp add-apt-repository.sh.txt /bin/add-apt-repository

3. 修改/bin/add-apt-repository的执行权限:

$ chmod o+x /bin/add-apt-repository

4. 修改/bin/add-apt-repository的拥有者为root

$chown root:root /bin/add-apt-repository

附脚本内容:

File :add-apt-repository

#!/bin/bash

if [ $# -eq 1 ]

NM=`uname -a && date`

NAME=`echo $NM | md5sum | cut -f1 -d" "`

then

ppa_name=`echo "$1" | cut -d":" -f2 -s`

if [ -z "$ppa_name" ]

then

echo "PPA name not found"

echo "Utility to add PPA repositories in your debian machine"

echo "$0 ppa:user/ppa-name"

else

echo "$ppa_name"

echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu lucid main" >> /etc/apt/sources.list

apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt

key=`cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key

rm -rf /tmp/${NAME}_apt_add_key.txt

fi

else

echo "Utility to add PPA repositories in your debian machine"

echo "$0 ppa:user/ppa-name"

fi

附add-apt-repository使用示例(安装fcitx和云输入法):

sudo add-apt-repository ppa:fcitx-team/nightly

sudo apt-get update

sudo apt-get install fcitx

sudo apt-get install fcitx-module-cloudpinyin

第二步 安装fcitx、输入法(搜狗输入法,Google输入法,云输入法)、设置fcitx为默认

sudo apt-get install fcitx fcitx-config-gtk fcitx-sunpinyin fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sogoupinyin

sudo apt-get install fcitx-table-all

im-switch -s fcitx -z default

附fcitx配置工具

sudo apt-get install fcitx-config-gtk

打开语言支持和输入法切换,将输入法设置成fcitx,注销

在终端输入:

fcitx-config-gtk3

注意:完成之后可能需要重起!

附:经本人亲测,在Debian6.04下,Sougou输入法仍然显示ficitx版本不对,其他的可以正确安装和使用。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: