2010-06-07

How to disable the login sound and other sounds in Ubuntu Karmic

This blog post explains how to disable the login sounds and other sounds for the default GDM and the GNOME session. The solution presented here was tested on Ubuntu Karmic Koala, but there is a little probability that some parts of it would work in other versions of Ubuntu or other Linux systems.

How to disable the login drum sound and the beep sound before logging in

Run this command in a terminal window (without the $ signs):

$ sudo -u gdm gconftool-2 --type=bool --set /desktop/gnome/sound/event_sounds false
Please note that many non-working solution attempts are available on the net, some of them involving the key /apps/gdm/simple-greeter/settings-manager-plugins/sound/active or /apps/gnome_settings_daemon/plugins/sound/active, but those don't work in Ubuntu Karmic.

The sudo -u gdm part in this solution is essential, because the sound is played by GDM, which looks at the settings for the user gdm. Without that part (or with only a simple sudo) it wouldn't have any effect.

The annoying drum sound file is /usr/share/sounds/ubuntu/stereo/system-ready.ogg . Some solutions on the net suggest removing this file (and also bell.ogg). There is no need to do so.

How to disable the welcome sound after logging in

In the menu bar on the top of the screen, select System / Preferences / Startup Applications. In the appearing dialog box, scroll down to find GNOME Login Sound. Untick it. Click on the Close button.

As an alternative, it is possible to disable this sound from the command-line as well:

$ perl -pi -0777 -e 's@^X-GNOME-Autostart-enabled=.*\n@@mg;
       s@\n*\Z(?!\n)@\nX-GNOME-Autostart-enabled=false\n@' \
       ~/.config/autostart/libcanberra-login-sound.desktop

How to disable the Skype login sound after logging in

Start Skype, find its Options dialog box. Select the Notifications tab. In the tab, select Skype Login. Untick Enable Event. Click on the Apply button.

How to disable system sounds (e.g. on mouse clicks)

Run this command in a terminal window (without the $ signs):
$ gconftool-2 --type=bool --set /desktop/gnome/sound/event_sounds false
The following commands don't seem to make any difference, but they wouldn't hurt:
$ gconftool-2 --type=bool --set /apps/gnome_settings_daemon/plugins/sound/active false
$ gconftool-2 --type=bool --set \
  /apps/gdm/simple-greeter/settings-manager-plugins/sound/active false
false

How to disable application sounds (e.g. notifications and game sounds)

Run this command in a terminal window (without the $ signs):
$ gconftool-2 --type=bool --set /apps/empathy/sounds/sounds_enabled false
$ gconftool-2 --type=bool --set /apps/gnobots2/preferences/enable_sound false
$ gconftool-2 --type=bool --set /apps/gnome-power-manager/ui/enable_sound false
$ gconftool-2 --type=bool --set /apps/aisleriot/sound false
$ gconftool-2 --type=string --set /apps/nautilus/preferences/preview_sound never
$ gconftool-2 --type=bool --set /apps/gnibbles/preferences/sound false
$ gconftool-2 --type=bool --set /apps/iagno/sound false
$ gconftool-2 --type=bool --set /apps/gnect/sound false
$ gconftool-2 --type=bool --set /apps/evolution/eplugin/mail-notification/sound-enabled false
$ gconftool-2 --type=bool --set /apps/evolution/eplugin/evolution_indicator/play_sound false
The following commands don't seem to make any difference, but they wouldn't hurt:
$ gconftool-2 --type=bool --set /apps/gnome_settings_daemon/plugins/sound/active false
$ gconftool-2 --type=bool --set \
  /apps/gdm/simple-greeter/settings-manager-plugins/sound/active false

Your system might have more sounds settings if you have non-default applications installed. To find these settings, start gconf-editor, select the Edit / Find menu item, tick the box to search in keys, type sound, and click on the Search button. At the bottom of the main gconf-editor window, you'll find the matches. Browse them and disable them.

No comments: