I use Obsidian 0.12.12 (installer 0.12.10) as an AppImage on Linux Mint 20.2 (based on Ubuntu), and I have
~/.local/share/applications/Obsidian.desktop:
[Desktop Entry]
Name=Obsidian
Comment=Markdown Notetaking App
Terminal=false
GenericName=Text Editor
Type=Application
Exec=/home/matthias/AppImages/Obsidian-0.12.10.AppImage %u
Icon=obsidian
StartupWMClass=obsidian
MimeType=x-scheme-handler/obsidian;
(You probably shouldn’t set Obsidian as a text/html handler.)
and I call up Obidian from the terminal using xdg-open:
matthias@e6510:~$ xdg-open obsidian://open?vault=Knowledgebase&file=Discord
[1] 42953
matthias@e6510:~$ 2021-08-05 15:37:30 Loading updated app package /home/matthias/.config/obsidian/obsidian-0.12.12.asar
Received callback URL obsidian://open?vault=Knowledgebase
2021-08-05 15:37:31 Checking for update using Github
2021-08-05 15:37:31 Success.
2021-08-05 15:37:31 Latest version is 0.12.12
2021-08-05 15:37:31 App is up to date.
[1]+ Fertig xdg-open obsidian://open?vault=Knowledgebase
Doesn’t work. Why? Because the obsidian URI isn’t quoted and the & will send the first part of the string to the background!
Using:
matthias@e6510:~$ xdg-open "obsidian://open?vault=Knowledgebase&file=Discord"
matthias@e6510:~$ 2021-08-05 15:59:14 Loading updated app package /home/matthias/.config/obsidian/obsidian-0.12.12.asar
Received callback URL obsidian://open?vault=Knowledgebase&file=Discord
2021-08-05 15:59:15 Checking for update using Github
2021-08-05 15:59:15 Success.
2021-08-05 15:59:15 Latest version is 0.12.12
2021-08-05 15:59:15 App is up to date.
works fine! (Check on the “Received callback” line: it now got the full URI, including the file name.)