Romain Beauxis wrote:
Package: acpi-support-base
Version: 0.103-4
Severity: wishlist
Hi all !
I've followed the thread on shutdown handling through ACPI.
I'm happy that default shutdown has been added back, this was an
important feature.
However, I don't think it's interesting for most users to have only
powersaved treating it or directly shutdown. Having, for a desktop, the
environement to print out a confirmation and do a clean logout would be
much more safe.. This was what was done before.
I don't remember very well why the part that handled kde was removed
from the script, but I can imagine it was not seen as a clean way to
handle any possible case in the main script.
So I would propose, as a goal, that shutdown events could be handled
more properly, which means allowing different processing depending on
actual configuration.
One way could be for instance to create a .d directory where other
packages could write their own shutdown actions.
Scripts there may be processed when a shutdown event is activated.
Of course, we should take care not to process all scripts since for
instance the KDE handler may prompt a confirmation dialog and
the user cancel the shutdown though it.
Possibly a basic priority setting and a return code would be good, like:
01-some-cleanup.sh
10-kde-shutdown.sh
10-gnome-shutdown.sh
99-direct-shutdown.sh
* 01-some-cleanup.sh would then perform some cleanups and return "ok, go on
with other
scripts"
* 10-kde and 10-gnome would for instance check wether it's environement
is loaded, and if this is the case return "I'm handling it, stop
processing". More over, if for instance kde is running but not though
kdm, so that kde cannot handle direct shutdown, the script may for
instance call a logout (possibly with confirmation) and then return
when logout is done...
* If none of the above asked to stop the process, then
99-direct-shutdown.sh may be called, as for a server without graphical
desktop...
Of course these are just ideas, perhaps a better technical solution is
possible, but at least something that covers a better handling than
actual script....
I'm also ok to collaborate, even though scripting it self should not be
that difficult...
Hi Romain,
I think it wouldn't be such a bad thing to modularize this. Note that
actually, the call to CheckPolicy checks for the presence of
gnome-power-manager, kpowersave and/or klaptopdaemon, and succeeds only
if neither of these are running. So not all KDE stuff was removed! I
think this is a reasonable start, however, I agree that a more modular
setup would be preferable. I'll give it a shot some time soon.
Cheers,
Bart
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]