Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-04-12 07:33:43

yangdw
Member
Registered: 2019-10-12
Posts: 8

Event sounds work only for some applications

System: Debian/Linux Buster
Desktop: Xfce 4.14

I enabled event sounds effects but it appears to work only for Firefox ,Thunderbird , GIMP, Inkscape. Whiel there is no any sound in other applications, such as Thunar maximize and minimize or Volume adjusting...

I have viewed the relevant post: https://forum.xfce.org/viewtopic.php?id=9424

So I list might be useful information here:

 dpkg -l | cut -d' ' -f3 | grep -E 'sox|canberra' 

gnome-session-canberra
libcanberra-gtk-module:amd64
libcanberra-gtk0:amd64
libcanberra-gtk3-0:amd64
libcanberra-gtk3-module:amd64
libcanberra-pulse:amd64
libcanberra0:amd64
libsoxr0:amd64

 ls -l /usr/share/sounds  

drwxr-xr-x 2 root root 4096 Apr  7 15:21 alsa
drwxr-xr-x 2 root root 4096 Apr 12 15:04 Borealis
drwxr-xr-x 3 root root 4096 Apr  7 15:04 freedesktop
drwxr-xr-x 3 root root 4096 Apr 12 15:12 moblin
drwxr-xr-x 2 root root 4096 Apr  7 15:23 sf2
drwxr-xr-x 2 root root 4096 Apr  7 15:23 sf3
drwxr-xr-x 4 root root 4096 Apr 12 13:54 Smooth

 xfconf-query -c xsettings -p /Net/EnableEventSounds 

true

 xfconf-query -c xsettings -p /Net/EnableInputFeedbackSounds 

true

 xfconf-query -c xsettings -p /Net/SoundThemeName 

Smooth

 env | grep GTK_MODULES 

GTK_MODULES=canberra-gtk-module:canberra-gtk-module

PS: libcanberra-gtk-module and libcanberra-gtk3-module also have been installed.

Last edited by yangdw (2020-04-12 10:07:10)

Offline

#2 2020-04-12 12:13:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Event sounds work only for some applications

yangdw wrote:

I enabled event sounds effects but it appears to work only for Firefox ,Thunderbird , GIMP, Inkscape. Whiel there is no any sound in other applications, such as Thunar maximize and minimize or Volume adjusting...

Make sure that your "System Sounds" volume is up to the max.

Thunar minimize/maximize should work, but volume adjusting won't - it's not supported by libcanberra.

Edit: what other applications don't work?

Edit2: which libcanberra files do you have in /etc/X11/Xsession.d/ ?

Last edited by ToZ (2020-04-12 12:20:33)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-04-12 12:44:46

yangdw
Member
Registered: 2019-10-12
Posts: 8

Re: Event sounds work only for some applications

Edit: what other applications don't work?

I especially hope that the mouse click sounds work. And for now if Thunar is not supported by libcanberra, I have no more to complain. I just list the silent applications I often use:

- xfce4-terminal
- emacs
- google-chrome
- slack
- telegram-desktop

Edit2: which libcanberra files do you have in /etc/X11/Xsession.d/ ?

I found no libcanberra files there...

-rw-r--r-- 1 1.1K 2019-06-10 04:34 20dbus_xdg-runtime
-rw-r--r-- 1 2.0K 2019-10-27 16:58 20x11-common_process-args
-rw-r--r-- 1  878 2016-11-23 15:30 30x11-common_xresources
-rw-r--r-- 1  389 2016-11-23 15:30 35x11-common_xhost-local
-rw-r--r-- 1  187 2016-11-23 15:30 40x11-common_xsessionrc
-rw-r--r-- 1 1.6K 2016-11-23 15:30 50x11-common_determine-startup
-rw-r--r-- 1  664 2013-10-08 21:05 55xfce4-session
-rw-r--r-- 1 1.6K 2019-03-30 20:06 70im-config_launch
-rw-r--r-- 1 1.4K 2018-05-23 13:40 72sogoupinyin.dpkg-new
-rw-r--r-- 1  752 2019-06-10 04:34 75dbus_dbus-launch
-rw-r--r-- 1  880 2020-03-24 02:45 90gpg-agent
-rw-r--r-- 1  335 2018-11-20 04:03 90qt-a11y
-rw-r--r-- 1  629 2016-11-23 15:30 90x11-common_ssh-agent
-rw-r--r-- 1  513 2019-06-10 04:34 95dbus_update-activation-env
-rw-r--r-- 1 1.6K 2020-04-12 15:24 98vboxadd-xclient
-rw-r--r-- 1  166 2016-11-23 15:30 99x11-common_start

