跳转至内容

Libcanberra

来自 ArchWiki

Libcanberra 是一个用于播放事件声音的简单抽象接口。它实现了 XDG Sound Theme and Naming Specifications,用于在自由桌面环境(如 GNOME)上生成事件声音。更多描述请参见 此处

安装

Libcanberra 可以通过软件包 libcanberra 进行安装。libcanberra 不再需要任何 ALSA、pulseaudio 或 gstreamer 的后端,因为它们现在已内置于 libcanberra 软件包中。

要听到任何事件声音,必须安装一个声音主题。

配置

默认情况下,当启动 GTK 应用程序时,GTK 模块会自动加载。您可以在用户的 GtkSettings 文件中覆盖默认设置。

$HOME/.gtkrc-2.0 and $XDG_CONFIG_HOME/gtk-3.0/settings.ini
gtk-enable-event-sounds=true
gtk-enable-input-feedback-sounds=true
gtk-sound-theme-name=freedesktop

在 GNOME 中,这些设置由 gnome-settings-daemon 管理,配置可在 GSettings 的 org.gnome.desktop.sound 模式下找到。

systemd

要启用使用 canberra 的启动、关机和重启声音,请 启用 canberra-system-bootup.service

参见

© . This site is unofficial and not affiliated with Arch Linux.

Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.