Gnome used to allow the user to change system sounds to their own liking. The System > Preferences > Sound menu option used to show a breakdown of the specific events with the option to choose whichever supported file the user wanted. Personally, I always opted to replace the login sound with MGM’s roaring lion.

With the new functionality introduced with Ubuntu 9.10 Karmic Koala, there’s no simple way to do this without a bit of hacking at the command line, or through a root nautilus window if one feels inclined.

Navigate to the shared sounds directory.

cd /usr/share/sounds

In it, there should be a directory named ubuntu. Within ubuntu is an index.theme file and the sounds stored in a directory named stereo. I first made a complete copy of the ubuntu directory into a new directory.

sudo cp -a ./ubuntu ./adam

I then opened the ./adam/index.theme file with nano

sudo nano ./adam/index.theme

… and changed my new theme’s name. I changed:

[Sound Theme]
Name=Ubuntu
Directories=stereo

[stereo]
OutputProfile=stereo

… to:

[Sound Theme]
Name=Adam
Directories=stereo

[stereo]
OutputProfile=stereo

… and saved the file.

I now had a new entry in the available themes named Adam.

sound_prefs-theme

To change the startup sound, I had to copy over my MGM roaring lion file and change its name. I renamed the old file just in case. Not that it was needed as it was still in the original ubuntu directory, just following my back-up before editing rule.

cd /usr/share/sounds/adam/stereo
sudo mv desktop-login.ogg desktop-login.ogg.old
sudo cp ~/Audio/mgmua_lionroar.wav .
sudo chmod 0644 mgmua_lionroar.wav
sudo mv mgmua_lionroar.wav desktop-login.wav

The filenames are based on the XDG Sound Theme specifications spelled out at freedestop.org. So far, only .ogg .oga and .wav files are supported.

This should at least start you on your way. There’s a lot more information with examples at freedesktop.org’s website. There have been bug reports filed about having the old functionality restored, but we can only wait and see what develops.

  • Share/Bookmark