求教 怎样让以下命令开机自动执行?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
beinflying
帖子: 4
注册时间: 2010-03-15 18:43

求教 怎样让以下命令开机自动执行?

#1

帖子 beinflying » 2010-03-30 10:03

如何让以下命令开机自动执行:
echo -n 120 > /sys/devices/platform/i8042/serio0/subsystem/devices/serio2/speed
echo -n 250 > /sys/devices/platform/i8042/serio0/subsystem/devices/serio2/sensitivity

该命令手动执行时需要以root身份运行。

/*************已常将其放入/etc/rc.local,但是无效,不知道与必须以root身份执行的原因,加入后的/etc/rc.local如下所示
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

echo -n 120 > /sys/devices/platform/i8042/serio0/subsystem/devices/serio2/speed
echo -n 250 > /sys/devices/platform/i8042/serio0/subsystem/devices/serio2/sensitivity
exit 0
上次由 beinflying 在 2010-03-30 18:54,总共编辑 2 次。
beinflying
帖子: 4
注册时间: 2010-03-15 18:43

Re: 如何用户自定义引导程序?

#2

帖子 beinflying » 2010-03-30 12:30

继续等待达人 :em11
头像
icykiss
帖子: 97
注册时间: 2009-10-25 8:52
联系:

Re: 求教 怎样让以下命令开机自动执行?

#3

帖子 icykiss » 2010-03-30 18:02

加入到 /etc/rc.local
  • 你有什么不开心的事情,说出来让大家开心一下。
头像
木泥黑
帖子: 1339
注册时间: 2008-10-18 12:41

Re: 求教 怎样让以下命令开机自动执行?

#4

帖子 木泥黑 » 2010-03-30 18:16

加入到 /etc/rc.local

exit 0前面
头像
qingdaoocean
帖子: 2753
注册时间: 2009-05-16 8:47

Re: 求教 怎样让以下命令开机自动执行?

#5

帖子 qingdaoocean » 2010-03-30 18:24

木泥黑 写了:加入到 /etc/rc.local

exit 0前面
:em11
“飞达”——武汉理工大学开源技术协会http://vedaclub.org/
beinflying
帖子: 4
注册时间: 2010-03-15 18:43

Re: 求教 怎样让以下命令开机自动执行?

#6

帖子 beinflying » 2010-03-30 18:41

已加入了,但是无效,如下所示
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

echo -n 120 > /sys/devices/platform/i8042/serio0/subsystem/devices/serio2/speed
echo -n 250 > /sys/devices/platform/i8042/serio0/subsystem/devices/serio2/sensitivity

exit 0
回复