Category filter

Script to change alert sound and volume settings on macOS devices

Alert sounds on Mac are generally generated alongside alert messages when the device needs to prompt the user for input or relay some information. With Hexnode’s Execute Custom Script action, you can deploy these scripts to set the preferred alert sound or adjust the alert volume on your macOS devices.

Scripting language – Bash

File extension – .sh

Disclaimer:


The sample scripts provided below are adapted from third-party open-source sites.


Note:


The below scripts will only affect the currently logged in user.

Change alert sound

By default, the alert sound is set on Tink. You can set any of the alert sounds installed on the device by default such as Basso, Funk, Glass, Ping, Pop, Submarine, etc.

To modify the alert sound, deploy the following script.

Mention the name of your preferred alert sound as an argument in the Arguments field while deploying the script. For example, to set alert sound as Submarine, add Submarine to the Arguments field.

Set alert sound to Submerge
Note:


You can deploy the following script to list the available alert sounds on the device.

List available alert sounds

Change alert volume

Deploy the following script to set the alert volume as per your preference. Enter the desired alert volume ranging from 0-100 (in terms of percentage) as an argument in the Arguments field while deploying the script.

For example, to set alert volume to 75%, add 75 to the Arguments field.

Set alert volume to 75
Notes:

  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository