Ubuntu 16.04 does not play a startup / login sound in my laptop, but it’s easy to play a sound at login and customize the sound file by adding a new startup program using Startup Applications utility.
And below steps will show you how:
1. Launch Startup Applications utility from the Dash.
2. When it opens, click Add to add a new startup program and:
- Type any word in Name and Comment boxes.
- For the Command box, paste below line to play the default Gnome login sound:
/usr/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login"
3. To play any other .ogg, .oga, or .wav sound at login, you can use paplay
command in the Command box.
For example:
paplay /home/handbook/Audio/linux-startup.ogg
paplay /usr/share/sounds/purple/login.wav
After saved the changes, you’ll hear the sound at next login.