[Pm-utils] Hooks Tutorial

Michael Biebl mbiebl at gmail.com
Sat Feb 7 11:11:35 PST 2009

2009/2/7 Pacho Ramos <pacho at condmat1.ciencias.uniovi.es>:
> El sáb, 07-02-2009 a las 12:29 -0600, alkos333 escribió:
>> I need to write two suspend hooks:  one for xlockscreen and the other
>> for gkrellm.
>> I'd like xlockscreen to lock the screen whenever I suspend/hibernate
>> and I want gkrellm to restart whenever I suspend/hibernate because it
>> seems to have a problem with when either a battery or an adapter are
>> used instead of w/e was used prior to suspend.
>> Are there any tutorials that would describe the syntax and give an
>> overview of predefined functions and variable?
>> Thanks,
>> alkos333
> There are information in sources tarball under pm/ subdir
> Also, maybe you could try with mandriva hook for locking sessions (it is
> for kscreensaver, xlock, gnome-screensaver, xscreensaver...) (I attach
> it)

Imho, doing xlock from within pm-utils is wrong, it should be
triggered by the user session.

Nonetheless, writing a hook is pretty simple. Either just take the
existing ones as an example/template
and/or read the manpage of pm-suspend and /usr/share/doc/pm-utils/HOWTO.hooks

Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

More information about the Pm-utils mailing list