1以root用户登陆,拷贝相应安装包(fcitx-4.0.032bit.tar,fcitx-4.0.064bit.tar)到/usr/src目录下 2.在root用户下,执行安装脚本fcitx.sh #!/bin/bash #author:caoqing #date:3/3/2013 function syq { clear cd /usr/src if [ -e fcitx-4.0.032bit.tar ];then tar xvf fcitx-4.0.032bit.tar cd fcitx* && ./configure && make && make install else echo "the package is not exist!!!" fi } function whh { clear cd /usr/src if [ -e fcitx-4.0.064bit.tar ];then tar xvf fcitx-4.0.064bit.tar cd fcitx* && ./configure && make && make install else echo "the package is not exist!!!" fi } function menu { clear echo echo -e "\t\t\tFcitx Installtion\n" echo -e "\t1.32bitfcitx installtion" echo -e "\t2.64bitfcitx installtion" echo -e "\t0.Exit program\n\n" echo -en "\t\tEnter option: " read -n 1 option } while [ 1 ] do menu case $option in 0) break;; 1) syq;; 2) whh;; *) clear echo "sorry,worry selection";; esac echo -en "\n\n\t\t\tHit any key to continue" read -n 1 line done clear if [ $LANG = zh_CN.UTF-8 ] || [ $LANG = en_US.UTF-8 ] && ! grep -q "GB18030" ~/.bash_profile then echo 'export.GB18030'>>~/.bash_profile echo 'export XIM=fcitx'>>~/.bash_profile echo 'export XIM_PROGRAM=fcitx'>>~/.bash_profile echo 'export GTK_IM_MODULE=xim'>>~/.bash_profile echo 'export XMODIFIERS="@im=fcitx"'>>~/.bash_profile fi if [ -e /etc/X11/xinit/xinput.d/fcitx.conf ];then exit 0 else echo 'XMODIFIERS="@im=fcitx"'>/etc/X11/xinit/xinput.d/fcitx.conf echo 'XIM=fcitx'>>/etc/X11/xinit/xinput.d/fcitx.conf echo 'XIM_PROGRAM=/usr/local/bin/fcitx'>>/etc/X11/xinit/xinput.d/fcitx.conf echo 'XIM_ARGS="-d"'>>/etc/X11/xinit/xinput.d/fcitx.conf echo 'GTK_IM_MOUDLE=fcitx'>>/etc/X11/xinit/xinput.d/fcitx.conf echo 'QT_IM_MOUDLE=fcitx'>>/etc/X11/xinit/xinput.d/fcitx.conf fi cd /etc/alternatives mv /etc/alternatives/xinputrc /etc/alternatives/xinputrc.bak rm -rf xinputrc ln -s /etc/X11/xinit/xinput.d/fcitx.conf xinputrc 3.完成安装后,修改对应用户(df8003,oracle)环境变量,执行 echo 'export.GB18030'>>~/.bash_profile echo 'export XIM=fcitx'>>~/.bash_profile echo 'export XIM_PROGRAM=fcitx'>>~/.bash_profile echo 'export GTK_IM_MODULE=xim'>>~/.bash_profile echo 'export XMODIFIERS="@im=fcitx"'>>~/.bash_profile 完成后注销 附录: 1.安装fcitx依赖包:gtk2-immodule-xim gtk2-immodules gcc libXrender-devel cairo-devel pango-devel intltool im-chooser 2.测试是否安装成功:输入fcitx -h,若是安装成功,能够获得帮助文件 3.查询fcitx是否开机运行,终端下输入:fcitx 4.fcitx启动后,界面上没有显示输入法图标,输入: fcitx -nb ,便可看到输入框 5.卸载方法,进入目录:cd /usr/src/fcitx*,执行make uninstall 6.ctrl+空格,切换输入法;ctrl,中英文切换 7.配置fcitx输入法修改vim ~/.fcitx/config文件中的相应偏好设置 8.查看源码,安装配置说明,登陆Fcitx输入法官方网站:http://www.fcitx.org