Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-02-05 02:19:56

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

[Solved] System sounds

I'm running Xfce 4.10 on Fedora 19, and I'd like to get the system sounds working.  Alas, searching the forums here doesn't turn up anything less than two years old, and none of it helped.  I know that sound works, I've set the theme to freedesktop and system sounds are active in the Appearance control panel.  I've even gone to /usr/share/sounds/freedesktop/stereo and played a few of the files to make sure I'm not missing a codec.  Is there anything I need to install, or some setting I've missed?


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#2 2014-02-05 03:17:59

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

To get sound events to work in both Xubuntu and Arch linux, I had to do the following:

1. Enable "Event Sounds" in Settings Manager -> Appearance -> Settings
2. Set "xsettings/Net/SoundThemeName" in the Settings Manager (to a sound theme located in /usr/share/sounds).
3. Export GTK_MODULES="canberra-gtk-module" (In Arch this was done automatically by install the libcanberra package, in Xubuntu I had to manually create the file: see http://ubuntuforums.org/showthread.php? … st12008205)
4. Install the following packages: Arch (libcanberra libcanberra-pulse) Xubuntu (sox gnome-session-canberra)
5. Turn up "System Sounds" in pavucontrol (Pulseaudio).

Unfortunately, I've never done this on Fedora.

Last edited by ToZ (2014-02-05 03:55:45)


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 2014-02-05 03:24:11

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

Well, I've set Thunderbird to play the default sound when email arrives and that works.  However, if I try to close Firefox with more than one tab open, I should get a sound when the warning message comes up, but I don't.  I'm not sure how to test other sounds, so it's hard to say just what's going on.  Still, thanx for getting back to me.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#4 2014-02-05 03:40:51

ozjd
Member
From: Hawkesbury NSW Australia
Registered: 2012-02-05
Posts: 560
Website

Re: [Solved] System sounds

Also check in PulseAudio volume Manager that on the playback tab system sounds aren't set to 0 volume. Mine are on F20.

Offline

#5 2014-02-05 03:46:27

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

Playback is at 100% and the mute button isn't depressed.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#6 2014-02-05 03:50:35

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

With GTK2, only certain sound effects are valid. Its based on the freedesktop specification. Have a look at lines 40-78 from canberra-gtk-module.c to see which events are handled.

When firefox emits the dialog-question event (when you close a window with multiple tabs), it will play the sound theme's "stereo/dialog-question.ogg" file, if i exists. It works for me, but I use a modified Borealis theme (here: https://www.dropbox.com/s/bfyk05r4y8qog … lis.tar.gz). Its based on the original, but with the files lined up better to match the freedesktop specification. With this sound theme, the firefox dialog event plays, window minimize, menu click, etc).


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 2014-02-05 03:53:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

Sideburns wrote:

Playback is at 100% and the mute button isn't depressed.

What is result of:

env | grep GTK_MODULE

Use the sound theme I linked in my last post. It is more complete.

What does this return:

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

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

#8 2014-02-05 03:58:26

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

Also, I believe you need the canberra-gtk-play executable installed.


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 2014-02-05 06:02:17

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

Aha!  Freedesktop doesn't have that sound.  I've downloaded that file and will see how it works.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#10 2014-02-05 06:28:36

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

I have all of those files installed already, I've installed and selected the Borealis theme and it doesn't work.  However, that environment variable isn't set.  Let's see if logging out and back in will take care of it.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#11 2014-02-05 06:31:57

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

OK, that fixed it.  Thanx!


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#12 2014-02-05 20:29:27

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

As it happens, Borealis doesn't have a sound for Thunderbird to use for new messages, and Thunderbird doesn't recognize the .ogg files in freedesktop or Borealis as sound files.  I've managed to find one that works, but many of the events, such as minimize, menu click and so on still don't give me any sounds.

What I'd really like is the way it worked in Win98: you had a list of events, and you could associate any sound file you wanted with any of them.  None of this nonsense about having an "all or nothing theme" unless you knew how to create your own, including what name to give each file to make it work.  The new way is easier, but we've surrendered a lot of choice for a little bit of convenience.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#13 2014-02-05 21:47:46

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: [Solved] System sounds

All I have is: after entering my login information, I get a pleasant login sound as the pic/image displays and the text states that things are loading for a few moments.

I had assumed that was the only system sound that XFCE had. Then I read this thread and realized that wasn't true. So I tried to follow the directions you were kind enough to provide here.

I ran Synaptic Package Manager and searched for "sox" - and saw that it was already installed. Then I searched for gnome-session-canberra - it wasn't installed, so I installed it. I looked for "pavucontrol" in my menu, but didn't see it so I ran SPM again, entered it into the search box, and installed it. It then appeared in my menu, so I ran it and turned up the system sounds to 100%.

Next, I viewed the Ubuntu thread that you linked to and created the two files that were mentioned as being a requirement for all this (I had to follow the instructions to do that too, since I'm pretty ignorant... so I even installed Leafpad (lol) in order to be able to copy and paste things exactly as listed).

Finally, I logged out and logged back in. Got the pleasant little login tune again. Did several things that I figured would cause the system to make noise - got no sound. So I rebooted the computer and tried again. Still no new sounds, just the usual login sound.

This is on Mint 14 XFCE (32-bit), which is based on "Quantal."

If you think it complicates the thread too much to have the two of us asking for help, just let me know and I'll stop cluttering it up and go back to quietly reading it. Otherwise, do you have any ideas? I think my setup has both Alsa and Pulse, but IDK for sure or even if that is even possibly relevant.

Thanks,
MDM

EDIT: Looks like I have the following files installed:
gnome-session-canberra
libcanberra-gtk-module
libcanberra-gtk3-module
sound-theme-freedesktop
libcanberra-gtk0
libcanberra-gtk3-0
libcanberra0
indicator-sound
indicator-sound-gtk2
linux-sound-base
alsa-base
pulseaudio-module-x11
pulseaudio-module-gconf
pulseaudio-module-bluetooth (IDK why, this old thing doesn't have Bluetooth.)
libpulse0
libpulse-mainloop-glib0
pulseaudio-utils
pulseaudio
libpulsedsp
alsa-base
sox
libsox2
gstreamer0.10-pulseaudio
gstreamer0.10-alsa
pavucontrol
libsox-fmt-base
libasound2
libmikmod2
libjack-jackd2-0
alsa-utils
gnome-media
libsox-fmt-alsa
gnome-settings-daemon
...and a bunch of other ones that came up when I typed "sound" into Synaptic Package Manager and chose to display only the ones that were installed. I started listing them in case there was an obvious (to you) conflict, but it's a big list and probably not relevant so I quit. LMK if I should complete it. And thanks again!

Last edited by MountainDewManiac (2014-02-05 23:38:12)


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#14 2014-02-06 02:44:24

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

Sideburns wrote:

As it happens, Borealis doesn't have a sound for Thunderbird to use for new messages, and Thunderbird doesn't recognize the .ogg files in freedesktop or Borealis as sound files. I've managed to find one that works, but many of the events, such as minimize, menu click and so on still don't give me any sounds.

Which sound theme? Make sure the files are named properly as per the canberra implementation.

What I'd really like is the way it worked in Win98: you had a list of events, and you could associate any sound file you wanted with any of them.  None of this nonsense about having an "all or nothing theme" unless you knew how to create your own, including what name to give each file to make it work.  The new way is easier, but we've surrendered a lot of choice for a little bit of convenience.

Agreed. However, it doesn't appear as though sound events is a priority in Xfce development.


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

#15 2014-02-06 02:48:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

MountainDewManiac wrote:

All I have is: after entering my login information, I get a pleasant login sound as the pic/image displays and the text states that things are loading for a few moments.

I had assumed that was the only system sound that XFCE had. Then I read this thread and realized that wasn't true. So I tried to follow the directions you were kind enough to provide here.

I ran Synaptic Package Manager and searched for "sox" - and saw that it was already installed. Then I searched for gnome-session-canberra - it wasn't installed, so I installed it. I looked for "pavucontrol" in my menu, but didn't see it so I ran SPM again, entered it into the search box, and installed it. It then appeared in my menu, so I ran it and turned up the system sounds to 100%.

Next, I viewed the Ubuntu thread that you linked to and created the two files that were mentioned as being a requirement for all this (I had to follow the instructions to do that too, since I'm pretty ignorant... so I even installed Leafpad (lol) in order to be able to copy and paste things exactly as listed).

Finally, I logged out and logged back in. Got the pleasant little login tune again. Did several things that I figured would cause the system to make noise - got no sound. So I rebooted the computer and tried again. Still no new sounds, just the usual login sound.

This is on Mint 14 XFCE (32-bit), which is based on "Quantal."

If you think it complicates the thread too much to have the two of us asking for help, just let me know and I'll stop cluttering it up and go back to quietly reading it. Otherwise, do you have any ideas? I think my setup has both Alsa and Pulse, but IDK for sure or even if that is even possibly relevant.

Thanks,
MDM

EDIT: Looks like I have the following files installed:
gnome-session-canberra
libcanberra-gtk-module
libcanberra-gtk3-module
sound-theme-freedesktop
libcanberra-gtk0
libcanberra-gtk3-0
libcanberra0
indicator-sound
indicator-sound-gtk2
linux-sound-base
alsa-base
pulseaudio-module-x11
pulseaudio-module-gconf
pulseaudio-module-bluetooth (IDK why, this old thing doesn't have Bluetooth.)
libpulse0
libpulse-mainloop-glib0
pulseaudio-utils
pulseaudio
libpulsedsp
alsa-base
sox
libsox2
gstreamer0.10-pulseaudio
gstreamer0.10-alsa
pavucontrol
libsox-fmt-base
libasound2
libmikmod2
libjack-jackd2-0
alsa-utils
gnome-media
libsox-fmt-alsa
gnome-settings-daemon
...and a bunch of other ones that came up when I typed "sound" into Synaptic Package Manager and chose to display only the ones that were installed. I started listing them in case there was an obvious (to you) conflict, but it's a big list and probably not relevant so I quit. LMK if I should complete it. And thanks again!

Lets confirm a few things. Can you post back the results of:

xfconf-query -c xsettings -p /Net/SoundThemeName
env | grep GTK_MODULE
ls /usr/share/sounds/$(xfconf-query -c xsettings -p /Net/SoundThemeName)/stereo
which canberra-gtk-play

And finally, check the volume level of "System Sounds" in pavucontrol.


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

#16 2014-02-06 03:00:34

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

Which themes?  Borealis and freedesktop, of course; they're the only two I listed in my post.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#17 2014-02-06 03:32:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

Sideburns wrote:

Which themes?  Borealis and freedesktop, of course; they're the only two I listed in my post.

I've managed to find one that works, but many of the events, such as minimize, menu click and so on still don't give me any sounds.

I thought you were referring to another sound theme. For me, the modified Borealis theme has sounds for minimize, menu click, etc. Is the "System Sounds" volume setting turned up in pavucontrol?


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

#18 2014-02-06 06:40:39

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

You keep asking me that, and I keep telling you that some of the sounds work.

[joe@khorlia Desktop]$ ls /usr/share/sounds/Borealis/stereo
button-pressed.ogg      dialog-warning.ogg       Startup1_1.ogg
button-toggle-off.ogg      Exit1_2.ogg           Startup1_2.ogg
button-toggle-on.ogg      install.sh           Startup1_3.ogg
desktop-login.ogg      K3b_success.ogg       system-ready.ogg
desktop-logout.ogg      Knock.ogg           trash-empty.ogg
desktop-switch-left.ogg   Kopete_status.ogg       uninstall.sh
desktop-switch-right.ogg  message-new-instant.ogg  window-close.ogg
device-added.ogg      phone-incoming-call.ogg  window-maximized.ogg
device-removed.ogg      phone-outgoing-busy.ogg  window-minimized.ogg
dialog-error.ogg      README           window-unmaximized.ogg
dialog-information.ogg      service-login.ogg       window-unminimized.ogg
dialog-question.ogg      service-logout.ogg
[joe@khorlia Desktop]$

As you can see, the files are there; they just don't get used.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#19 2014-02-06 10:31:43

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: [Solved] System sounds

ToZ wrote:

Lets confirm a few things. Can you post back the results of:

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

default

ToZ wrote:
env | grep GTK_MODULE

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

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

ls: cannot access /usr/share/sounds/default/stereo: No such file or directory

ToZ wrote:
which canberra-gtk-play

/usr/bin/canberra-gtk-play

ToZ wrote:

And finally, check the volume level of "System Sounds" in pavucontrol.

100%

Thanks again,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#20 2014-02-06 11:19:10

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

@MDM, from my post #6, try downloading and using the modified Borealis theme and using it. I'm not sure what the "default" sound theme is, but it doesn't seem to have the necessary sound files in the right place.


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

#21 2014-02-06 11:22:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

@Sideburns, can you tell me exactly which files do work and which don't work? Not all of them will work, only the ones supported by the canberra implementation.


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

#22 2014-02-06 13:26:40

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

OK, Thunderbird is now using test.wav from something called speech-dispacher, and if I try to close Firefox with multiple tabs open, I get a sound when the window pops up with a reminder.  (Some other programs also give that sound, but not all that pop up questions.)  No other system sounds work, with the Borealis theme you suggested.

One more thing:

[joe@khorlia ~]$ env | grep GTK_MODULE
[joe@khorlia ~]$ which canberra-gtk-play
/usr/bin/canberra-gtk-play

Last edited by Sideburns (2014-02-06 13:33:46)


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#23 2014-02-07 01:46:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

Sideburns wrote:

[joe@khorlia ~]$ env | grep GTK_MODULE

This environment variable must be set to GTK_MODULES=canberra-gtk-module:canberra-gtk-module. I'm not sure how to do this in Fedora. In Xubuntu, I followed these instructions. In Arch, they were automatically set in the file /etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module:

#!/bin/bash

case "$DESKTOP_SESSION" in
  gnome) # Done by gnome-settings-daemon
  ;;
  *)
    # Extra check in case DESKTOP_SESSION is not set correctly
    if [[ -z $GNOME_DESKTOP_SESSION_ID ]]; then
      if [[ -z $GTK_MODULES ]]; then
        GTK_MODULES="canberra-gtk-module"
      else
        GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
      fi
      export GTK_MODULES
    fi
  ;;
esac

Once its set properly, it will return:

[toz@arch ~]$ env | grep GTK_MODULE
GTK_MODULES=canberra-gtk-module:canberra-gtk-module

As a last resort, you can try adding it to your ~/.bashrc file (if you're using bash), like this:

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

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

#24 2014-02-07 07:30:06

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [Solved] System sounds

AIUI, putting it in ~/.bashrc would only help if I were trying to play a system sound from a terminal session.  Checking, I already have sox installed, /etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module doesn't exist, and gnome-session-canberra isn't available from any of the standard Fedora repos.  At this point, it looks like I'll have to take this to the Fedoraforum and see what they say.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#25 2014-02-07 13:28:46

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [Solved] System sounds

Just fired up a fedora live cd. It looks like the setup is similar to arch. Create the above file in /etc/X11/xinit/xinitrc.d - that should do it.


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

Board footer

Powered by FluxBB