Automator allows you to create custom apps on your Mac to get your tasks done. You can use it to create an app that adds a startup sound to your Mac. Here’s how.
Adding a Startup Sound to Your Mac
In order to do this you are going to use the built-in Automator app to create an app with shell script that runs the required commands to play a music file when you start your Mac.
Click on Launchpad in your dock and search for and click on “Automator,” and it will launch for you.
You should see a dialog box allowing you to either open or create a new document on your Mac. Select the “Applications” folder from the left side, and then click the button that says “New Document.”
The screen that follows will ask you what kind of document you wish to create. Select “Application,” and then click the “Choose” button to move forward.
The new document is ready to be filled in with your items. Since you wish to add a startup sound, you will need to create a script that automatically runs and does the task for you. To do that, drag “Run Shell Script” from the actions list over to the workflow pane.
Under the shell script area where you can write your own code, type in the following: Then press Space and enter the full path to the sound file that you wish to add as a startup sound. You can also drag and drop the music file onto the text area, and its full path will be automatically added. Here’s what the full code looks like: Make sure to surround the full path with double quotes to avoid any command issues.
Your script is ready, so let’s test it to see if it works. Click on “Run” in the top-right corner.
You will get a prompt warning that the app will not receive input when it is run inside Automator. Move forward by clicking the “OK” button.
If the sound file plays, you are good to go. If it does not, make sure that the path to the file is correct and is surrounded by double quotes. Now that your script is ready, save it by selecting the “File” menu followed by “Save…”
Enter a name for your app and then click the “Save” button. Make sure that the “Where” drop-down menu says “Applications” so that the app is saved with other apps.
Your app has been successfully saved and is ready to be used. Since your aim is to play the music file when you start up your Mac, you will need to add the app to your startup items list. To do that click on the Apple logo in the top-left corner and select “System Preferences…”
Once in the Preferences panel, click on “Users & Groups” to be taken to your user account settings.
Click on your user account in the left, then click on “Login Items,” and finally click the “+” (plus) icon to add a new login item to your list.
Select the app that you created above using Automator. It should be in the “Applications” folder. Select it and click on “Add.”
The app will instantly be added to the list.
Now it is time to test out the app. Reboot your Mac from the Apple menu. When your Mac boots up you should hear your chosen startup sound.
Conclusion
Sometimes, even a simple music file can boost your productivity and relax your mind. The guide above should help you add your favourite music file as a startup sound to your Mac so you can hear it every time you start your machine. Let us know how it works for you!