Bug 318593 - Dolphin title has quotes around it when launching using Docky
Summary: Dolphin title has quotes around it when launching using Docky
Status: RESOLVED FIXED
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL: http://i.imgur.com/aPLxzD5.png
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-19 15:06 UTC by Michael Spencer
Modified: 2013-05-03 12:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.11
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Spencer 2013-04-19 15:06:43 UTC
When opening Dolphin from Docky, single quotes are displayed around the app name in the title bar.

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin
2. Pin it to Docky
3. Close and reopen Dolphin
Actual Results:  
Quotes are displayed around the app name in the title bar of Dolphin.

Expected Results:  
There should be no quotes around the app name in the title.

In the .desktop launcher for Dolphin, the Exec key is like this:

Exec=dolphin %i -caption "%c" %u

According to the desktop entry spec (http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html), "Field codes must not be used inside a quoted argument, the result of field code expansion inside a quoted argument is undefined."

I think Docky is doing weird things by placing the quotes in the actual argument passed to Dolphin.
Comment 1 Frank Reininghaus 2013-04-19 15:39:33 UTC
Thanks for the bug report!

(In reply to comment #0)
> Exec=dolphin %i -caption "%c" %u

If I understand you correctly, you propose to remove the quotes from that line?

It seems that the quotes were already there in the very first commit to Dolphin

http://quickgit.kde.org/?p=kde-baseapps.git&a=commit&h=daace0e789c3ea5e8a89e514abb717c9c360fc7f

BTW, the quotes around %u were removed earlier because they caused problems, see bug 169016 comment 15.
Comment 2 Michael Spencer 2013-04-19 16:19:24 UTC
Yes, I thinkthe solution is to remove the quotes around the "%c" part, making it just %c, because I think the quotes result in undefined behavior, as in the case of Docky. I tried it on my own system and it works.
Comment 3 Michael Spencer 2013-04-19 16:55:51 UTC
(In reply to comment #1)
> Thanks for the bug report!
> 
> (In reply to comment #0)
> > Exec=dolphin %i -caption "%c" %u
> 
> If I understand you correctly, you propose to remove the quotes from that
> line?

Yes, I think the solution is to remove the quotes around the "%c" part, making it just %c, because I think the quotes result in undefined behavior, as in the case of Docky. I tried it on my own system and it works.
Comment 4 Christoph Feck 2013-04-20 11:28:00 UTC
All KDE .desktop files have "%c" instead of %c, Docky should be able to deal with it.
Comment 5 Jekyll Wu 2013-04-20 11:42:58 UTC
(In reply to comment #4)
> All KDE .desktop files have "%c" instead of %c, Docky should be able to deal
> with it.

But isn't that "%c" exactly against the FDO spec? 

"Field codes must not be used inside a quoted argument, the result of field code expansion inside a quoted argument is undefined"
Comment 6 Michael Spencer 2013-04-20 17:57:15 UTC
(In reply to comment #4)
> All KDE .desktop files have "%c" instead of %c, Docky should be able to deal
> with it.

What is the point of the quotes then? I ran into this problem originally because the templates in KDevelop used it. When trying to fix it, I used a message box to display the command line arguments, and the the name of my app was correctly be passed as one argument without the quotes around the %c, even though the name had a space in it.
Comment 7 Frank Reininghaus 2013-04-22 09:26:17 UTC
Right, so we have the have the arguments "The desktop file violates the freedesktop spec" and "It's being done like that everywhere in KDE" for and against changing it, respectively.

@Michael: I guess it's better to discuss this on kde-core-devel, rather than in a Dolphin bug report. Maybe someone on the mailing list can tell you why the quotes are there. Depending on the outcome of the discussion, all desktop files (and not only Dolphin's) might have to be changed.
Comment 8 Christoph Feck 2013-05-03 12:57:15 UTC
As agreed on kde-core-devel list, all .desktop files from KDE are currently being corrected to not have quotes around %c.

If you still see a particular desktop file wrong in the 4.11 release, please report it to the authors of the respective application.