magicxqh
V2EX  ›  问与答

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

  •  
  •   magicxqh · Apr 29, 2012 · 5728 views
    This topic created in 5303 days ago, the information mentioned may be changed or developed.
    11 replies  •  1970-01-01 08:00:00 +08:00
    magicxqh
    magicxqh
    OP
    Apr 29, 2012
    1
    没有用linux的吗?v2exer们 -。-
    magicxqh
    magicxqh
    OP
    Apr 29, 2012
    2
    sudo setpci -s 00:02.0 F4.B=66
    magicxqh
    magicxqh
    OP
    Apr 29, 2012
    3
    自动执行
    magicxqh
    magicxqh
    OP
    Apr 29, 2012
    4
    没人吗?
    sunus
    sunus
    Apr 29, 2012❤️1
    5
    放在/etc/environment,或者/etc/profile

    应该不用加sudo
    yishanhe
    yishanhe
    Apr 29, 2012❤️1
    6
    放到/etc/rc.local
    laiwei
    laiwei
    Apr 29, 2012❤️1
    7
    不能放到profile
    这个适合放在 /etc/rc.local 这个文件的末尾,不加sudo
    libei
    libei
    Apr 29, 2012❤️1
    8
    去掉sudo,用文本存放到任何地方,然后在/etc/rc2.d/下创建一个S99xxxxxxx的符号链接到那个文件就可以了。
    magicxqh
    magicxqh
    OP
    Apr 29, 2012
    9
    @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
    magicxqh
    OP
    Apr 29, 2012
    10
    另外想问问怎样开机禁用触摸板?
    yetone
    yetone
    Apr 29, 2012❤️1
    11
    @magicxqh synclient touchpadoff=1放入/etc/rc.local
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1998 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 16:27 · PVG 00:27 · LAX 08:27 · JFK 11:27
    ♥ Do have faith in what you're doing.