When I click on PDF from Calibre’s main window or click on View it opens up my Dolphin file-manager and shows the following dialog on top of the folder:
Trying to open a file as a folder:'file:///home/shuvashish76/Calibre/Main/Author_name/Book_title.pdf'
from there (file-manager) if I click on the PDF it opens up my default Okular application.
I’ve already set “File Association” for PDF to open in Okular + Okular as default “PDF viewer” application from system settings.
[If I use Calibre’s “Open with” external-plugin then it does work, so I guess something is misconfiguration on my side. Is it somewhat related file:// URI here?]
How to fix it so that it’ll always open in my default application with Calibre’s View option?
Calibre: v9.14 (isolated installation as instructed at official documentation)
OS: EndeavourOS x86_64
Kernel: Linux 6.18.48-1-lts
DE: KDE Plasma 6.7.4
WM: KWin (Wayland)
Dolphin: v26.08.0
KDE Frameworks: 6.29.0 | Qt: Using 6.11.2 and built against 6.11.1
I asked about this at Calibre’s forum and according to the developer it’s something related to xdg-open.
To be honest, I don’t really see the problem: Calibre pops up a message asking about the file, then gives you the option to open it. If this is what you want to bypass, then I’d pursue it with Calibre.
I would try using the default calibre package in the Arch repos, just to eliminate that install as an issue.
There is no “pop-up message or open_with option” for me.
I’ve disabled “Preferenec > Use internal viewer for > PDF” not to open with Calibre’s viewer.
Edit: Got it, you’ve to “right click > view > view specific format > PDF > open with > choose the application > ok” it works but annoying to use this method frequently. The option is too deep.
Simply click on PDF from Calibre’s “Cover Browser” used to open directly on desired application (in my case Okular) but recently it’s not working due to some xdg-open related issue.
Well, I doubt that anything has changed in xdg-open in a long time (package has seen no updates since last year). When I used Calibre, I was constantly getting new updates, so I’d be willing to bet that it’s the problem here.
I wish you luck, my friend. Sorry I couldn’t be more helpful.
You may check preferences->tweaks->openers_by_scheme
#: Change the programs that are run when opening files/URLs
# By default, calibre passes URLs to the operating system to open using
# whatever default programs are configured there. Here you can override
# that by specifying the program to use, per URL type. For local files,
# the type is "file" and for web links it is "http*". For example:
# openers_by_scheme = { "http*": "firefox %u" } will make calibre run Firefox
# for https://whatever URLs. %u is replaced by the URL to be opened. The scheme
# takes a glob pattern allowing a single entry to match multiple URL types.
openers_by_scheme = {}
I am not sure how to properly configure it but the desctiption looks like what you want.