I've configured the Debian system on my netbook to shut down whenever the battery runs too low. Problem is, shutting down kills all running applications without giving them any chance to save any document I may be working on.
I'd like to write a script to "gently" close all open applications before shutdown kicks in, but I can't find a way to broadcast a "Close" message to all running applications in Gnome. Is there a way?
EDIT: Hibernating does not work on my netbook, so I can't use it as an alternative solution.