[openbox] a power daemon for openbox users?
pedrib at gmail.com
Tue Jul 13 15:49:36 EDT 2010
On 13 July 2010 16:57, Louis-David Mitterrand
<vindex+lists-openbox at apartia.org> wrote:
> What do openbox users use as power-daemon on their laptop? Some utility
> that would halt or suspend when battery power becomes critically low,
> but without any gnome dependency. Does such a thing exist?
> openbox mailing list
> openbox at icculus.org
It exists, and certainly its already installed in your laptop. Its
called acpid. Its a daemon that responds to ACPI events.
In Debian/Ubuntu, there are two directories where you can put scripts
to control it.
/etc/acpi/events - the events that trigger an action
/etc/acpi/actions - actions taken (regular bash scripts)
The format of the events is pretty simple, here's one:
event=battery/* PNP0C0A:00 00000080 00000001
This basically means that when the event with that code occurs, the
script in action is run.
To find out event codes, run the acpi_listen program. Wait for a
critical or low battery warning (possibly watching the battery low led
on your laptop) and note down the corresponding code on event=. Then
just run a script that hibernates, shuts down, whatever on action=
(remember to set the executable bit on the script).
It may be more trouble that its worth it. It took me a few weeks to
get all my pm functions right, but now I'm completely free of any
gnome-power-manager, pm-utils and all that crap which gave me trouble
for such a long time.
More information about the openbox