No sound effects play when "play sound effects when buttons are clicked" is enabled

Bug #273507 reported by zombiepig
160
This bug affects 15 people
Affects Status Importance Assigned to Milestone
libcanberra (Ubuntu)
Triaged
Medium
Unassigned
Nominated for Intrepid by Phil
Nominated for Jaunty by Phil

Bug Description

Binary package hint: libcanberra-gtk-module

As initially detailed in some of the comments in #258703, selecting the "Play sound effects when buttons are clicked" has no effect.

The instructions in this mailing list post (https://tango.0pointer.de/pipermail/libcanberra-discuss/2008-July/000021.html) need to be followed to enable libcanberra gtk integration, which will properly enable gtk-sound effects. Quoted here:

"...Packagers!

If you package libcanberra, make sure to include a script like this
one in your package:

<snip>
#!/bin/sh

if [ -z "$GTK_MODULES" ] ; then
        GTK_MODULES="libcanberra-gtk-module"
else
        GTK_MODULES="$GTK_MODULES:libcanberra-gtk-module"
fi

export GTK_MODULES
</snip>

This script should be sourced in each Gnome session and will enable
the libcanberra gtk module for all gtk programs.

In fedora we install it as "libcanberra-gtk-module.sh" in
/etc/X11/xinit/xinitrc.d/. I assume other distributions have similar
directories.
..."

I think this is missing from the ubuntu libcanberra packages, which is preventing the gtk sound effects from working properly.

Revision history for this message
John Doe (jodo-deactivatedaccount) wrote :

Should this Script enable the Sounds when runned? In that case: didn't worked for me (Intrepid Ibex, Updates: 23. Sep.).

The Directory /etc/X11/xinit/xinit.d/ don't exists here.

Revision history for this message
Richard Rickwood (rickwookie) wrote :

I managed to get my login sound working by installing the package libcanberra-gnome.

This package has the same description as libcanberra-gtk0:
"Gtk+ helper for playing widget event sounds with libcanberra
libcanberra-gtk provides a few functions that simplify libcanberra
usage from Gtk+.

Contextual informations are needed to play event sound. This library
can help to compile directly event sounds property lists based on
active GtkWidget objects or GdkEvent events."

however it adds the lines
"This package contains files necessary to get full GNOME sound event
functionality."

So you would think that it should be a dependency of ubuntu-desktop, but it isn't. It is however a dependency of ubuntustudio-desktop. Is this an oversight?

Either way, it still doesn't fully enable the sounds. I still have no logout sound and if I select the "Play sound effects when buttons are clicked" checkbox in Sound Preferences, I still here no click when I click a button.

Revision history for this message
Richard Rickwood (rickwookie) wrote :

The changelog here:
https://launchpad.net/ubuntu/intrepid/+source/libcanberra/0.6-0ubuntu2

mentions the addition of this package.

Revision history for this message
zombiepig (nyall-zombiepigs) wrote :

I can confirm that the recent addition of libcanberra-gnome to ubuntu-desktop has fixed the missing login sounds, but it hasn't fixed the missing libcanberra-gtk-module which will enable the gtk integrated sounds...

Revision history for this message
Nick B. (futurepilot) wrote :

I can confirm this. I have all the system sounds enabled but none of them play. The only one that works is the login one as mentioned above. Although I can preview them in the sound properties, none of them are triggered by the various events.

Dean Loros (autocrosser)
Changed in libcanberra:
status: New → Confirmed
Revision history for this message
zombiepig (nyall-zombiepigs) wrote :

There's a newer version of libcanberra released which may fix this problem. In 0.10 there's the option to use a gconf schema file to load the gtk module, rather than the GTK_MODULES variable. This may fix this bug. The full release notes for libcanberra 0.10 state:

This release includes a GConf schema file which can be used to
activate the libcanberra Gtk+ module more elegantly than via setting
$GTK_MODULES. Please note however that that will work only with very
new version of gnome-settings-daemon. In fact, with a version that is
so new it isn't even released yet! ;-)

This release also includes quite a few important fixes, so please make
sure to update. If you aren't shipping the new g-s-d version you can
safely drop the schema file from your distro package. It should be
safe to set GTK_MODULES and use the schema file in parallel. It might
even be wise for enabling input feedback sounds even in non-GNOME
sessions.

http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.10.tar.gz
http://0pointer.de/lennart/projects/libcanberra/

Jasper Lievisse Adriaanse (1):
      missing stdarg.h inclusion for OpenBSD compatibility

Lennart Poettering (13):
      require gconf only if we build against gtk
      make ourselves resident
      fix a memory leak
      don't free sound_path on success
      explicitly cast to long to avoid compiler warning
      remove variable names from argument lists to avoid stupid
      compiler shadow warnings
      fix prefix of byte order macros
      move ca_proplist_merge_ap()/ca_proplist_from_ap() to proplist.c
      where it belongs
      implement ca_memdup()
      minor build system fixes
      call AM_GCONF_SOURCE_2 unconditionally
      remove AM_LIBADD again since it is pointless
      bump release and soname

Marc-André Lureau (1):
      Make tdb_context database static

Matthias Clasen (1):
      Enable canberra-gtk-module via GConf

Revision history for this message
kaij74 (kaij74) wrote :

I tried it, yes latest 0.10 versions fixes this bug. If that schema is installed.

Revision history for this message
James Schriver (dashua) wrote :

kaij64,

What flags did you use for installation of 0.10? I built and installed from source with no problems, but there was no gconf entery under /schemas/apps/gnome_settings_daemon/gtk-modules.

Revision history for this message
Peter Stuart (stuart-peter) wrote : Re: [Bug 273507] Re: No sound effects play when "play sound effects when buttons are clicked" is enabled

did just the same,
must be a gnome bug.

On Wed, Oct 8, 2008 at 9:40 PM, dashua <email address hidden> wrote:

> kaij64,
>
> What flags did you use for installation of 0.10? I built and installed
> from source with no problems, but there was no gconf entery under
> /schemas/apps/gnome_settings_daemon/gtk-modules.
>
> --
> No sound effects play when "play sound effects when buttons are clicked" is
> enabled
> https://bugs.launchpad.net/bugs/273507
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Linux usr #206738 since 1998
Linux Counter http://counter.li.org

Revision history for this message
kaij74 (kaij74) wrote :

You have to install it manually, gconftool-2 --install-schema-file libcanberra.schemas. That file is ofcourse in your build tree. You might need newer pulseaudio than 0.10 so this bug might be impossible to fix for intrepid.

Revision history for this message
James Schriver (dashua) wrote :

kaij74,

Thank you, libcanberra 0.10 is working flawlessly with the latest pulseaudio version in Ibex. I'm us 64 bit version. I recommend this for an upgrade to get event sounds working again. I am still testing but all seems to be working as normal.

As kaij74 stated: The libcanberra.schemas file must be loaded manually from your build tree "gconftool-2 --install-schema-file=libcanberra.schemas"

Revision history for this message
James Schriver (dashua) wrote :

Just an F.Y.I., fresh install of Intrepid 32 bit. I added the above schema gconftool-2 --install-schema-file=libcanberra.schemas from libcanberra-0.10 without building the new version and most of the system sounds are working for me. The only one that seems to be missing is a click event from the menus (application menu, Epiphany bookmarks, etc.). All the pulseaudio defaults as well.

Revision history for this message
zombiepig (nyall-zombiepigs) wrote :

I can confirm that - all that's required is installing the schema file from libcanberra-0.10

From my tests, the following effects work:
- button clicked (mostly, doesn't activate on "close" buttons)
- toggle button clicked
- window maximized
- window unmaximized
- window minimized
- login
- logout

The following don't work
- empty trash (probably because it's not implemented yet, see http://bugzilla.gnome.org/show_bug.cgi?id=546989 for patch)
- information or question alert (at least, not for any of the question alerts I could find)

I haven't tested the following
- Long action completed
- New e-mail
- Warning alert
- Error alert
- Battery Warning

Revision history for this message
Sergio Schneider (spsf) wrote :

For all of you trying to install the new libcanberra, do this:
Check this page: "https://launchpad.net/~gkulyk/+archive" with the latest libcanberra 0.10 (the one used in intrepid is the outdated 0.6).
Included the line: "deb http://ppa.launchpad.net/gkulyk/ubuntu intrepid main" in synaptic and reload.
Immediately the new 0.10 will show up as an upgrade, marked all upgrades, and reboot!
Have fun!
Thanks to Gert Kulyk for supplying the updated libcanberra!

Revision history for this message
Dave Stroud (bigdavesr) wrote :

thanks Gert Kulyk. I now have sound events again. Libcanbera 0.10 fixed.

Changed in libcanberra:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Michael Humblet (humbletmica) wrote :

Hi, I found this page while searching to fix the event bug on intrepid because I made a complete sound theme. I installed the new update properly, but I still notice that some sound doesn't play.

battery-low
complete-download
complete-media-burn
device-added/removed
link-pressed
power-plug/unplug
software-update-urgent/available
system-shutdown
trash-empty
battery-full
file-trash
item-deleted
network-connectivity-established/lost
screen-capture

It is pretty annoying.

Revision history for this message
Marcus (mwillams73) wrote :

UH is there any way you guys could be more specific as to how to get synaptic to retrieve this file, cause its not working for me, It does not show anithing but 06 version so how do i get it to retrieve this file so I can install it?

Revision history for this message
Shirish Agarwal (shirishag75) wrote :

Marcus,
  If you are on Intrepid then you need to add the repository

"deb http://ppa.launchpad.net/gkulyk/ubuntu intrepid main"

by going to System > Administration > Software Sources

Third Party Software tab.

Click on Add and give the above line without the quotes

Click Close .

It will ask to reload, let it do fetch.

In the updates you will get the new canberra 0.10
--
          Regards,
          Shirish Agarwal
  This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17

Revision history for this message
Marcus (mwillams73) wrote :

Thank You very very much, this was the last little bug that i needed to fix, Im still kinda new at this but your explaination helped me tremendously!!!! I like learning all these new fixes so I can help others.

Revision history for this message
Shirish Agarwal (shirishag75) wrote :

Hi all,
 Is it required to do gconftool-2 --install-schema-file
libcanberra.schemas. if you are in jaunty (for some sounds are not
working in my jaunty install) and I have libcanbeera 0.10 there.
--
          Regards,
          Shirish Agarwal
  This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17

Revision history for this message
Michael Humblet (humbletmica) wrote :

@Shirish: is it needed even if I installed it with the reppository ?

Revision history for this message
Shirish Agarwal (shirishag75) wrote :

Michael: I am asking the same question.

The only difference perhaps might be I'm in jaunty which has
libcanberra by default.
--
          Regards,
          Shirish Agarwal
  This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17

Revision history for this message
Everthon Valadão (valadao) wrote :

@Shirish Agarwal: thank you so much, the libcanberra fix worked here!

Revision history for this message
Pako (elektrobank01) wrote :

The issue remains unsolved in Ubuntu Studio 9.04, there is no sound effects and other system sounds either. Its not case in Ubuntu 9.04

farchumbre (farchumbre)
visibility: public → private
visibility: private → public
Revision history for this message
Pako (elektrobank01) wrote :

Yesterday I installed latest updates for karmic ubuntu studio and still can not hear any sound with "libcanderra 0.12-1"

Revision history for this message
Umang Varma (umang) wrote :

Shirish's comment (https://bugs.launchpad.net/ubuntu/+source/libcanberra/+bug/273507/comments/18) fixed it for me.

Could someone explain what is the need to do "gconftool-2 --install-schema-file libcanberra.schemas" (https://bugs.launchpad.net/ubuntu/+source/libcanberra/+bug/273507/comments/10) ? I didn't need to do this to get the problem fixed.

If this bug is fixed in Ubuntu 9.04 (Jaunty) but not in Ubuntu Studio 9.04 then maybe it is because of a different cause and requires a separate bug?

Revision history for this message
G. Gibson (mistergibson) wrote :

I'm on Jaunty, and when I do this:

/usr/bin/canberra-gtk-play --id="desktop-login"

... I get this:

Failed to play sound: Invalid argument

I'm using 0.11-1ubuntu5 version of:

libcanberra0, libcanberra-gtk0, libcanberra-gtk-module, and gnome-session-canberra.

BTW: here is a link to libcanberra.schemas http://gitorious.org/libcanberra/mainline/blobs/55bbdabff750c4eac69ab213a6eb690d7e820379/libcanberra.schemas

I applied the file to gconf, but to no avail. Also, even when I enter a --file= argument, or ANY other seemingly valid argument to canberra-gtk-play, I get the same response. I therefore am thinking that this is a deeper issue with canberra-gtk-play.

Do you guys think I should file this as a separate bug?

Cheers,

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Chris that linked comment seems like spam, I reported it now

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.