红联Linux门户
Linux帮助

64位RedHat Enterprise Linux安装fcitx 4.0小企鹅输入法

发布时间:2014-07-15 09:40:35来源:红联作者:velcbo
一、首先安装中文支持:

su root

yum install "@Chinese Support"

exit

注销再登陆
二、安装依赖的包
yum -y install gtk2-immodule-xim gtk2-immodules gcc libXrender-devel cairo-devel pango-devel intltool im-chooser
三、下载安装小企鹅4.0
从华军软件园下载。

unzip fcitx-4.0.0.tar.zip

tar zxf fcitx-4.0.0.tar.gz

cd fcitx-4.0.0
make && make install && echo $?

测试下是否安装成功:输入fcitx -h,如果安装成功,应该能得到帮助文件的,如下:

[root@CentOS ~]# fcitx -h

Usage: fcitx [OPTION]

-d run as daemon(default)

-D don’t run as daemon

-c (re)create config file in home directory and then exit

-n[im name] run as specified name

-v display the version information and exit

-h display this help and exit

三、配置Fcitx为默认输入法

1. 新建配置文件 vim /etc/X11/xinit/xinput.d/fcitx.conf ,内容为:

XIM=fcitx

XIM_PROGRAM=/usr/local/bin/fcitx # 注意这个文件必须存在,请确认它的位置

XIM_ARGS="-d" www.2cto.com

GTK_IM_MODULE=fcitx

QT_IM_MODULE =fcitx

2. 然后在/etc/alternatives/目录下,将符号链接xinputrc删除,重新建一个:

mv /etc/alternatives/xinputrc /etc/alternatives/xinputrc.bak

ln -s /etc/X11/xinit/xinput.d/fcitx.conf /etc/alternatives/xinputrc

3. 最后,注销然后登陆,在菜单 系统--首选项--输入法 里面选择“启用输入法特性”,选择“使用fcitx”,然后“注销”,登录后按“ctrl+空格”就可激活fcitx输入法。(在最上面的面板的中间,可以看到输入法的小工具条)

注:如果你使用的桌面是英文环境的,还需要在使用用户的用户目录.bashrc配置文件里添加如下内容:

export LANG=”zh_CN.UTF-8″

export LC_CTYPE=”zh_CN.UTF-8″

export XIM=fcitx

export XIM_PROGRAM=fcitx

export GTK_IM_MODULE=xim

export XMODIFIERS=”@im=fcitx”

作者:LuiseDalian
文章评论

共有 0 条评论