Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Mute the startup sound using a logout hook' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mute the startup sound using a logout hook
Authored by: extra88 on Oct 08, '03 12:39:34PM
"Logout hooks" are just Login Items that run at logout instead of login. There's no GUI for setting programs to run at logout so you have to resort to console commands like this one

sudo defaults write LogoutHook /usr/local/bin/

The muting magic it being done by using AppleScript to set the volume. According to a recent O'Reilly article, there's no direct AppleScript control for Sleep but they provide a script using AppleScript GUI Scripting (basically a script which uses an application's menus , buttons, etc.) You could probably create this sleep script and set a logout hook to run it so every time you log off, the computer goes to sleep.

[ Reply to This | # ]

Mute the startup sound using a logout hook
Authored by: Eravau on Oct 08, '03 01:40:51PM
I may be wrong, but I think david-bo was asking if there are any other hooks you can use besides ones that are caught at Logout. For example, could you set a hook to run certain things when you tell the computer to go to sleep (or startup or shutdown, etc.). For Example:

sudo defaults write SleepHook /usr/local/bin/

If there are other hooks available, what are they?

[ Reply to This | # ]

logout hooks
Authored by: matx666 on Oct 08, '03 01:50:19PM

check out and his loginwindow manager

and his hooks


[ Reply to This | # ]