Bug 25134 - [patch] 'add legacy application' broken
Summary: [patch] 'add legacy application' broken
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdebase   
(Show other bugs)
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: Aaron Brown
Whiteboard: Florence Gold
Depends On:
TreeView+ depends on / blocked
Reported: 2001-01-28 13:53 UTC by Tim Waugh
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-31 15:29:13 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
default-%f fixup (580 bytes, patch)
2001-01-30 23:04 UTC, Tim Waugh
no flags Details | Diff
kdelibs-quote.patch (381 bytes, patch)
2001-01-31 14:38 UTC, Tim Waugh
no flags Details | Diff

Description Tim Waugh 2001-01-28 13:53:03 UTC
When trying to add a 'legacy application' (pine) to my panel, by doing 
the following:

Right-click on panel
Add->Legacy Application
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 ''

Comment 1 Tim Waugh 2001-01-28 16:09:17 UTC
The same happens when creating an entry in the menu using menu editor.

Comment 2 Glen Foster 2001-01-30 00:05:58 UTC
This defect is considered MUST-FIX for Florence Gold release

Comment 3 Tim Waugh 2001-01-30 22:20:30 UTC
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. ;-)

Comment 4 Tim Waugh 2001-01-30 23:04:00 UTC
Created attachment 8521 [details]
default-%f fixup

Comment 5 Tim Waugh 2001-01-30 23:27:23 UTC
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 + " " +

Comment 6 Tim Waugh 2001-01-31 00:06:56 UTC
Wait for bug 25307 before applying this patch though, as they touch the same

Comment 7 Tim Waugh 2001-01-31 14:38:09 UTC
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
cases right.

Comment 8 Tim Waugh 2001-01-31 14:38:45 UTC
Created attachment 8561 [details]

Comment 9 Bernhard Rosenkraenzer 2001-02-01 23:23:07 UTC
Thanks for the patch, fixed.

Note You need to log in before you can comment on or make changes to this bug.