I'd like to make a command run every time I log out. Is there a way to do this?
If you are speaking of logging out of a bash login shell, there's a solution with
If you are speaking of logging out of the X-window system, there are far too many ways to get yourself "logged out" for there to be any way to guarantee the command will run.
However, since you are the one doing the logging out, if you change your logout habit, this might work...
If you are running gnome, you might want to write a short script - maybe called "logo" - put it in
The "logo" script would do two things: