Version: (using KDE 4.1.0) Installed from: Unlisted Binary Package How to Reproduce: 1. Launch kmail, go to Settings -> Notify settings. 2. Insert an absolute path to program as an external notificator (not sure about the translation - I'm using polish version). 3. Recieve mail. The external app is not executed. Workaround: Add your application to $PATH or make a symlink in a directory listed in $PATH and use only the name of the application instead of the whole absolute path.
Sounds like a kdelibs bug to me, this would happen in all KDE applications it seems.
The problem is that the KNotify config widget stores a path as a KUrl. KUrlRequester is nice and simply returns the text entered into the line edit if it is invalid. But if it is a path or something that looks like a path it turns it into a real URL. Which means that file:// gets prepended to the path when saved in the config file. When KNotify later tries to execute that path /bin/sh will fail to do so since it is expecting a path and not a URL. The way to fix this is either to store the path to the program as a path and not a URL or to have KNotify convert the URL to a path beforehand. I will attach a patch that does the latter but I will leave the fix up to what Olivier would like to do.
Created attachment 26887 [details] Allows KNotify to run programs stored in the rc file as a URL. Proposed fix, apply in kdebase.
I can confirm this bug on latest SVN trunk. Additionally there in not only a problem with script path but also with arguments. Adding following script: /home/kde4tst/bin/kopete_osd.sh %s Results to: Execute=file:///home/kde4tst/bin/kopete_osd.sh%20%25s in $KDEDIR/share/kopete.notifyrc This is wrong, but it works to manually modify the configuration file and change it to: Execute=/home/kde4tst/bin/kopete_osd.sh %s
SVN commit 921409 by mpyne: Fix bug 168968 (External programs for notifications are not executed if a path is given) in trunk. CCBUG:168968 M +1 -1 knotifyconfigactionswidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=921409
SVN commit 921411 by mpyne: Backport fix for bug 168968 to KDE 4.2.1. BUG:168968 M +1 -1 knotifyconfigactionswidget.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=921411