免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2106 | 回复: 0
打印 上一主题 下一主题

fedora 12安装fcitx [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-15 02:47 |只看该作者 |倒序浏览
    今天帮同学在fedora下安装fctix遇到一点小问题,装好x开发库,编译安装后建立/etc/X11/xinit/xinput.d/zh_CN文件,内容:
XIM=fcitx
XIM_PROGRAM=/usr/local/bin/fcitx
XIM_ARGS=""
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS="@im=fcitx"
    查看/etc/X11/xinit/xinputrc的内容
xim_tmplang=${LC_CTYPE:-${LANG:-"en_US.UTF-8"}}
xim_lang_region=$(echo $xim_tmplang | sed -e 's/\..*//')
[ -r /etc/X11/xinit/xinput.d//${xim_lang_region} ] && source /etc/X11/xinit/xinput.d//${xim_lang_region} || source /etc/X11/xinit/xinput.d//none.conf
    它会执行xinput.d目录下的一个文件,文件名为$LC_CTYPE名称中"."前边的部分,在我机器上$LC_CTYPE为"zh_CN.UTF-8"(可以用locale命令查看),所以它会执行zh_CN文件.有时为了方便更换输入法,这个zh_CN文件是用alternatives搞的一个符号链接,这样前边新建的文件可以取任何想要的名字,一般的系统默认也是这样做的. 我先前没有建立zh_CN文件,手工启动fcitx后出来了输入法面板,但是所有输入法都是灰色的,不能输入汉字.
    重新登录x后,托盘处出来一个notify说"Unable to keep input method running",但是此时fctix可以正常使用.查看$HOME目录下的.imsettings.log文件
IM-Settings-Daemon[11760]: WARNING **: Unable to monitor /root/.xinputrc: Error stating file '/root/.xinputrc': No such file or directory
IM-Settings-Daemon[11760]: INFO: Started fcitx: process: /usr/local/bin/fcitx , lang=zh_CN.UTF-8, pid: 11953, id: 14, time: 2010-01-14T18:28:09.755780Z
IM-Settings-Daemon[11760]: INFO: Current IM is: fcitx
fcitx[11953]: Please set XMODIFIERS...
IM-Settings-Daemon[11760]: WARNING **: Main Input Method process for fcitx died with the status 0, but unexpectedly. restarting...
IM-Settings-Daemon[11760]: INFO: Started fcitx: process: /usr/local/bin/fcitx , lang=zh_CN.UTF-8, pid: 12043, id: 18, time: 2010-01-14T18:28:10.606886Z
fcitx[12043]: Please set XMODIFIERS...
fcitx[12043]: Start FCITX error. Another XIM daemon named fcitx is running?
IM-Settings-Daemon[11760]: WARNING **: Main Input Method process for fcitx died with the status 4, but unexpectedly. restarting...
IM-Settings-Daemon[11760]: INFO: Started fcitx: process: /usr/local/bin/fcitx , lang=zh_CN.UTF-8, pid: 12088, id: 21, time: 2010-01-14T18:28:11.055824Z
fcitx[12088]: Please set XMODIFIERS...
fcitx[12088]: Start FCITX error. Another XIM daemon named fcitx is running?
IM-Settings-Daemon[11760]: CRITICAL **: Giving up to bring the process up because Main Input Method process for fcitx rapidly died many times. See .imsettings.log for more details.
    这里显示一个叫IM-Settings-Daemon的进程创建fcitx进程,但是创建的进程意外退出了,尝试三次都这样最后放弃了.后2个fcitx进程都打印了"Start FCITX error. Another XIM daemon named fcitx is running?",说明第一个进程创建后已经有了一个fcitx进程,但是上边内容上显示第一个fcitx进程已经退出,退出状态为0应该是正常退出的.此时ps -ef | grep fcitx后看到一个pid为11960的fcitx进程.原来第一个fcitx进程创建了一个子进程后退出了,它把任务交给了子进程,而IM-Settings-Daemon却不知情,它发现它创建的fcitx退出了,所以它又试图去创建fcitx进程,因为第一个fcitx进程的儿子现在还在运行,所以再次新建的进程都报告"Start FCITX error. Another XIM daemon named fcitx is running?"
  解决办法很简单,删掉imsettings或者禁止imsettings自动启动,然后我们自己设置让fctix自动启动就可以了


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/108469/showart_2149434.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP