You are not logged in.

#1 2015-12-05 16:13:14

riggt
Member
Registered: 2015-10-20
Posts: 21

XFCE System sounds

Hi, I'm trying to set up system sounds in Xfce, things like a bell that plays when trying to press backspace when there is nothing to delete and when you press tab at the command line and it has no completions available. Most important though is a sound that plays when my laptop comes unplugged. I have followed the instructions of this forum post in the Xfce community as well as going over this post from two years ago here in our own arch forums.

The Xfce post had a few things they wanted users to try including with their questions so I will provide these now:

The results of

env | grep GTK_MODULE

are as follows:

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

The results of

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

are as follows:

freedesktop

The results of

ls /usr/share/sounds/$(xfconf-query -c xsettings -p /Net/SoundThemeName)/stereo

are as follows:

alarm-clock-elapsed.oga         audio-test-signal.oga    dialog-warning.oga                    power-unplug.oga
audio-channel-front-center.oga  audio-volume-change.oga  message-new-instant.oga               screen-capture.oga
audio-channel-front-left.oga    bell.oga                 message.oga                           service-login.oga
audio-channel-front-right.oga   camera-shutter.oga       network-connectivity-established.oga  service-logout.oga
audio-channel-rear-center.oga   complete.oga             network-connectivity-lost.oga         suspend-error.oga
audio-channel-rear-left.oga     device-added.oga         phone-incoming-call.oga               trash-empty.oga
audio-channel-rear-right.oga    device-removed.oga       phone-outgoing-busy.oga               window-attention.oga
audio-channel-side-left.oga     dialog-error.oga         phone-outgoing-calling.oga            window-question.oga
audio-channel-side-right.oga    dialog-information.oga   power-plug.oga

The results of

which canberra-gtk-play

are as follows:

/usr/bin/canberra-gtk-play

Is there something that I am missing? Because I have spent for more time on this than I would have cared to.


- riggt

Avatar sourced from XKCD under creative commons licensing.

Offline

#2 2015-12-05 18:55:46

toz
Member
Registered: 2011-10-28
Posts: 497

Re: XFCE System sounds

A few things:

1. Make sure your system sounds volume is up. If you are using pulseaudio, check pavucontrol.
2. The freedesktop sound theme is incomplete as per the libcanberra implementation. This implementation only supports these sound events:

/*
   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

*/

...note: emptying the trash using the freedesktop sound theme will generate a sound event.
3. If you look at post #6 from the Xfce forums link above, I modified the existing "Borealis" sound theme to generate more sound events (e.g. window minimize, maximimize, etc). Try using that one to get a more complete set of sound events.

Last edited by toz (2015-12-05 18:56:28)

Offline

#3 2015-12-05 19:45:52

riggt
Member
Registered: 2015-10-20
Posts: 21

Re: XFCE System sounds

I've got the pulse audio system sounds set to 100% (even tried 153%). I've tried with freedesktop and with gnome's purple theme, but didn't get any sound at all. I'll try with the borealis theme and get back to you.


- riggt

Avatar sourced from XKCD under creative commons licensing.

Offline

#4 2015-12-05 20:07:07

toz
Member
Registered: 2011-10-28
Posts: 497

Re: XFCE System sounds

Make sure you've also enabled "Event Sounds" (Settings Manager > Appearance > Settings > Event sounds.

Offline

#5 2015-12-05 20:29:28

riggt
Member
Registered: 2015-10-20
Posts: 21

Re: XFCE System sounds

I have enabled Event Sounds already. I just downloaded your Borealis theme and it... sorta works. Like a few sounds from it are working but not all of them. So far the only application I've found that makes noises when I interact with it is the panel. Which is an improvement to be sure.


- riggt

Avatar sourced from XKCD under creative commons licensing.

Offline

#6 2015-12-05 21:03:08

toz
Member
Registered: 2011-10-28
Posts: 497

Re: XFCE System sounds

Not all of them will work. Just the ones that both GTK and libcanberra support. For me, the basic ones work:
- window maximize, unmaximize
- window minimize, unminimize
- window open, close
- button presses
- menu multi-option select
- trash empty
- dialog question/warning (gtk2 apps incl. firefox)
...not as complete a list as one would hope. Even some of the events listed in the canberra code above don't work.

Also, I mostly only use GTK2 apps. I'm guessing it probably won't work for GTK3/QT. Edit: Seems to work for the only GTK3 I have.

Last edited by toz (2015-12-05 21:04:33)

Offline

#7 2015-12-05 23:56:14

riggt
Member
Registered: 2015-10-20
Posts: 21

Re: XFCE System sounds

Hmmm... okay. Thanks for the help. I'll push this to my backburner for awhile. When I have some real time I'll look more into the libcanberra project and see if I can't find some tweak that improves support. That's a huge maybe. I have other projects I would rather work on. Thanks again!


- riggt

Avatar sourced from XKCD under creative commons licensing.

Offline

#8 2016-01-26 02:59:54

arli
Member
From: China
Registered: 2009-02-05
Posts: 7
Website

Re: XFCE System sounds

i have same problem, have sound when command:

$ canberra-gtk-play -i trash-empty

but no sound at all on xfce4.

i don't known more about canberra, is that any log or trace possible? set printf @ libcanberra ?

btw: i don't have pulseaudio, alsa only.

Last edited by arli (2016-01-26 03:03:57)

Offline

#9 2016-01-26 05:50:43

toz
Member
Registered: 2011-10-28
Posts: 497

Re: XFCE System sounds

No sound events at all on Xfce, or just for trash-empty?

If no sound events at all, what do following commands return:

xfconf-query -c xsettings -p /Net/EnableEventSounds
xfconf-query -c xsettings -p /Net/EnableInputFeedbackSounds
xfconf-query -c xsettings -p /Net/SoundThemeName
env | grep GTK_MODULES

Offline

#10 2018-10-26 12:42:06

Hackerpoint
Member
Registered: 2018-10-22
Posts: 34

Re: XFCE System sounds

i Made all of these steps but didn't work for me

Offline

#11 2018-10-26 19:23:09

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: XFCE System sounds

Hackerpoint, please do not necrobump old threads.  If you are still having the same problem, please open a new thread about it and link back to this one if needed.

Offline

#12 2018-10-26 19:24:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: XFCE System sounds


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB