I need to run a bash script each time a Debian-esque thick client logs off, shuts down, or restarts. Outside of that, it can be any distro, desktop environment, window manager, or otherwise (preferably not Unity or Gnome 3; these are older machines), so long as it can do what I need.
I have already tried Lubuntu 12.04, without any luck.