On Sun, Jan 21, 2007 at 01:43:35PM -0400, Derek Broughton wrote:
> On Sunday 21 January 2007 13:02, Bert Haverkamp wrote:
> >
> > Is there a way to tell powersaved to just kill these two programs before
> > suspending? Is there in general a way to specify a pre-suspend script
> > and/or a post-suspend script?
> 
> You can specify any script in /etc/init.d/ to be stopped and restarted:
> 
> [EMAIL PROTECTED]:~$ grep SERVICE /etc/powersave/sleep
> ## The same applies for the "SERVICES_TO_RESTART"-variables which defines
> SUSPEND2DISK_RESTART_SERVICES="anacron"
> SUSPEND2RAM_RESTART_SERVICES=""
> STANDBY_RESTART_SERVICES=""

This is correct. You can also add your custom event script as described
here (exact path depends on your installation):

    file:///usr/share/doc/packages/powersave/powersave_manual.html#Events
    file:///usr/share/doc/packages/powersave/powersave_manual.html#Scripts

You can also, although this is a bit hacky, execute scripts as your user by
(ab-)using the knotify service from within kpowersave: In the "extended"
configuration in "configure notifications", you can also configure "run
custom program" for the various suspend events and there enter the path
to a script that kills these applications. This is an evil hack but has
the advantage that it does not run as root which makes it easier to use
some stuff that needs knowledge about your session or access to the X
Server. I do not know for sure if these event scripts are processed
synchronously or asynchronously, though.

Have fun :-)
-- 
Stefan Seyfried
QA / R&D Team Mobile Devices        |              "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg  | "Well, surrounding them's out." 
_______________________________________________
powersave-users mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-users

Reply via email to