Possible Duplicate:
How to stop turning off sequence when power manager says that battery is too low and want to power down?
Usually I open a root window to have a chance to stop the invoked shutdown sequence because Ubuntu must first ask for permission to close the root window.
BUT several times later I forget that the shutdown sequence was initiated and close the root window. This leads to a shutdown even when the system is already back on the power line and recharging the battery.
shutdown -c
in a/the still open root window doesn't work here.