Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489340 - kde-base/okular-4.10.5 - *.desktop erroneous double-quotes around %c in Exec line
Summary: kde-base/okular-4.10.5 - *.desktop erroneous double-quotes around %c in Exec ...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://projects.kde.org/projects/kde...
Whiteboard: fixed in 4.11
Keywords:
Depends on:
Blocks: kde-4.11.2-stable
  Show dependency tree
 
Reported: 2013-10-25 09:15 UTC by Olivier Diotte
Modified: 2013-10-26 23:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Diotte 2013-10-25 09:15:48 UTC
As noted by a Gentoo user here: http://forums.gentoo.org/viewtopic-p-7325644.html#7325644 the Exec line should read 
“ Exec=okular %U -icon %i -caption "%c" ”
rather than
“ Exec=okular %U %i -caption "%c" ”

The current files make it so running "xdg-open /path/to/myfile.pdf" opens three windows: myfile.pdf in okular, a blank okular window titled "%c" and a pop-up window called "Error %c" that says "could not open $(pwd)/%i"

(See attached screenshot)

Reproducible: Always

Steps to Reproduce:
1. Install okular
2. Run xdg-open /path/to/file.pdf
Actual Results:  
Error windows appear in addition to okular window

Expected Results:  
Only the okular window appears
Comment 1 Olivier Diotte 2013-10-25 09:41:01 UTC
After testing, this doesn't work correctly: I had to remove everything after the %U to get it to open only one window.

As said in the forums, maybe the files are actually correct and need to be adapted to other window managers. In that case, I suppose this bug is invalid, yet I'll let the maintainer decide what to do about this, maybe there is value in bringing this "issue" to attention.
Comment 2 Johannes Huber (RETIRED) gentoo-dev 2013-10-25 20:46:42 UTC
This should be already fixed by upstream.
Comment 3 Olivier Diotte 2013-10-26 21:26:07 UTC
I hadn't noticed the quotes (that was indeed a problem). But we are still missing the '-icon ' in front of %i. On my machine, running 'xdg-open /path/to/file.pdf' errors out (using 4.12) if I don't add that on the Exec line.

Running this one-liner, as root, fixes it in the meantime:

sed -r -i 's/Exec=okular %U %i -caption %c/Exec=okular %U -icon %i -caption %c/' /usr/share/applications/kde4/okular*.desktop
Comment 4 Johannes Huber (RETIRED) gentoo-dev 2013-10-26 23:02:17 UTC
(In reply to Olivier Diotte from comment #3)
> I hadn't noticed the quotes (that was indeed a problem). But we are still
> missing the '-icon ' in front of %i. On my machine, running 'xdg-open
> /path/to/file.pdf' errors out (using 4.12) if I don't add that on the Exec
> line.
> 
> Running this one-liner, as root, fixes it in the meantime:
> 
> sed -r -i 's/Exec=okular %U %i -caption %c/Exec=okular %U -icon %i -caption
> %c/' /usr/share/applications/kde4/okular*.desktop

Please report this upstream, this is not distribution issue.