This tutorial shows how to play a sound at login to indicate system is ready in Ubuntu, Debian, Fedora & other Linux with GNOME Desktop.
Like Windows, Ubuntu Linux has disabled the login sound event for years. Though, there are a few Linux distributions (e.g., Linux Mint) that still preserve this feature out-of-the-box. For those would like to re-enable in GNOME, this tutorial will show you how!
1. Prepare the audio file:
Ubuntu by default has the ‘desktop-login.oga‘ and ‘system-ready.oga‘ sound file under ‘/usr/share/sounds/Yaru/stereo’ directory. User may press Ctrl+Alt+T on keyboard to open terminal, and then run command to listen to it:
NOTE this command works when you use default Sound theme in Gnome Tweaks. And make sure no rule in '~/.config/gtk-3.0/settings.ini' or '/etc/gtk-3.0/settings.ini' that disabled system sounds.
Other Linux (e.g., Debian and Fedora) may grab a short sound from the web and try the command below to listen to it:
TIP: Drag & drop file into terminal will insert FILE PATH automatically. Debian 11 has to run
sudo apt install gnome-session-canberracommand to get 'canberra-gtk-play' to work.
2. Play Login Sound for Ubuntu:
Ubuntu has ‘Startup Applications‘ (
gnome-session-properties) utility allows to easily run the command above to play sound at login. Firstly, search for and open it from ‘Activities’ overview:
Next, click ‘Add‘ button and type following in the input boxes:
- Name: Login Sound
- Comment: optional
Make sure you have tried out the command and it plays the sound properly from terminal. And finally save it.
2. Play Login Sound for Debian/Fedora:
Unlike Ubuntu, other Linux does not has the handy graphical tool to run a custom command on startup. Instead, user may create a rule (.desktop) file under “.config/autostart” directory.
Firstly, search for and open ‘terminal’ from ‘Activities’ overview screen.
Next, create the .config/autostart folder in case it does not exit:
Finally, use gedit text editor to generate and edit a ‘login-sound.desktop‘ file:
When file opens, insert following lines (do change the FILE PATH in ‘Exec’ line):
Comment=Play a sound at login
After saving the file. Login sound should play at next boot. That’s all. Enjoy!