How to fix sound notifications after upgrading KDE

How to fix sound notifications after upgrading KDE

or

Sound notifications don't work after upgrading KDE

The Problem

A lot of users have experienced this. You have a Suse Linux system with a nice KDE/kwin desktop, tweaked just the way you want it, with custom sound notifications (or even the default). You're happy with your environment but one day you need to upgrade one of the open source programs you have been relying on, and that new version requires KDE 3.3 or KDE 3.4. So the time has come for you to upgrade.

So you configure YaST to look for the supplemental tree on the Suse FTP site or any of the countless other sites making rpms available for the KDE upgrade. You set the machine to upgrade, and sure enough after a couple of hours not only do you have your entire desktop environment upgraded, your new application is working exactly as expected, and all of your desktop settings have been retained. . . or so you think. You are focused on your work so you don't notice that things are not quite right.

A day or two later, you notice you're missing incoming emails, syslog notices, or other task-related items that your system usually calls your attention to. Figuring you turned off the speakers or the mixer, you check all the settings. Everything seems fine, so you check out the ALSA configuration and test it. Sure enough, you're getting sound. Finally, you try playing an MP3, and that works as expected. Perplexed, you wonder if your sound themes were lost. You glance at the notifications section of the KDE control center, and your settings look correct. You decide to double-check it by selecting a configured event and then clicking the play button. Sure enough, you've verified that system notifications were broken by the upgrade to KDE 3.3 or KDE 3.4.

If you're reading this page, this has happened to you, and you're asking yourself: How do I fix this?


The solution

Start kwrite (or kate) with root permissions. . .

1. click the K-menu button 2. select Run 3. type "kate" or "kwrite" in the Command textbox and Click Options 4. check "run as other user" 5. enter "root" for the username 6. type your root password in the password textbox 7. click OK . . .and open this file: /opt/kde3/bin/startkde

Search for these lines of code:

test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM" kwrapper ksmserver $KDEWM

Insert a new line between the two lines you identified.

test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM" kdeinit +knotify kwrapper ksmserver $KDEWM

Save the file and either reboot or restart your Xwindow environment. A quick way to restart X on most Linux distributions is to hit ctrl-alt-backspace, but be sure to save your work before you do that.