|
在英文版FC4下费了大概几天的时间来安装fcitx,最终皇天不负有心人终于可以用了.
1.从fcitx主站点下载for fc4的rpm包,安装十分顺利,没有任何错误.
就是按ctrl+space什么都不出,重新启动,可以看到一个没见过的bar出来了,知道好象可以了.但是进入桌面后又看不到它了, pkill fcitx, fcitx &,可以看到一个bar,尝试着在gnome-terminal中按ctrl+space输入,一直可以看到那个bar, 打开 vim xxx, 插入模式, 只有英文可以输入,ctrl+space那个bar没什么反应, 五笔还是灰色的.
2.上网找贴子,尝试着设置locale:
export LC_CTYPE=zh_CN.gb2312
export LANG=zh_CN.gb2312
export LC_ALL=zh_CN.gb2312
这几个进行组合试过,不好使.
又尝试:
export XIM=fcitx
export XIM_PROGRAM=fcitx
export XMODIFIERS="@im=fcitx"
也不好使,还是灰色的,无法激活.
再把它和上面的locale设置结合,重复的试,还是不好使,真想放弃了.(还试过zh_CN.gbk...)
3.试了一下这个可以用了.
在这个目录下/etc/X11/xinit/xinput.d/ 有一大堆文件链接,
[root@dhcp-98-98 tmp]# ls /etc/X11/xinit/xinput.d/ -l
total 56
lrwxrwxrwx 1 root root 30 Sep 22 14:52 bn_BD -> /etc/alternatives/xinput-bn_BD
lrwxrwxrwx 1 root root 30 Sep 22 14:52 bn_IN -> /etc/alternatives/xinput-bn_IN
-rw-r--r-- 1 root root 85 Feb 27 14:08 fcitx
lrwxrwxrwx 1 root root 30 Sep 22 14:52 gu_IN -> /etc/alternatives/xinput-gu_IN
lrwxrwxrwx 1 root root 30 Sep 22 14:52 hi_IN -> /etc/alternatives/xinput-hi_IN
-rw-r--r-- 1 root root 0 Feb 27 16:35 iiimf
lrwxrwxrwx 1 root root 30 Sep 22 14:52 ja_JP -> /etc/alternatives/xinput-ja_JP
lrwxrwxrwx 1 root root 30 Sep 22 14:52 kn_IN -> /etc/alternatives/xinput-kn_IN
lrwxrwxrwx 1 root root 30 Sep 22 14:52 ko_KR -> /etc/alternatives/xinput-ko_KR
lrwxrwxrwx 1 root root 30 Sep 22 14:52 ml_IN -> /etc/alternatives/xinput-ml_IN
lrwxrwxrwx 1 root root 30 Sep 22 14:52 pa_IN -> /etc/alternatives/xinput-pa_IN
lrwxrwxrwx 1 root root 30 Sep 22 14:52 ta_IN -> /etc/alternatives/xinput-ta_IN
lrwxrwxrwx 1 root root 30 Sep 22 14:52 te_IN -> /etc/alternatives/xinput-te_IN
lrwxrwxrwx 1 root root 30 Sep 22 14:52 zh_CN -> /etc/alternatives/xinput-zh_CN
lrwxrwxrwx 1 root root 30 Sep 22 14:52 zh_TW -> /etc/alternatives/xinput-zh_TW
再看/etc/alternatives/
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-bn_BD -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-bn_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-gu_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-hi_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-ja_JP -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-kn_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-ko_KR -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-ml_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-pa_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-ta_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-te_IN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 27 16:05 xinput-zh_CN -> /etc/X11/xinit/xinput.d/iiimf
lrwxrwxrwx 1 root root 29 Feb 24 17:12 xinput-zh_TW -> /etc/X11/xinit/xinput.d/iiimf
[root@dhcp-98-98 tmp]#
看一下/etc/X11/xinit/xinput.d/iiimf 内容:
XIM=iiimx
XIM_PROGRAM=iiimx
GTK_IM_MODULE=iiimx
gnome-im-settings-daemon > /dev/null
从别人的贴子中找到的方法,就是新写一个脚本,使其利用fcitx,然后把/etc/X11/xinit/xinput.d/zh_CN 链接指向新的脚本,就可以用了.没有设置其它东东.
在/etc/X11/xinit/xinput.d目录下新写个脚本如:fcitx
XIM=fcitx
XIM_PROGRAM=fcitx
GTK_IM_MODULE=fcitx
gnome-im-settings-daemon > /dev/null
然后执行:
#alternatives --install /etc/X11/xinit/xinput.d/zh_CN xinput-zh_CN /etc/X11/xinit/xinput.d/fcitx 100
#alternatives --auto xinput-zh_CN
重新启动X,打开终端,按下ctrl+space,五笔不是灰色的了,而且又跳出个输入栏.
不知道这个方法和其它的方法有什么区别? 而且我尝试把fcitx脚本的内容手工执行,环境变量export, gnome-im-settings-daemon也重新执行,我估计它是用来重新导入设置的,然后杀死 pkill $(pgrep iim*)
再运行fcitx &, 还是不行,不知道为什么?想知道个究竟.
谢谢! |
|