Summary: | External programs for notifications are not executed when absolute path is given | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Tomasz Jach <bugs> |
Component: | knotify | Assignee: | kdelibs bugs <kdelibs-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kejpi, ogoffart |
Priority: | NOR | ||
Version First Reported In: | 4.1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Allows KNotify to run programs stored in the rc file as a URL. |
Description
Tomasz Jach
2008-08-12 12:19:07 UTC
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 |