zoukankan      html  css  js  c++  java
  • Ubuntu12.04 亮度调节和保存

    最近写code都用Ubuntu, 发现近视越来越严重. 在某个夜晚, 亮度默认原来是最大的....

    为了眼睛..肯定得解决这个问题啦.搜了下,网上有很多种说法. 本人比较笨..太复杂的都不敢看..

    最后终于在不同的文章的找到了不同简单方法:

    • 亮度调节: 

      修改/etc/default/grub文件,打开终端运行:

      sudo gedit /etc/default/grub

      添加下面代码到打开的文件里:

      acpi_osi=Linux acpi_backlight=vendor
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"

      更新gurb,终端运行:

      update-grub

      重启后就可以直接拖动亮度条或快捷键动态调节亮度了。不过下一次开机还是恢复50%亮度,每次开机都需要自己调节。保存亮度这个问题还没解决,先凑合用着,起码不用再忍受刺眼的亮度了。



    • 亮度保存: 

      sudo gedit /etc/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.

      exit 0

       插入这句话到exit 0的前面

        echo 0 > /sys/class/backlight/acpi_video0/brightness

    方法出自: http://paicha.me/2012/03/11/864http://blog.csdn.net/linuxzhouying/article/details/7177200

  • 相关阅读:
    lamp
    ssh 交互脚本
    mysql 备份检测主从脚本
    RANDOM 猜数字脚本
    ansible+playbook 搭建lnmp环境
    集群搭建
    grafana
    nginx lnmp搭建
    shell 基础(1): 变量
    seq 增量输出命令
  • 原文地址:https://www.cnblogs.com/lanxue/p/2881837.html
Copyright © 2011-2022 走看看