Results 1 to 8 of 8

Thread: How to set the event sounds in xubuntu 13.04?

  1. #1
    Join Date
    Jun 2013
    Beans
    5

    Unhappy How to set the event sounds in xubuntu 13.04?

    Hi , i just install succesffuly the xubuntu 13.04. Everything is ok, I can play mp3 and movies, JUST no system event sounds.

    As a guid that is five years ago in this forum, i make out the login sound ! Sounds perfect! But no eny event sounds

    How can i do? Why the development team did not make the xubuntu auto play sound? That is very hard for them? I think that is very hard for me -- for the people who like me.
    Maybe the xubuntu 13.04 is just a SEMIFINISHED product?

    Oh, my god. who can help me?

    Thanks a lot!
    Last edited by hackson99; June 24th, 2013 at 04:20 AM. Reason: SOLVED

  2. #2
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How to set the event sounds in xubuntu 13.04?

    Hello and welcome to the forums.

    This thread describes how to get event sounds working in Xfce. It is still valid for 13.04.

    In a nutshell (and to summarize that thread):
    1. Make sure you have the necessary packages installed:
      Code:
      sudo apt-get install gnome-session-canberra ubuntu-sounds sox xfconf
    2. Enable the event sounds. Go to SettingsManager->Settings Editor and locate the following keys and set the values to:
      - xsettings/net/EnableEventSounds = checked
      - xsettings/net/EnableInputFeedbackSounds = checked
      - xsettings/net/SoundThemeName = (a name of a sound theme - they are located in /usr/share/sounds)
      Note: The thread talks about have dconf installed - I don't need it for sounds to work.
      .
    3. Enable the GTK-MODULES environment variable. From a terminal window:
      Code:
      gksu mousepad /etc/X11/Xsession.d/52libcanberra-gtk-module_add-to-gtk-modules
      ...enter your password when prompted and copy/paste the following code:
      Code:
      if [ -z "$GTK_MODULES" ] ; then
      	GTK_MODULES="canberra-gtk-module"
      else
      	GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
      fi
      export GTK_MODULES
      ...and save the file. Then,
      Code:
      gksu mousepad /etc/X11/Xsession.d/52libcanberra-gtk3-module_add-to-gtk-modules
      ...copy/paste the following code:
      Code:
      if [ -z "$GTK_MODULES" ] ; then
      	GTK_MODULES="canberra-gtk-module"
      else
      	GTK_MODULES="$GTK_MODULES:canberra-gtk-module"
      fi
      export GTK_MODULES
      ...and save the file.
    4. Create a login sound event:

      Code:
      mousepad ~/.profile
      ...and add the following line:
      Code:
      canberra-gtk-play -f </path/to/login/sound/file>
      ...change </path/to/login/sound/file> to point to a valid sound file. Then make that file executable:

      Code:
      chmod +x ~/.xprofile
    5. Log out and back in again.

    More sound themes can be found here.

    Note: I also had to increase the System Sounds volume level so that I could her the effects.
    Last edited by Elfy; February 4th, 2015 at 05:40 PM.

  3. #3
    Join Date
    Jun 2013
    Beans
    5

    Re: How to set the event sounds in xubuntu 13.04?

    OK, I will try.

  4. #4
    Join Date
    Jun 2013
    Beans
    5

    Re: How to set the event sounds in xubuntu 13.04?

    OK, when i download a sound theme named Dream from xfce-look.org, put it into /usr/share/sounds/, modify xsettings->net->SoundThemeName, after that, when i clean the trash, there is an event sound! When i close my firefox, there is an envent sound! Great!

    Thank u Toz!

    Another question: i want to add the logout sound event. How can i do? Hope you can give me an answer. Thank u !

  5. #5
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How to set the event sounds in xubuntu 13.04?

    Quote Originally Posted by hackson99 View Post
    Another question: i want to add the logout sound event. How can i do? Hope you can give me an answer.
    This one is a little tougher, but this should work.

    1. Create a script to play the file:
    Code:
    gksudo mousepad /usr/local/bin/logout_sound
    ...with the following content:
    Code:
    canberra-gtk-play -V 0.1 -f </path/to/logout/sound/file> &
    ...change </path/to/logout/sound/file> to point to a valid sound file. Save and then make that file executable:
    Code:
    sudo chmod +x /path/to/logout/sound/file
    2. Configure lightdm and enable the session-cleanup-script:
    Code:
    gksudo mousepad /etc/lightdm/lightdm.conf
    ...and add to the botton of the file:
    Code:
    session-cleanup-script=/usr/local/bin/logout_sound
    ...and save the file.

    3. Logout and back in again to test.

  6. #6
    Join Date
    Jun 2013
    Beans
    5

    Re: How to set the event sounds in xubuntu 13.04?

    Thank u.

    But i sovled myself ,by adding a script in the /etc/init.d/, just including one line "play /usr/share/sounds/ubuntu/desktop-logout.ogg", and link it from /etc/rc0.d/ and /etc/rc6.d/, after that whatever i reboot or halt my system, always i can hear the log out sound. Great. But when i log off, no sound.

    Your method is better. As you guid, whatever log off , reboot, halt, there always is a logout sound. Great!

    Hope the develop team do add the event sound into the next release --xubuntu 13.10. That, we will not meat the same trouble.

    But, they will???
    Last edited by hackson99; June 24th, 2013 at 04:21 AM.

  7. #7
    Join Date
    Jun 2013
    Beans
    5

    Re: How to set the event sounds in xubuntu 13.04?

    Quote Originally Posted by Toz View Post
    This one is a little tougher, but this should work.

    1. Create a script to play the file:
    Code:
    gksudo mousepad /usr/local/bin/logout_sound
    ...with the following content:
    Code:
    canberra-gtk-play -V 0.1 -f </path/to/logout/sound/file> &
    ...change </path/to/logout/sound/file> to point to a valid sound file. Save and then make that file executable:
    Code:
    sudo chmod +x /path/to/logout/sound/file
    2. Configure lightdm and enable the session-cleanup-script:
    Code:
    gksudo mousepad /etc/lightdm/lightdm.conf
    ...and add to the botton of the file:
    Code:
    session-cleanup-script=/usr/local/bin/logout_sound
    ...and save the file.

    3. Logout and back in again to test.

    Hello,

    Done,But no logout sound in ubuntu 13.04. How can i do?

  8. #8
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: How to set the event sounds in xubuntu 13.04?

    Quote Originally Posted by hackson99 View Post
    Done,But no logout sound in ubuntu 13.04. How can i do?
    You are right, it doesn't work. I just had a closer look and it appears that session-cleanup-script runs after the X session is terminated and the command doesn't run. I tried a number of other commands with no luck.

    After some researching on google, I found that this is a common issue. I tried a number of suggested solutions and was only able to get one to kind of work. It involves putting a wrapper around xfce4-session that allows for the executaion of a logout script.

    To do this, create an xfce4-session wrapper script in /usr/local/bin that both calls the real xfce4-session and the logout script command:
    1. Create the wrapper script:
      Code:
      gksudo mousepad /usr/local/bin/xfce4-session
    2. Add the following code:
      Code:
      #!/bin/bash
      
      # run the real xfce4-session exectuable
      /usr/bin/xfce4-session
      
      # after it terminates (on logout), play your logout sound
      canberra-gtk-play -V 0.1 -f </path/to/logout/sound/file>
      .....make sure you change </path/to/logout/sound/file> to a real sound file
    3. Save the file and make it executable:
      Code:
      sudo chmod +x /usr/local/bin/xfce4-session
    4. Logout and back in again to enable the script. Then logout again to hear the logout sound.


    The one thing that I noticed in testing this is that the appearance theme disappears for all displayed windows while the logout sound plays making the windows look very blocky and 80s-like.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •