Hirdetés

Aktív témák

  • bob011

    aktív tag

    válasz bob011 #4367 üzenetére

    Egy kis guglizás után:

    #!/bin/sh
    # /etc/acpi/local/lid.sh.pre for Ubuntu Hardy Alpha 4 and possibly others
    # v0.1 Andrew Oakley www.aoakley.com 2008-02-02 Public Domain
    # Workaround to ensure LCD display remains off on laptops when lid is closed
    # even if there is external keyboard/mouse movement (eg. docking station).
    # This file should be owned by root and set: chmod 755
    # This is a quick and dirty workaround which assumes only ONE X session!
    # Also has bug whereby if you close lid, then hibernate/suspend, then resume,
    # LCD won't come back on until you re-close and re-open the lid.
    export XAUTHORITY=`ls -1 /home/*/.Xauthority`
    export DISPLAY=:0
    grep -q closed /proc/acpi/button/lid/*/state
    if [ $? = 0 ]
    then
    xrandr --output LVDS --off
    else
    xrandr --output LVDS --auto
    fi

    thnx 2 Andrew :R

Aktív témák