Red Hat Bugzilla – Bug 25134
[patch] 'add legacy application' broken
Last modified: 2007-04-18 12:30:56 EDT
When trying to add a 'legacy application' (pine) to my panel, by doing
Right-click on panel
Navigate to /usr/bin, select pine, click OK
Check 'Run in terminal', click OK
I find that when clicking on the button, Pine goes straight to the
Compose screen, and quits when I come out of it.
It's because KDE is actually invoking pine with a null argument, like
$ pine ''
The same happens when creating an entry in the menu using menu editor.
This defect is considered MUST-FIX for Florence Gold release
I'm pretty sure this is because of KDE's broken '%f' handling.
The KDE authors seem to think that every UNIX command in the universe needs a
filename to act on in its argument list, and so even if you purposefully omit
a %f sequence it will thoughtfully append one for you.
So far, so crappy, but it shouldn't cause the bug. The next problem comes in
the expansion of %f. 'pine %f', when there is no file to act on, becomes
["pine", ""]. It should be ["pine"], because to get a null parameter I should
have to explicitly quote it, like 'pine "%f"'.
I guess that fixing this last bit would be enough to close this bug. But I've
now looked at the KDE Exec= expansion, and I think I can say without any
controversy that it sucks rocks. ;-)
Created attachment 8521 [details]
I've tested that the above minimal fix [a single _bit_!] fixes the behaviour,
all except for the tooltip which still has extra space on the end (cmd + " " +
Wait for bug 25307 before applying this patch though, as they touch the same
Here is a better patch. There might be trouble with 'blah "%f"' and things like
that, but really that whole section of KDE needs to be rewritten to think in
terms of a collection of words rather than a single command line to get all the
Created attachment 8561 [details]
Thanks for the patch, fixed.