Opening a file via Obsidian URL opens a new vault window after opening file

Steps to reproduce

Open an existing file in the Obsidian vault using the command xdg-open obsidian:///path/to/file/in/vault/file.md

Expected result

The file opens in the existing Obsidian instance without opening a new window.

Actual result

The file opens in the existing Obsidian instance an subsequently a new Obsidian window opens showing the vault selector

Environment

  • Obsidian 0.9.2 installed from the Appimage via AUR
  • Manjaro Linux (5.4.67-1 kernel, X11, spectrwm window manager)
  • shell: zsh 5.8
  • terminal: urxvt

potentially relevant config files

from my mimeapps.list
x-scheme-handler/obsidian=obsidian.desktop
from my obsidian.desktop file:
[Desktop Entry]
Name=Obsidian
Exec=env DESKTOPINTEGRATION=false /usr/bin/obsidian
Terminal=false
Type=Application
Icon=obsidian
StartupWMClass=obsidian
X-AppImage-Version=0.9.2
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

Hi @connorhodes, could you follow the bug template so we know under which conditions to reproduce this? Most important is to know which OS you’re using, the Obsidian version and the installer version.

Sure. I updated the post.

Your Exec needs a %u to recognize the URL being passed as argument

Thank you @argentum . That fixed my problem. That .desktop file was modified by the AUR PKGBUILD script. I’ll contact the maintainer of that script and ask him to add “%u” at the end of the “Exec” line

1 Like