Logout hook?

Logout hook?

Post by George Balt » Fri, 23 Feb 2001 10:17:19



Do any of the various Linux Desktops/Session_Managers have a hook for
something to be run at session end?  Under CDE, if the file
$HOME/.dt/sessions/sessionexit exists (and is executable), it's run (as
the exiting user) before the session is torn down.  I have used it for
the likes of `kdestroy`, and would like to run `ssh-agent -k`, if
necessary.  So far, my searches through the Gnome, KDE, and XFree86 docs
have been fruitless.  Have I been looking in the wrong places, or does
such a hook not exist?

Requirements:  Must be triggered by it's existence - may be dynamically
created during the session.
                       Must be run with the env() of the XSession.
Goodness: No other user file changes, no lurking process for duration of
session.
Nice: Maybe it's a directory, a la the startup whatever.d.