centos6.4 64位操作系统安装fcitx输入法

      由于以前安装的winQQ2012在用ibus输入文字的时候老是崩溃,网上说是由于ibus于winQQ有冲突的原因。因此决定安装fcitx输入法,看是否还有崩溃的情况发生。特记录如下:

     本想用最新的fcitx,可是装的时候,一堆问题,package 'gio-2.0>=2.26' not found,这个问题就是解决不了,提示的包找不到,包装了,还是找不到。还是老实一点装3系列的。

   

一,安装fcitx依赖包

  1. [root@localhost download]$ yum install  gettext  gettext-devel libXft libXft-devel libXpm libXpm-devel  automake autoconf libXtst-devel gtk+-devel gcc zlib-devel libpng-devel gtk2-devel glib-devel  
     这一步不做的话,也行,只不过编译安装的时候,会提示这个包找不到,哪个包找不到,到时你在装也行。不过会比较郁闷。哈哈。

二,下载并安装fcitx

  1. [root@localhost download]$ wget http://fcitx.googlecode.com/files/fcitx-3.6.4.tar.gz   
  2. [root@localhost download]$ tar zxvf fcitx-3.6.4.tar.gz  
  3. [root@localhost download]$ cd fcitx-3.6.4  
  4. [root@localhost fcitx-3.6.4]$ ./autogen.sh  
  5. [root@localhost fcitx-3.6.4]$ mkdir /usr/local/fcitx  
  6. [root@localhost fcitx-3.6.4]$ ./configure --prefix=/usr/local/fcitx  
  7. [root@localhost fcitx-3.6.4]$ make && make install  

不提示报错就装成功了,也可以这样看

  1. [zhangy@localhost ~]$ /usr/local/fcitx/bin/fcitx -h   //出现这样的东西,就说明装成功了。  
  2. Usage: fcitx [OPTION]  
  3.  -d        run as daemon(default)  
  4.  -D        don't run as daemon  
  5.  -c        (re)create config file in home directory and then exit  
  6.  -n[im name]    run as specified name  
  7.  -v        display the version information and exit  
  8.  -h        display this help and exit  

三,配置fcitx输入法

1,创建fcitx输入法文件

  1. [root@localhost fcitx-3.6.4]# vim /etc/X11/xinit/xinput.d/fcitx.conf  
  2. XIM=fcitx  
  3. XIM_PROGRAM=/usr/local/fcitx/bin/fcitx  
  4. XIM_ARGS=”-d”  
  5. GTK_IM_MODULE=xim  
  6. QT_IM_MODULE =fcitx  

2,设置fcitx输入法文件为默认

  1. [root@localhost ~]$ mv /etc/alternatives/xinputrc /etc/alternatives/xinputrc.bak         //原来备份一下  
  2. [root@localhost ~]$ ln -s /etc/X11/xinit/xinput.d/fcitx.conf /etc/alternatives/xinputrc  //设置fcitx为默认输入法  

3,设置个人环境变量

  1. [zhangy@localhost ~]$ vim ~/.bashrc       //注意用户,最好是常用登录用户。修改一下内容  
  2. # User specific aliases and functions  
  3. # export GTK_IM_MODULE=ibus               //这是以前的  
  4. #  export XMODIFIERS=@im=ibus  
  5. #  export QT_IM_MODULE=ibus  
  6. #export LANG="zh_CN.UTF-8"                 //如果系统字符不是中文的话,这个要加,不然乱码  
  7. export XIM=fcitx                          //这是新的  
  8. export GTK_IM_MODULE=xim  
  9. export XMODIFIERS=@im=fcitx  
  10. export QT_IM_MODULE=fcitx 

4,在菜单 系统=》首选项=》输入法,进行下面的操作



 

centos fcitx设置

然后点注销重新登录就OK了。

猜你喜欢

转载自lianhua.iteye.com/blog/1941739