Is libcanberra deprecated?

Hi, ALL,

At work we are using RHEL8 with the X11/GNOME (unfortunately we can’t use default Wayland backend {yet}).

When our software runs we see a message such as: “Failed to load module “canberra-gtk-module””.

I tried to see if I can eliminate this. Unfortunately I got following:

~/work_copy/TPW$ sudo dnf install *canb*
Updating Subscription Management repositories.
Last metadata expiration check: 3:00:10 ago on Fri Jul  1 11:38:54 2022.
Package libcanberra-0.30-18.el8.x86_64 is already installed.
Package libcanberra-gtk3-0.30-18.el8.x86_64 is already installed.
Dependencies resolved.
 Package                                                Architecture                          Version                                        Repository                                                       Size
 libcanberra-devel                                      x86_64                                0.30-18.el8                                    rhel-8-for-x86_64-appstream-rpms                                 39 k
 libcanberra-gtk2                                       x86_64                                0.30-18.el8                                    rhel-8-for-x86_64-appstream-rpms                                 33 k
Installing dependencies:
 at-spi2-atk-devel                                      x86_64                                2.26.2-1.el8                                   rhel-8-for-x86_64-appstream-rpms                                 19 k
 at-spi2-core-devel                                     x86_64                                2.28.0-1.el8                                   rhel-8-for-x86_64-appstream-rpms                                143 k
 atk-devel                                              x86_64                                2.28.1-1.el8                                   rhel-8-for-x86_64-appstream-rpms                                192 k
 cairo-devel                                            x86_64                                1.15.12-6.el8                                  rhel-8-for-x86_64-appstream-rpms                                273 k
 cairo-gobject-devel                                    x86_64                                1.15.12-6.el8                                  rhel-8-for-x86_64-appstream-rpms                                 26 k
 dbus-devel                                             x86_64                                1:1.12.8-18.el8                                rhel-8-for-x86_64-appstream-rpms                                 68 k
 fribidi-devel                                          x86_64                                1.0.4-8.el8                                    rhel-8-for-x86_64-appstream-rpms                                 63 k
 gdk-pixbuf2-devel                                      x86_64                                2.36.12-5.el8                                  rhel-8-for-x86_64-appstream-rpms                                223 k
 graphite2-devel                                        x86_64                                1.3.10-10.el8                                  rhel-8-for-x86_64-appstream-rpms                                 46 k
 gtk2-devel                                             x86_64                                2.24.32-5.el8                                  rhel-8-for-x86_64-appstream-rpms                                3.0 M
 gtk3-devel                                             x86_64                                3.22.30-10.el8                                 rhel-8-for-x86_64-appstream-rpms                                4.4 M
 harfbuzz-devel                                         x86_64                                1.7.5-3.el8                                    rhel-8-for-x86_64-appstream-rpms                                181 k
 libXcomposite-devel                                    x86_64                                0.4.4-14.el8                                   rhel-8-for-x86_64-appstream-rpms                                 22 k
 libXdamage-devel                                       x86_64                                1.1.4-14.el8                                   rhel-8-for-x86_64-appstream-rpms                                 15 k
 libepoxy-devel                                         x86_64                                1.5.8-1.el8                                    rhel-8-for-x86_64-appstream-rpms                                146 k
 libxkbcommon-devel                                     x86_64                                0.9.1-1.el8                                    rhel-8-for-x86_64-appstream-rpms                                 60 k
 pango-devel                                            x86_64                                1.42.4-8.el8                                   rhel-8-for-x86_64-appstream-rpms                                322 k
 pixman-devel                                           x86_64                                0.38.4-2.el8                                   rhel-8-for-x86_64-appstream-rpms                                 20 k
 wayland-devel                                          x86_64                                1.19.0-1.el8                                   rhel-8-for-x86_64-appstream-rpms                                148 k
 wayland-protocols-devel                                noarch                                1.23-1.el8                                     rhel-8-for-x86_64-appstream-rpms                                 89 k

Transaction Summary
Install  22 Packages

Total download size: 9.5 M
Installed size: 67 M
Is this ok [y/N]: 

which makes me wonder if “canberra” module is deprecated for GTK, because Wayland becomes default choice (or for some other reason).

Can someone please shed some lights into this?

Our software is based on Qt and our custoners are running MATE WM, but we here in the dev shop run GNOME.

Thank you in advance.

The canberra-gtk module is only available for GTK2 and GTK3, and it’s only used on X11, because libcanberra was written before Wayland was a thing that even existed, and hasn’t been updated to deal with Wayland. Additionally, libcanberra is tied to libpulseaudio/PulseAudio.

In general, libcanberra is not really useful in this day and age.

The reason why you’re seeing the canberra-gtk module warning is that somewhere in your OS there’s a request to load the module; you can change the configuration to remove the request to load the module, and the warning will go away.

What does it do? Or better yet - what did it do? :wink:
What purpose did it serve?

The reason for that question is because trying to install I saw a reference to “libcanberra-gtk2”, and so I thought that the library itself is only available for GTK2.

Thank you for explanation. Do you know what could be the cause and how to fix the configuration?

Thank you.

libcanberra is a library that was meant to be used to produce a contextual sound; if you perform an action, and that action is supposed to be associated with a sound, libcanberra would allow the application (or the toolkit) to play that sound. It additionally allowed tying information to that sound, like where the position of the pointer was, or where the position of the window on the screen was. Finally, it allowed to specify sounds by name, which would then be resolved to an on-disk location that could be replaced by different “sound themes”.

In practice, nobody used it, and very, very few sound themes were ever made, because creating a soundscape is incredibly complicated and not many sound engineers are willing to work on the free software desktop. Plus, a lot of the contextual information was tied to the X11 windowing system.

There’s a libcanberra-gtk3 as well.

No, sorry; you’ll have to ask the maintainers of your Linux distribution.

Understood thank you.

I’ll pass this alone to our system maintainers.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.