Announcement

Collapse
No announcement yet.

How To -- Fix silent notification sounds

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How To -- Fix silent notification sounds

    After an update today, all system notification sounds quit working. Audio from applications and web sites worked, just the system sounds were silent. Even weirder, in System Settings | Application and System Notifications | Manage Notifications, events that had sounds still listed the sound files -- even though they didn't play.

    After some investigation, I discovered that all the paths to the sound files were missing. There are two ways to fix this: hand-edit each and every entry in the GUI, or come up with a quick command line alternative. I determined the command-line was the way to go. Here it is:

    Code:
    for j in /usr/share/kde4/apps/*/*.notifyrc; do sudo sed -i 's_Sound=_Sound=file:///usr/share/sounds/_g' $j; done
    Sounds are defined system-wide in /usr/share/kde4/apps/*/*.notifyrc files. Whenever you alter a setting, KDE makes a copy of that app's .notifyrc file and stores it in your profile. Because the system files lack the missing paths, I figured it was better to fix those, which is what the above command will do.

    #2
    Re: How To -- Fix silent notification sounds

    lol didn't help in my precise install! lol
    woodsmoke

    Comment


      #3
      Re: How To -- Fix silent notification sounds

      Originally posted by woodsmoke
      lol didn't help in my precise install! lol
      OK...I was just reading your observation thread, saw your complaint about the missing sounds, and was going to point you to this post, but you're already here!

      First, make sure you don't have any .notifyrc files anywhere in your home folder hierarchy. Next, take a look at, for example, /usr/share/kde4/apps/kde/kde.notifyrc and find a line that starts with Sound= -- if the command ran correctly, you should see, for example:

      Code:
      [Event/Trash: emptied]
      ...name and comment stuff cut...
      Action=Sound
      Sound=file:///usr/share/sounds/KDE-Sys-Trash-Emptied.ogg

      Comment


        #4
        Re: How To -- Fix silent notification sounds

        Originally posted by SteveRiley
        Code:
        for j in /usr/share/kde4/apps/*/*.notifyrc; do sudo sed -i 's_Sound=_Sound=file:///usr/share/sounds/_g' $j; done
        Thank you for this. I had, in the back of my mind, noticed that event sounds were missing, but didn't think to much about it. Executed your 'fix' and my Trash now plays it's sound when emptied. I'm sure that all the other event sounds are going to work again as well.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: How To -- Fix silent notification sounds

          Yes, quiet trash is so annoying

          Comment


            #6
            Re: How To -- Fix silent notification sounds

            Out of curiosity, why didn't the dev's just include the /usr/share/sounds into the system-wide path environment?
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: How To -- Fix silent notification sounds

              As Kubicle mentioned in the Qt 4.8 thread, this is a known bug. Some distros are already implementing workarounds.

              Comment


                #8
                Re: How To -- Fix silent notification sounds

                Because one can accomplish things in Linux in "more than one way", I decided to use my original kde.notifyrc (I made a backup before executing Steve's command. What, you did not!?) and instead, modified the system-wide environment 'path'.

                Code:
                cd /etc/
                sudo cp environment environmentORIGINAL
                sudo nano environment
                I edited the PATH= line and inserted /usr/share/sounds between /bin: and /usr/games so it now reads:

                PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/share/sounds:/usr/games"

                Saved and rebooted. Put something into Trash and emptied Trash. Sound plays. Life is Good. Linux is Good. 8)

                Of course, I understand that either 'fix' - Steve's or mine - will not last any update that includes replacements for either modified file (unless the update is smart enough to notice that the installed file is different than the updates file and asks what you want to do). But, at least, unless this issue is really fixed, I'll know what to do.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Re: How To -- Fix silent notification sounds

                  it worked later.

                  don't know why later but it did work.

                  woodsmoke

                  Comment


                    #10
                    Re: How To -- Fix silent notification sounds

                    IF you used my method, then a restart/reboot is required. If you used Steve's method, it is immediate -- with a log out/log in of KDE. At least, that was required after applying SR's fix in my shiny new 12.04!


                    Underlined
                    comment added 2012-03-03.
                    Last edited by Snowhog; Mar 03, 2012, 07:17 PM.
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      I had that problem too, and like Snowhog, just ignored it because its a frill.

                      However, unlike Snowhog's setup, my environment file already had the setting he added to it. And, SR's script, while fixing the problem in *.notifyrc, did not restore the sound. It may after I reboot.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Thank you SteveRiley!

                        Comment

                        Working...
                        X