I would like to add login and logout sounds to my Mac. How can I do this?
Save a script like this as
You can then add a LogoutHook key to
See also these questions about running scripts on logout and login and Daemons and Services Programming Guide: Customizing Login and Logout.