Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 489340

Summary: kde-base/okular-4.10.5 - *.desktop erroneous double-quotes around %c in Exec line
Product: Gentoo Linux Reporter: Olivier Diotte <olivier>
Component: [OLD] KDEAssignee: Gentoo KDE team <kde>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://projects.kde.org/projects/kde/kdegraphics/okular/repository/revisions/155312269bb268c8a77487031f6421488b4f0f0a
Whiteboard: fixed in 4.11
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484884    

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.