[Debian-eeepc-devel] acpi-scripts: THE LID
Damyan Ivanov
dmn at debian.org
Fri Apr 2 19:21:28 UTC 2010
-=| Malte Dik, Fri, Apr 02, 2010 at 01:52:06AM +0200 |=-
> was thinking about my usecase of closing the netbook, when it is
> connected to an extern monitor, mouse and keyboard - and that
> I don't want to hybernate in this situation. xrandr gives me
> something alon the lines like: "VGA1 disconnected" and I could use
> this in /etc/acpi/actions/lid.sh to check, if an external monitor is
> connected and terminate the script at that location so it is not run
> till the end.
> Now, my bash-scripting skills are so limited, that I only got the script to
> run completely or not at all, because my checks were all wether always true or
> always false.
>
> (...)
>
> S1 = $(xrandr|grep '^VGA.*disconnected.*')
This won't work, because accessing X resources requires a properly set
up X authentication. I think you want to run the detect_x function
(from /usr/share/eeepc-acpi-scripts/functions.sh) before calling
xrandr.
More information about the Debian-eeepc-devel
mailing list