Chinaunix首页 | 论坛 | 博客
  • 博客访问: 17620
  • 博文数量: 7
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-19 13:01
文章分类

全部博文(7)

文章存档

2010年(4)

2009年(3)

我的朋友
最近访客

分类: LINUX

2010-01-15 02:47:17

    今天帮同学在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自动启动就可以了
阅读(2812) | 评论(0) | 转发(0) |
0

上一篇:lfs终于编译完成

下一篇:我竟然发了个exit

给主人留下些什么吧!~~