You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, December 2nd 2007, 2:09am

logout callback facility

hi all,

I have the following situation:
I use a script to automatically backup my laptop as soon as it is booted up and connected to the appropriate storage location and a certain time has elapsed since the last backup run.

The problem is that it is possible to forget about the running backup, say I just fire the machine up quickly to look up something on the web and shut it down immediately afterwards, but in the meantime the backup has started.
I'd like to run a script that checks for running backups and waits for completion and I'd prefer this to happen no matter how I am leaving the GUI (i.e. KDE).
What I need is some sort of callback facility in the logout dialog where I can register my script(s) for execution.

Furthermore it should be possible to control via the return value of such a script what happens next - the operation selected in the dialog is executed (i.e. suspend/hibernate/logout/shutdown... is commenced) or cancelled (i.e. the dialog is closed and the control is returned to KDE and thus the user).
This would make it possible to wait for an operation (e.g. completion of the backup) and then do whatever the user intended in the first place, without any additional user interference (so I can leave immediately and do not have to stay around).

I know about .kde/shutdown, but I do not deem this appropriate, because I don't think it is executed when hibernate or suspend is called and it does not allow to return to KDE depending on the outcome of the script(s) (or does it?)


Is there any possibility in current KDE to do this? If not, where do I suggest this enhancement?
This would also be another good point that'd discern KDE/Linux from Win ;o)

The same would of course also be nice for the terminal mode (no X) as well, but there it is easier to hook into shell logout scripts or use the appropriate runlevels 0 and 6 directly. Moreover, it has become quite rare to switch to text mode on user machines (I do have nice terminal windows in the GUI after all :o)

Greetings & cheers