0

To open DjVu files on a Mac, I've downloaded Okular. Unfortunately Okular's Info.plist doesn't declare any supported file formats.

I've manually selected okular.app in Get Info > Open With > All Applications. Now, when I click on a DjVu file in Finder, Okular is started but the file is not opened. When I run

ps -wwp "$(pgrep okular)" -o command

it shows that the path to the DjVu file was not passed to Okular's binary

COMMAND
/Applications/okular.app/Contents/MacOS/okular

Running

open -a /Applications/okular.app PATH_TO_DJVU

produces the same result.

However, explicitly passing the path to Okular's binary works:

/Applications/okular.app/Contents/MacOS/okular PATH_TO_DJVU

Is there a way to force Finder to do so?

3
  • If I remember correctly, the open document action is implemented with AppleEvents. It's possible they didn't handle that in the code. Can you check with the developers?
    – hym3242
    Commented Jun 26 at 13:48
  • There is an old bug report back from 2022: bugs.kde.org/show_bug.cgi?id=456058. No reaction from the developers. Commented Jun 26 at 15:54
  • Then there’s not much you can do. Maybe write a wrapper that registers as a viewer for djvu, which simply passes the path in the AppleEvent to okular?
    – hym3242
    Commented Jun 26 at 22:12

0

You must log in to answer this question.

Browse other questions tagged .