Testing on Ubuntu 22.04 (Calibre 8.1.1 + Obsidian 1.5.8)
Hi! First of all, thanks for this plugin — it’s a great idea and very helpful for anyone who uses Calibre + Obsidian.
I’ve been testing the latest version (1.4.1) on Linux (Ubuntu 24.04), and here’s what I’ve found regarding the obsidian:// URI flow and note creation:
What works:
The obsidian://new?... URI does work to create notes in Obsidian.
After allowing the system handler prompt in the browser once, Obsidian handles the link correctly and creates the note in the vault.
❌ What doesn’t work automatically:
webbrowser.open() opens the default browser (as expected), but requires a manual click every time to "Visit site" or confirm the handler.
Enabling the checkbox “Use Linux xdg-open command…” in the plugin does not change the behavior — it still opens the browser.
I tested replacing webbrowser.open() with:
os.system("xdg-open 'obsidian://...'")
subprocess.run(["xdg-open", ...])
Direct call to Obsidian binary with the URI
But none of these worked when executed from within Calibre, even though they work fine from the terminal.
Hypothesis:
Calibre (installed in /opt) may be running in an environment where graphical environment variables ($DISPLAY, DBus, etc.) are not inherited correctly. That prevents xdg-open or GUI apps from launching from subprocesses.
Current best option:
Returning to webbrowser.open(uri) is the most stable method. After the first browser confirmation, it works every time — but requires a manual click unless browsers allow persistent approval (not always the case).
Suggestion:
It would be helpful if the plugin’s config UI made this clearer — maybe by noting that:
The xdg-open option might not work reliably under some Linux environments.
And that browsers will always require user interaction for security reasons.
Thanks again for the great plugin, and happy to share test cases if useful!
ecovisiones
|