Chinaunix首页 | 论坛 | 博客
  • 博客访问: 798991
  • 博文数量: 770
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4950
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-09 17:49
文章分类

全部博文(770)

文章存档

2011年(1)

2008年(769)

我的朋友

分类:

2008-10-10 11:35:33

请问我想在fc 2开机时启动指定的程序该如何做

具体是想开机就启动fcitx 汉字输入法,于是我在rc.local 里做了改动如下

#!/bin/sh
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

if [ -f /var/lock/subsys/locals900 ]; then
touch /var/lock/subsys/locals9001
fi
touch /var/lock/subsys/locals900
touch /var/lock/subsys/fcitxlogs900
echo "*************fcitx****************"
# start input for chinese with  fcitx
if [ -f /usr/local/fcitx/bin/fcitx ] ; then
/usr/local/fcitx/bin/fcitx
fi
exit $?

并且在rc3.d里找到了它的联接S90rclocal
可是启动时总是提示段错误!进入系统后,运行脚本能够启动程序!为什么??
最后发现这个脚本的启动顺序有问题,他是90编号,可还有小于它编号的没有启动**到它了,我又在rc3.d里新建了个为S900rclocal的联接,可启动后没有执行过这个脚本,也就是说仅执行了一次rc.local脚本,又是什么原因呢??      
--------------------next---------------------

阅读(336) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~