|
|
Mute the startup sound using a logout hook
Are there any other hooks available? Sleep?
Mute the startup sound using a logout hook
"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 com.apple.loginwindow LogoutHook /usr/local/bin/mute.sh 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.
Mute the startup sound using a logout hook
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:
If there are other hooks available, what are they?
logout hooks
check out bombich.com and his loginwindow manager
running scripts on sleep / wake
try using sleepwatcher from http://home.t-online.de/home/bernhard.baehr/
Mute the startup sound using a logout hook
Could we make a logout directory and hook to that directory?
Mute the startup sound using a logout hook
I don't think that would work, but you can have your logouthook script run everything in a given directory...
for i in /some/directory/* ; do if [ -x "$i" ]; then . $i fi doneKeep in mind that all of the executable scripts in the targetted directory will be run as root, so be careful who can write into this directory and know what's inside. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|