Do you remember the days when you could assign different startup sounds to your Mac?
Although startup sounds make zero difference to the way your Mac functions, macOS isn’t exactly the most customisable of operating systems, so even small tweaks can make your Mac feel just that little bit more personal.
In this article, I’ll be sharing a trick that makes it feel like customisable Mac startup sounds never went away! We’ll be using macOS’ built-in Automator app to create a script that plays the audio file of your choice at startup – anything from a novelty sound effect, to a burst of your favourite music, or even a pre-recorded message. And, if you fancy something slightly more unsettling, then we’ll also create a script that’ll get macOS to greet you in one of its text-to-speech voices, every time you log into your account!
Play any audio file at startup
You can use macOS’ pre-installed Automator tool to create scripts that run at startup, so in this section we’ll be creating a script that plays the audio file of your choice. You can use this script to play pretty much any audio file, although for copyright reasons it won’t play protected iTunes files. Also, bear in mind that your chosen audio file will play in its entirely every single time you log into your account, so you may want to avoid using long clips, such as complete songs!
To create this script:
- Open a new ‘Finder’ window, navigate to ‘Applications’ and launch the Automator app.
- When Automator prompts you to select the kind of document you want to create, select ‘Application,’ followed by ‘Choose.’
- In the upper-left corner, make sure the ‘Actions’ tab is selected.
- In the left-hand menu, select ‘Library > Utilities.’
- Find the ‘Run Shell Script’ item, and then drag and drop it into the main workflow pane.
- To tell macOS to play an audio file, start by typing the ‘afplay’ command into the ‘Run Shell Script’ box.
- Next, enter the full file path and file name of the audio file that you want to display, or you can enter this information automatically by grabbing the audio file from a ‘Finder’ window, and dropping into onto the ‘Run Shell Script’ box, which adds this information to the command automatically. At this point, your command should look something like this:
- Put your script to the test by clicking the ‘Run’ button, and it should respond by playing your audio file.
- If your script is working as expected, then save it as an application by selecting ‘File > Save…’ from the Automator toolbar.
- Give your application a distinctive name (I’m using ‘startup’) and change the location where this application should be stored, if required. Click ‘Save.’
Now you’ve created your application, you need to set it to launch automatically whenever you log into your user account:
- Click the ‘Apple’ icon in your Mac’s menu bar.
- Navigate to ‘System Preferences… > Users & Groups.’
- Click the little padlock icon in the bottom-left corner, and enter your admin password.
- In the left-hand menu, select your user account.
- Select the ‘Login items’ tab.
- Click the little ‘+’ button.
- In the subsequent window, navigate to the application you just created, select it, and then click ‘Add.’
- Now your application should appear in the list of potential login items. Select its accompanying checkbox and then, every time you log into your user account this script will run and your audio file will play automatically.
Create a spoken greeting
Alternatively, your Mac can greet you with the message of your choice, in one of its text-to-speech voices.
You can use any voice that’s installed on your Mac, so before creating your Automator script, decide which voice you want to use:
- Navigate to ‘System preferences… > Accessibility.’
- Select ‘Speech’ from the left-hand menu.
- Open the ‘System Voice’ dropdown to see a list of all the available voices. To preview a voice, select it from this dropdown and then click ‘Play.’
If you’re not happy with the selection of voices, then you can download additional voices by clicking ‘Customize…’ and then browsing the subsequent list.
Once you’ve decided which voice you want to use:
- Launch Automator and select ‘Application’ when prompted.
- In the left-hand menu, select ‘Library > Utilities,’ and drag the ‘Run Shell Script’ item into the main workflow pane.
- Instruct Automator to speak the following text, by entering “Say -v” into the ‘Run Shell Script’ section.
- Next, specify the voice that you want to use, for example Say -v Daniel.
- Finally, type your greeting, which should give you a command that looks something like:
Say -v Daniel “Welcome back to your Mac!”
- Test that your script is working correctly, by pressing ‘Run.’
- Save your script as an application, by selecting ‘File > Save.’ Give your app a name, and specify where it should be saved on your Mac.
- Set this app to launch at startup, by navigating to ‘System Preferences… > Users & Groups.’
- Click the padlock icon and enter your admin password.
- Select the ‘Login items’ tab, click the little ‘+’ button and select the application that you just created.
- When your app appears in the list of login items, select its accompanying checkbox. Now, whenever you log into your user account, this script will run and your Mac will read out your greeting.
Add Comment