Bug 326711 - Okular *.desktop files are missing "-icon" in front of %i
Summary: Okular *.desktop files are missing "-icon" in front of %i
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.17.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2013-10-27 00:36 UTC by Olivier Diotte
Modified: 2013-11-24 12:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Diotte 2013-10-27 00:36:26 UTC
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

Also, this bug happened at least on Okular 0.16.5 too.

Reproducible: Always

Steps to Reproduce:
1. Run "xdg-open /path/to/file.pdf" in a terminal
Actual Results:  
-An okular window appears displaying file.pdf
-An empty okular window with title '%c' appears
-A popup window saying "could not open /home/myuser/%i" appears 

Expected Results:  
Only the file.pdf okular window appears
Comment 1 Albert Astals Cid 2013-10-27 10:16:23 UTC
If you read http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html it clearly states that you have to write %i in your Exec line and that it will be replaced by "--icon WHATEVER_IS_IN_YOUR_ICON_KEY"

So that must be a xdg-open bug.

FWIW xdg-open works fine here so you may have an older version of xdg-open?
Comment 2 Johannes Huber 2013-11-24 12:39:14 UTC
Seems this is an xdg-open bug:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/928680