I would like to add login and logout sounds to my Mac. How can I do this?
How to add login and logout sounds to OS X 10.8.x
audiologinuser-account
Related Question
- MacOS – How to enable remote (mobile) user at login time
- MacOS – How to log login and logout on Mavericks
- MacOS – About ‘Remote Login’ how to logout that
- How to logout from console and turn into login screen
- macOS – Add Custom Message to Login Screen
- How to determine what is causing Mac Pro to automatically log out and where to find logs of logout events
- How to run a sudo command at login/logout on macOS
Best Answer
Save a script like this as
~/Desktop/test
and make it executable withchmod +x ~/Desktop/test
.You can then add a LogoutHook key to
/var/root/Library/Preferences/com.apple.loginwindow.plist
withsudo defaults write com.apple.loginwindow LogoutHook ~/Desktop/test
. It can be deleted withsudo defaults delete com.apple.loginwindow LogoutHook
. You can run a script at login by adding a LoginHook key or by using launchd.See also these questions about running scripts on logout and login and Daemons and Services Programming Guide: Customizing Login and Logout.