12

The version of Mac OS X being used is 10.8.5.

When I click the back button on an empty terminal windows if give a alert sound which is the 'Funk' sound in the System Preferences -> Sound -> Sound Effects

I tried going to the Terminal Preferences -> Settings -> Advanced where there is a checkbox for turning the Audible/Visual Bell but not change the audible bell.

Can this sound be changed to anything else in the Sound Effects list like Submarine, Tink etc.

3 Answers3

9

It looks like for macOS Sierra you simply need to change the Alert Sound under the Sound System Preferences (System Preferences > Sound > Sound Effects).

9

In Sierra:

defaults write .GlobalPreferences com.apple.sound.beep.sound /System/Library/Sounds/Submarine.aiff
  • 1
    This works for me on High Sierra. user495470's answer does not work for me.

    Not sure why this was down voted. While the OQ asked about 10.8.5, surely keeping this resource current is more helpful.

    – Wade Williams Nov 15 '17 at 22:15
  • I can confirm for High Sierra, though I needed to edit this while being su. You can probably also do it with plain sudo, but I wanted to create a directory /var/root/Library/Sounds, copy a sound file there, and use that for global preferences. Worked great. – JayB Oct 13 '18 at 09:24
  • 1
    Works for macOS Big Sur 11.2.1 too. – Klas Mellbourn Feb 12 '21 at 14:33
  • Note that this may be unset, in which case it will default to /System/Library/Sounds/Tink.aiff (Boop in System Settings) on macOS Sonoma. – user12638282 Nov 21 '23 at 20:31
5

I don't know how to make Terminal use a different alert sound, but if others search for how to change the OS X-wide alert sound from a script, change the com.apple.sound.beep.sound key in the com.apple.systemsound domain:

defaults write com.apple.systemsound com.apple.sound.beep.sound /System/Library/Sounds/Frog.aiff
Lri
  • 105,117
  • 1
    This no longer seems to work in macOS Sierra. Do you have a new approach here? – Wade Williams Oct 26 '16 at 16:50
  • @WadeWilliams: It works for me using El Capitan, but iTerm2 needs to be restarted for the change to take effect. Interestingly, the change registers immediately for the Terminal app. – jvriesem Aug 10 '17 at 19:39