ubuntu下,如何让这条指令开机自动执行? sudo setpci -s 00:02.0 F4.B=66 //显示器亮度调节

2012-04-29 08:11:00 +08:00
 magicxqh
4585 次点击
所在节点    问与答
11 条回复
magicxqh
2012-04-29 08:13:23 +08:00
没有用linux的吗?v2exer们 -。-
magicxqh
2012-04-29 08:16:27 +08:00
sudo setpci -s 00:02.0 F4.B=66
magicxqh
2012-04-29 08:16:40 +08:00
自动执行
magicxqh
2012-04-29 08:19:22 +08:00
没人吗?
sunus
2012-04-29 08:37:21 +08:00
放在/etc/environment,或者/etc/profile

应该不用加sudo
yishanhe
2012-04-29 08:56:46 +08:00
放到/etc/rc.local
laiwei
2012-04-29 08:56:51 +08:00
不能放到profile
这个适合放在 /etc/rc.local 这个文件的末尾,不加sudo
libei
2012-04-29 09:02:15 +08:00
去掉sudo,用文本存放到任何地方,然后在/etc/rc2.d/下创建一个S99xxxxxxx的符号链接到那个文件就可以了。
magicxqh
2012-04-29 09:39:46 +08:00
@sunus @yishanhe @laiwei @libei感谢回答
将rc.local写成:
#!/bin/sh -e
#
# 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.

setpci -s 00:02.0 F4.B=66
exit 0
即可。
magicxqh
2012-04-29 09:41:23 +08:00
另外想问问怎样开机禁用触摸板?
yetone
2012-04-29 10:22:15 +08:00
@magicxqh synclient touchpadoff=1放入/etc/rc.local

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/34043

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX