64位RedHat Enterprise Linux安裝fcitx 4.0小企鵝輸入法

LuiseDalian發表於2013-01-10
一、首先安裝中文支援:
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”



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17013648/viewspace-752490/,如需轉載,請註明出處,否則將追究法律責任。

相關文章