Need a few testers... mute startup sound utility

Posted:
in macOS edited January 2014
Learning how to use some new features of Tiger's loginwindow process...



There is a disk image on my iDisk "johnnylundy" entitled "Mute Startup Sound.dmg" that installs a folder in /Library and makes a couple of changes to the preferences of the system process "loginwindow".



The purpose? When you reboot, there won't be a startup "bong" or "chord" if you have installed this. Your computer's volume is muted on logout and restored to what it was automatically on login, thus making the volume muted during the time the startup chime usually plays.



Click the .dmg on my iDisk to download. This uses a new feature of the Installer.app that is called Internet Enabled Disk Images, in which there won't be an actual .dmg in your downoad folder, but just the contents of the .dmg. Double-click the .pkg file to run the install. The install will place an UN-installer app on your Desktop to use to revert the system to its previous state. No reboot is required except if you want to test the app - to test, make sure the volume is turned up and then reboot. You should NOT hear the startup sound, but the volume should be turned back on automaticallyt as it logs in.



It seems to work on my machines, but I would like any feedback on things that do not work.



NOTE: to UN-install, use the UN-installer app provided.

Comments

  • Reply 1 of 15
    placeboplacebo Posts: 5,767member
    Or you could just mute your comp before you shut it off, or hold Mute while you start it up.
  • Reply 2 of 15
    chuckerchucker Posts: 5,089member
    What does this do that Startup Chime Stopper and StartupSound.prefPane don't?
  • Reply 3 of 15
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by Chucker

    What does this do that Startup Chime Stopper and StartupSound.prefPane don't?



    OK, all I wanted was some testers. But I did take a look inside those 2 you mention.



    StartupSound.prefPane installs a kernel extension, jeez talk about overkill.

    The other one claims it installs a "background application" and is 1.1 MB in size. I see no reason to run a background app to do this.



    But that is irrelevant. I just need some testers.
  • Reply 4 of 15
    lupalupa Posts: 202member
    Sure, sign me up.
  • Reply 5 of 15
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by Lupa

    Sure, sign me up.



    Just go to my iDisk (choose Go->iDisk->Other User's Public Folder in Finder) and enter johnnylundy for the user name. Click on the Download eyeball for "Mute Startup Sound.dmg" . It will download a package onto your download location. Double-click the package and follow the steps in the Installer. Then set your volume high and reboot. If it works, you should NOT hear the startup sound, but after booting your volume should be back to what it was before rebooting.



    Then double-click the Uninstall Mute Startup Sound icon on your Desktop to uninstall it.
  • Reply 6 of 15
    lupalupa Posts: 202member
    Nothing. I tried it a few times but it didn't seem to effect anything on start up.



    I'm using a G3 800 iBook running 10.4.3
  • Reply 7 of 15
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by Lupa

    Nothing. I tried it a few times but it didn't seem to effect anything on start up.



    I'm using a G3 800 iBook running 10.4.3




    The startup chime still played on startup? In other words it did not get muted?



    Did you run the installer?



    Did it ask for authentication?



    Does the folder LoginWindowHooks exist in your /Library folder?
  • Reply 8 of 15
    You may want to look at how you're installing those LoginHooks, lundy. You've left the permissions on the scripts themselves as 775, and you've written the loginwindow defaults into /Library/Preferences, which is also root:admin 775. Both of these mean that a process run by an administrator could alter those scripts to do whatever they want, without requiring authentication first. I'd make /Library/LoginWindowHooks root:wheel 755, and modify your defaults command to write to root's domain, as per here. I'd love a way to kill all audio at login, in a way that a user cannot override; but that seems tricky to do in Tiger.
  • Reply 9 of 15
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by Jellytussle

    You may want to look at how you're installing those LoginHooks, lundy. You've left the permissions on the scripts themselves as 775, and you've written the loginwindow defaults into /Library/Preferences, which is also root:admin 775. Both of these mean that a process run by an administrator could alter those scripts to do whatever they want, without requiring authentication first. I'd make /Library/LoginWindowHooks root:wheel 755, and modify your defaults command to write to root's domain, as per here. I'd love a way to kill all audio at login, in a way that a user cannot override; but that seems tricky to do in Tiger.



    Thanks for the help. I would love to know a straightforward way to solve this permissions issue. The install works fine on my G5 machine, but not on the G4, both running Tiger. I have one report from a user that it successfully sets the defaults keys, but the scripts don't get run by loginwindow, as evidenced by a blank console.log.



    PackageMaker says that you should leave the permissions at "root:Admin" to make the Installer actually install them as "{currentUser}:Admin", and indeed this is what mine are installed as on the G5 (lundy:admin).



    I don't want to have the user have to authenticate the "defaults write" command, as the Apple Tech Note suggests, but if I have to I will write it that way.



    Also, it says Loginwindow runs all its hooks as root. This being the case, could I install the scripts in the CURRENT USER'S home directory somewhere, and loginwindow could still find them, seeing as how it is "between" users when it executes them?
  • Reply 10 of 15
    lupalupa Posts: 202member
    Quote:

    Originally posted by lundy

    The startup chime still played on startup? In other words it did not get muted?



    Did you run the installer?



    Did it ask for authentication?



    Does the folder LoginWindowHooks exist in your /Library folder?




    Sorry for not responding sooner...



    1. The start up shime did play.



    2. Yes.



    3. No.



    4. Nope, and spotlight turns up nothing.



    Hope that helps.
  • Reply 11 of 15
    lundylundy Posts: 4,466member
    Thanks a lot for the feedback. There are permissions problems and I have filed a request for assistance at developer technical support. Hopefully I will be able to get a reliable utility made after they help me sort out the permissions issues.
  • Reply 12 of 15
    Why would you need something like this? Can't you just mute the computer volume? It won't play the chime on startup, or is this for a lab? Kernel Extensions are gonna break with every OS X update. If you seriously want to disable the startup chime i believe you can rewrite the openfirmware. There are several programs to do this and you can replace the sound bite with whitenoise.



    Quote:

    Originally posted by lundy

    Thanks a lot for the feedback. There are permissions problems and I have filed a request for assistance at developer technical support. Hopefully I will be able to get a reliable utility made after they help me sort out the permissions issues.



  • Reply 13 of 15
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by webmail

    Why would you need something like this? Can't you just mute the computer volume?



    Nobody remembers to mute the volume before restart. Then they get a loud startup sound at 3 AM and the dog starts barking.

    Quote:

    Kernel Extensions are gonna break with every OS X update.



    This is not a kernel extension.

    Quote:

    If you seriously want to disable the startup chime i believe you can rewrite the openfirmware. There are several programs to do this and you can replace the sound bite with whitenoise.



    Rewriting the OF is not a good solution for the average user. This technique works on my G5 just fine; it's the permissions problems with loginwindow that is making it not work on some machines - as soon as I find out why PackageMaker is not setting the correct permissions it will work fine, and not mess with the kernel or start a background process like the other 2 utilities on VersionTracker do.



    Loginwindow has 2 hooks that a lot of labs use for logging, clearing the communal account for the next user, etc.



    Loginwindow LoginHook: calls your executable when a user logs in

    Loginwindow LogoutHook: calls your executable when a user logs out



    So setting LogoutHook to mute, and LoginHook to unmute, mutes the sound during the time period between logout and login, which is the time period that the firmware plays the startup sound.



    Due to loginwindow being finicky about running as root, it is not calling the hooks on certain machines. I'm not setting it to root; it always runs as root.
  • Reply 14 of 15
    hmm. how about assigning an applescript to mute the volume on shutdown? On my old powerbook i cut off a headphone jack and stuck it in the port, worked great. Or even just to plug in speakers and turn them off. Or why shutdown at all? With OS X shutdown and restart doesn't make sense, you could also just very simply disconnect the speaker in the g5, or plugin stereo headphones.
  • Reply 15 of 15
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by webmail

    hmm. how about assigning an applescript to mute the volume on shutdown?





    The only way to do that in OS X is to use the Loginwindow Hooks.

    Quote:

    On my old powerbook i cut off a headphone jack and stuck it in the port, worked great. Or even just to plug in speakers and turn them off.



    Yes, yes, we know all that. There are people who keep their speakers on and their volume up. They want to leave that alone, and still mute the startup sound.

    Quote:

    Or why shutdown at all? With OS X shutdown and restart doesn't make sense,



    Software Update frequently requires it. As do the ADC 10.4.4 builds that we get.

    Quote:

    you could also just very simply disconnect the speaker in the g5, or plugin stereo headphones.



    Sure. The point is people don't remember to do that.
Sign In or Register to comment.