Last edited by yangdw (2020-04-12 13:08:40)

Offline

#4 2020-04-12 13:18:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Event sounds work only for some applications

How are you adding "canberra-gtk-module" to your list of GTK_MODULES?

Also, are system sounds set to a loud enough value?

And does the following produce a sound:

canberra-gtk-play -i window-maximized

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2020-04-12 13:26:32

yangdw
Member
Registered: 2019-10-12
Posts: 8

Re: Event sounds work only for some applications

I add it into .zshrc

 export GTK_MODULES=canberra-gtk-module:canberra-gtk-module 

for now the event sounds in firefox /inkscape/gimp/thunderbird is loud enough.

I can play it as:

  /usr/bin/canberra-gtk-play -f window-maximized.oga  

Offline

#6 2020-04-12 14:07:18

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Event sounds work only for some applications

yangdw wrote:

I can play it as:

  /usr/bin/canberra-gtk-play -f window-maximized.oga  

If the command with the "-i" doesn't work, then there is something wrong with your libcanberra setup.

Lets try to add the module into Xfce's xsettings.
Start up the xfce4-settings-editor. In the xsettings channel, check to see if you have a /Gtk/Modules property.

If no, then run this command:

xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "canberra-gtk-module"

If yes, edit the value by clicking on it and append ":canberra-gtk-module" to the existing value (include the colon).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2020-04-12 14:46:33

yangdw
Member
Registered: 2019-10-12
Posts: 8

Re: Event sounds work only for some applications

xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s "canberra-gtk-module"

That is the key to  enable all applications event sound. Now all events make sounds. But how can I enable mouse click sound?

Offline

#8 2020-04-12 16:20:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Event sounds work only for some applications

yangdw wrote:

But how can I enable mouse click sound?

Mouse click where? Sound events are tied to GTK events (button click, window maximize, window close). Here is a list of events that are supported by libcanberra:

/*
   We generate these sounds:

   dialog-error
   dialog-warning
   dialog-information
   dialog-question
   window-new
   window-close
   window-minimized
   window-unminimized
   window-maximized
   window-unmaximized
   notebook-tab-changed
   dialog-ok
   dialog-cancel
   item-selected
   link-pressed
   link-released
   button-pressed
   button-released
   menu-click
   button-toggle-on
   button-toggle-off
   menu-popup
   menu-popdown
   menu-replace
   tooltip-popup
   tooltip-popdown
   drag-start
   drag-accept
   drag-fail
   expander-toggle-on
   expander-toggle-off

   TODO:
   scroll-xxx
   window-switch
   window-resize-xxx
   window-move-xxx

*/

...however, when I last tried I couldn't get them all to work. BTW, libcanberra has not had any work done to it since 2012.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2020-04-12 22:50:19

yangdw
Member
Registered: 2019-10-12
Posts: 8

Re: Event sounds work only for some applications

Is there any way to replace libcanberra scheme ?

Offline

#10 2020-04-12 23:07:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: Event sounds work only for some applications

yangdw wrote:

Is there any way to replace libcanberra scheme ?

I'm not sure, I've never tried, but I'm guessing not. It is tied into GTK events so there is no requirement in Xfce to create it's own sound events.

Gsound is a potential (?) alternative, but it looks like it requires that the sound events be programmed in - which is not currently the case with Xfce.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 588.08 KiB (Peak: 604.92 KiB) ]