Obsidian URI set up for Linux / obsidian.desktop

Here’s what my setup looks like, maybe it will be helpful to you.

  • I’m running Linux Ubuntu 20.04.
  • I’m not using any special AppImage manager.
  • I downloaded the Linux AppImage and put it in /home/craig/Programs/obsidian
  • I extracted obsidian.png from the AppImage using --appimage-mount and put it in the same folder as the AppImage. To save you the trouble, I attached obsidian.png at the bottom of this post.
  • I created a desktop file obsidian.desktop in /home/craig/.local/share/applications/. The contents of the file are below. You’ll need to change the paths to match wherever you put your obsidian.AppImage file. Make sure there are no spaces between e.g. Exec= and /home/... Also make sure to keep the %u – that’s the special sauce.
  • I think that’s it! With this setup I can start Obsidian from the launcher, and obsidian:// links work for me in Chrome, Obsidian, and Mermaid. (Example Mermaid block with both kinds of links copied below.)

/home/craig/.local/share/applications/obsidian.desktop:

[Desktop Entry]
Name=Obsidian
Exec=/home/craig/Programs/obsidian/Obsidian-0.8.15.AppImage %u
Terminal=false
Type=Application
Icon=/home/craig/Programs/obsidian/obsidian.png
StartupWMClass=obsidian
X-AppImage-Version=0.8.15
Comment=Obsidian
Categories=Office;
MimeType=text/html;x-scheme-handler/obsidian;

Example graph with both kinds of links:

graph LR;
sed --> Obsidian;

click sed "obsidian://vault/Reference/sed";
click Obsidian "obsidian://open?vault=Reference&file=Obsidian";

obsidian.png:

5 Likes