Hi, I am trying to restart pdnsd (a dns cache) when I resume or thaw, because it needs to clean up its cache. I've looking for a folder where to put some kind of script for doing that with no luck. Disabling it (and using acpi or pm-utils) is an ugly mechanism I do not like and by using xfce-power-manager I can not execute any script. It's just an enhancement so we get the best of both worlds: a gui interface and the possibility to execute our own scripts to shutdown/restart special apps. Thanks. Victor.
This is more on the backend part (upower, pmutils), i can't add these low level options to xfpm.
I think you are right. Acpi uses CheckPolicy() to see if a power manager is running: ------------------------------------------------------------------------- # The (not very aptly named) function CheckPolicy checks if the current X # console user is running a power management daemon that handles suspend/resume # requests. This is used in various places to determine if we need to handle # something ourselves or if we need to pass the info on to a power management # daemon (e.g. through a fake key press). CheckPolicy() { local PMS getXconsole PMS="/usr/bin/gnome-power-manager /usr/bin/kpowersave /usr/bin/xfce4-power-manager" PMS="$PMS /usr/bin/guidance-power-manager /usr/lib/dalston/dalston-power-applet" if pidof -x $PMS > /dev/null || (test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q klaptopdaemon) || PowerDevilRunning ; then echo 0; else echo 1; fi } ------------------------------------------------------------------------- And then it decides to do nothing and let the power-manager do it. I wanted to ask how the xfce4 power manager decides to use a backend (which command line it executes, how it works when it receives a msg telling him, for example, that power button is pressed). Do you think I could change this command by an script doing what I need? Thanks.