LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1203|回复: 3

如何自动运行一个脚本文件?

[复制链接]
发表于 2004-11-10 04:11:37 | 显示全部楼层 |阅读模式
从Dell搞了一台700m。在上面装了Gentoo,主要麻烦就是怎么搞定
WXGA屏幕上X-windows,打了一个patch,差不多行了。可是麻烦是每次开机以后,都需要
以root身份运行如下命令:
/usr/sbin/855resolution 5c 1280 800
所以想把上面的一行命令写入一个脚本文件,让开机的时候自动运行。不知道具体怎么
操作?我试过写入/etc/rc.start,然后用etc-update可是没用。是不是应该放到其他
目录下,比如/etc/rc.conf/,然后运行什么命令?

使用Linux时间不长,请大家多多帮助。
发表于 2004-11-10 06:37:48 | 显示全部楼层
cat /etc/conf.d/local.start
# /etc/conf.d/local.start:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002/11/18 19:39:22 azarah Exp $

# This is a good place to load any misc.
# programs on startup ( 1>&2 )

#Tweak the 855GM resolution
/usr/local/bin/855resolution 4d 1280 800 1>&2 > /dev/null

I uses Dell 700m with Gentoo, too.
//hand
发表于 2004-11-10 07:55:04 | 显示全部楼层
这个是因为需要X启动起来吧?你用什么方法启动?
如果你用startx的话,实验一下把startx也加入到local。start里边。
 楼主| 发表于 2004-11-10 12:06:36 | 显示全部楼层
多谢答复,的确在/etc/conf.d/local.start中加入命令就可以了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表