Why this happens
macOS Terminal and Xcode both use system-level alert mechanisms to notify you of events like build failures, test completions, or shell errors. By default these include an audible bell (the system alert sound), a visual bell (a brief screen flash), and Dock icon bouncing. For developers with acoustic-startle or visual-flash sensitivities — such as those with PTSD, migraine, or sensory processing differences — these sudden stimuli can be disruptive or harmful. The settings to disable them are scattered across each app’s preferences and the system Accessibility pane, so they are easy to miss.
How to fix it
1. Disable alerts in Terminal
- Open Terminal.
- Choose Terminal > Settings (or press
⌘,). - Select the Profiles tab, then choose your active profile (usually “Basic” or a custom one).
- Click the Advanced sub-tab.
- Uncheck the following options:
– Audible bell – stops the system alert sound.
– Visual bell – stops the brief screen flash.
– Bounce app icon when in background – prevents the Dock icon from bouncing when a bell occurs while Terminal is not frontmost. - Close the Settings window; changes take effect immediately.
Tip: If you use multiple profiles (e.g., for different projects), repeat these steps for each profile.
2. Disable alerts in Xcode
Xcode centralizes its alert behaviors in the Behaviors pane. You can silence or modify each trigger individually.
- Open Xcode.
- Choose Xcode > Settings (or press
⌘,). - Select the Behaviors tab.
- In the left column, you’ll see a list of events (e.g., “Build fails”, “Test fails”, “Debugger pauses”). For each event you want to quiet:
– Click the event name.
– In the right pane, uncheck Play sound and choose “None” from the sound pop-up if available.
– Uncheck Show notification (this uses the system Notification Center banner).
– Uncheck Bounce dock icon.
– Optionally uncheck Speak announcement if voice-over is enabled. - Repeat for other events like “Build succeeds”, “Test passes”, etc., if you want complete silence.
- Close Settings.
Note: Xcode also respects the system “Flash screen” accessibility setting (see below). Turning that off will suppress any visual flash Xcode might trigger.
3. System-wide accessibility settings (optional but recommended)
macOS provides global switches that affect all apps, including Terminal and Xcode.
- Open System Settings (or System Preferences on older macOS).
- Navigate to Accessibility > Audio.
- Enable Flash screen when an alert sound occurs — turn this OFF to prevent the full-screen flash.
- Adjust Alert volume slider to zero if you want no audible alerts system-wide.
- For further reduction, go to Accessibility > Display and enable Reduce motion to minimize animation effects that can accompany alerts.
These system settings override per-app preferences in many cases, providing a safety net.
How to prevent it
- Create a “Quiet” Terminal profile with all bells disabled and set it as default for new windows.
- Export your Xcode Behaviors preset (via the gear menu in Behaviors tab) and share it across machines or with team members who need the same configuration.
- Use a dotfiles repository to version-control Terminal profiles (
.terminalfiles) and Xcode preferences (~/Library/Preferences/com.apple.dt.Xcode.plist). - Periodically review System Settings > Notifications to ensure no new apps have enabled intrusive alert styles.
FAQ
Does disabling visual bell in Terminal also disable the screen flash from Xcode?
No. Terminal’s visual bell only affects Terminal windows. Xcode’s visual flash is controlled by its own Behaviors settings and the system-wide “Flash screen” accessibility option.
Will these changes affect other apps like VS Code or iTerm2?
The system-wide Accessibility > Audio settings (flash screen, alert volume) apply to all apps. Per-app settings in Terminal and Xcode only affect those apps. Other terminals or editors have their own preference panes.
Can I keep sounds for critical events (e.g., build failure) but remove the visual flash?
Yes. In Xcode Behaviors, you can uncheck “Play sound” for some events while leaving it checked for others. For visual flash, the system-wide “Flash screen” toggle is all-or-nothing; however, Xcode’s own “Show notification” uses Notification Center banners, not the full-screen flash, so you can keep banners while disabling the flash via Accessibility.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.
