# Obsidian URI set up for Linux / obsidian.desktop

**URL:** <https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494>\
**Category:** Help\
**Created:** [October 23, 2020, 10:36pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494 "2020-10-23T22:36:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![santi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/santi/32/93240_2.png) [@santi](https://forum.obsidian.md/u/santi)\
**Post date:** [October 23, 2020, 10:36pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/1 "2020-10-23T22:36:25Z")

</div>

Hey guys,

I’m having trouble setting up obsidian URI in Linux

> I’m using Linux Manjaro XFCE with Awesome Window Manager (Set up similar to Arch Linux)

I’m using obsidian version 0.9.6 installed through .AppImage (0.9.4)

* * *

I’m trying to set up the obsidian.desktop file for the obsidian URI as shown in this post

> [Obsidian Links in Mermaid - #8 by Craig](https://forum.obsidian.md/t/obsidian-links-in-mermaid/2965/8)

I have a couple of questions:

- Does this work with AppImageLauncher? This is how I integrate my appimagelauncher into the desktop, but it creates a strange file name

`Obsidian-0.9.4_8d6dff3d6beaa7c5d002cc28372d2d8f.AppImage`

* * *

Where should I put the obsidian.desktop file?

* * *

The help vault has a file called “Using obsidian URI” in there:

> On Linux, there’s a much more involved process:  
> First, ensure you create a obsidian.desktop file. See here for details  
> Ensure that your desktop file specifies the Exec field as Exec=executable %u. The %u is used to pass the obsidian:// URIs to the app.

This part says I should extract appimage

> If you’re using the AppImage installer, you may have to unpack it using Obsidian-x.y.z.AppImage --appimage-extract. Then make sure the Exec directive points to the unpacked executable.

I extracted the file, but now I’m not sure where to place those files, or where to run things from.

* * *

# Current Situation

I’m trying to set this up for opening links in mermaid, like showed here: [Obsidian Links in Mermaid - #6 by Craig](https://forum.obsidian.md/t/obsidian-links-in-mermaid/2965/6)

this is what I’m trying to open in my obsidian note:

```mermaid
graph LR;
test;
click test "obsidian://open?vault=obsidian-personal&file=test";

```

this puts a link in a diagram box, with a link to another note.

* * *

What I get is a menu that asks me what app to use to open the link. If I click on Obsidian which promts me to select my vault and leads me nowhere.

At the same time I get a new tab in my browser  
displaying a blank window with what I’m trying to run  
`obsidian://open?vault=obsidian-personal&file=test`

* * *

> Side note: since I use insider build my version 0.9.6 is not the same as my app image file 0.9.4

I’ve been stuck on this, been trying to solve it for hours, I appreciate any help  
Thanks !

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [October 24, 2020, 10:58pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/2 "2020-10-24T22:58:30Z")

</div>

I don’t use the AppImageLauncher, but here [Meta Post - Linux tips, tricks & solutions to common problems](https://forum.obsidian.md/t/meta-post-linux-tips-tricks-solutions-to-common-problems/6291/3) are details of where to add the desktop file.

---

<div class="post-metadata">

**Author:** ![santi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/santi/32/93240_2.png) [@santi](https://forum.obsidian.md/u/santi)\
**Post date:** [October 24, 2020, 11:10pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/3 "2020-10-24T23:10:55Z")

</div>

Thank you I’ll try it out!  
update: it didn’t fix it for me, URI is still not working

---

<div class="post-metadata">

**Author:** ![Craig](https://forum.obsidian.md/user_avatar/forum.obsidian.md/craig/32/8831_2.png) [@Craig](https://forum.obsidian.md/u/Craig)\
**Post date:** [October 25, 2020, 4:25pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/4 "2020-10-25T16:25:16Z")

</div>

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:

```auto
[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:

```auto
graph LR;
sed --> Obsidian;

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

```

* * *

obsidian.png:

 ![obsidian](https://forum.obsidian.md/uploads/default/original/2X/6/6df43bc4ee96f0a1b67ff3600caf6879b758a743.png)

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [October 25, 2020, 5:04pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/5 "2020-10-25T17:04:46Z")

</div>

> [@Craig](#):
>
> 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 have basically the same setup, but the step above is not needed imo (Ubuntu 18.04, ymmv)

---

<div class="post-metadata">

**Author:** ![Craig](https://forum.obsidian.md/user_avatar/forum.obsidian.md/craig/32/8831_2.png) [@Craig](https://forum.obsidian.md/u/Craig)\
**Post date:** [October 25, 2020, 6:36pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/6 "2020-10-25T18:36:55Z")

</div>

Thanks for the feedback! What setting do you have for the icon in your obsidian.desktop file?

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [October 25, 2020, 7:03pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/7 "2020-10-25T19:03:08Z")

</div>

I saved the icon in `~/.icons/obsidian.png`, but I’m also on i3 using rofi, so I don’t really need the icon 😜. The details of my setup are over here:

> [@Meta Post - Linux tips, tricks & solutions to common problems](https://forum.obsidian.md/t/meta-post-linux-tips-tricks-solutions-to-common-problems/6291/3):
>
> How to use the Obsidian AppImage After downloading the AppImage, and make it executable chmod +x Obsidian-0.8.14.AppImage, you should place it somewhere in your PATH as described [here](https://docs.appimage.org/user-guide/faq.html#question-where-do-i-store-my-appimages), e.g. in ~/bin/. To add a [desktop entry](https://wiki.archlinux.org/index.php/desktop_entries), you can create an obsidian.desktop file and place it in either /usr/share/applications/ or /usr/local/share/applications/ for applications installed system-wide, or ~/.local/share/applications/. The contents should look something like this: [Desktop Entry] Name=Obsidian C…

---

<div class="post-metadata">

**Author:** ![santi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/santi/32/93240_2.png) [@santi](https://forum.obsidian.md/u/santi)\
**Post date:** [October 26, 2020, 3:55am UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/8 "2020-10-26T03:55:28Z")

</div>

thank you @Craig for the detailed description it really helped a lot!  
and thanks @argentum as well appreciate the tips for the obsidian.png

Currently it worked, but I’m having some strange behaviour

For instance on mermaid if I click here:

(The following is @Craig’s mermaide code modified for my vault)

```auto
graph LR;
sed;

click sed "obsidian://vault/obsidian-personal/sed";

```

Obsidian does two weird things

# If the file already exists

It opens it, but then it does two unecesary annoying extra steps

1. It opens a prompt to

 ![URI-menu-2020-10-25](https://forum.obsidian.md/uploads/default/original/2X/b/ba252907ca0b974dcbb8a24238bd9fd298d34307.png)

if I click on “Remeber my choice” I get this message

 ![URI-menu--firefox-menu-2020-10-25](https://forum.obsidian.md/uploads/default/original/2X/7/7525d1c180b03e8fc699827fbf53fc582b194e4e.png)

This is saying I can change this from “Firefox Preferences”

After I click “Remember Choice” I don’t get that annoying message anymore.

**Any ideas on where in Firefox Preferences could I find this?**

* * *

* * *

# Firefox Tab Opens everytime

After a mermaid link works correctly  
I get a new tab opened everytime in firefox with the following text on the URL:

`obsidian://vault/obsidian-personal/test`

It shows this everytime I open a link.

I have no idea why this is, **but I also notice that if I open the command palette and try “Show In Folder”** this opens in firefox as well (with a structure of my files in the browser)

_ **It does this instead of opening this in my linux file manager. In my case I use Thunar** _

I’m not sure if that’s related, but the new tab opened with every link is my main concern now.

* * *

## Question about creating vs opening mermaid files

Like I mentioned earlier, if I click on a mermaid link it doesn’t work unless the file already exists, is this normal behaviour?

* * *

Thanks again for the great help, really appreciate it

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [October 26, 2020, 8:23am UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/9 "2020-10-26T08:23:02Z")

</div>

I couldn’t reproduce. I’ve seen the prompt when clicking on an obsidian link from another app (Todoist if that matters, electron-based too), but I don’t have the option there to remember my choice. Maybe it’s a GNOME thing? (My version is 3.28.2).

What are the outputs of `xdg-mime query default x-scheme-handler/obsidian` and `xdg-settings get default-url-scheme-handler`?

Where does Obsidian show up in your `~/.config/mimeapps.list`?

RE: Opening non-existing files is not possible:

> [@On another topic](https://forum.obsidian.md/t/5697/1):
>
> If the vault opens, but does not navigate to the specified note, then it means the file of that path was not found.

Edit: You can check what Firefox is doing in its settings:

 ![image](https://forum.obsidian.md/uploads/default/original/2X/2/2ac937df67b40ef783a64b6c6fe9714a3818cbf0.png)

---

<div class="post-metadata">

**Author:** ![santi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/santi/32/93240_2.png) [@santi](https://forum.obsidian.md/u/santi)\
**Post date:** [October 26, 2020, 12:59pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/10 "2020-10-26T12:59:55Z")

</div>

> [@argentum](#):
>
> RE: Opening non-existing files is not possible:

Got you this makes sense

* * *

> [@argentum](#):
>
> xdg-mime query default x-scheme-handler/obsidian and xdg-settings get default-url-scheme-handler

this is what the terminal returns:

`appimagekit_c2a39878767986b435d0a31ec4395864-Obsidian.desktop`

> [@argentum](#):
>
> xdg-settings get default-url-scheme-handler

this one doesn’t return anything, not sure why

> [@argentum](#):
>
> Where does Obsidian show up in your ~/.config/mimeapps.list?

It shows at the very end of a list of files under this  
`[Default Applications]`

itshows the following

`handler/obsidian=appimagekit_662bbdc1ca79f8d4ec9971260b077778-Obsidian.desktop`

* * *

> [@argentum](#):
>
> Maybe it’s a GNOME thing?

it’s very strange, I don’t use GNOME. I’m on Manjaro XFCE

The promt to “Open With” is not a real problem since after putting “Remember Choice” it’s not appearing anymore.

The problem that’s still bugging me is the opened tab in Firefox after clicking on an URI obsidian internal link.

* * *

Thanks for showing me where to change it in Firefox, happy to know it’s a simple thing

* * *

**Thanks for the help.** When you do command palette \> Show in Folder, does it also open in your browser, or does it work in your file manager? I think if I solve this I might fix the blank tab issues.

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [October 26, 2020, 2:54pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/11 "2020-10-26T14:54:01Z")

</div>

> [@santi](#):
>
> this one doesn’t return anything, not sure why

I think you might be missing something, try this:

> [@URL Scheme doesn't work on Linux](https://forum.obsidian.md/t/url-scheme-doesnt-work-on-linux/5794/1):
>
> I have also ran the following:
> 
> ```auto
> xdg-mime default obsidian.destkop x-scheme-handler/obsidian
> update-desktop-database
> 
> ```

---

<div class="post-metadata">

**Author:** ![santi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/santi/32/93240_2.png) [@santi](https://forum.obsidian.md/u/santi)\
**Post date:** [October 26, 2020, 3:12pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/12 "2020-10-26T15:12:21Z")

</div>

Yeah something must be missing, thanks for the help

I have my obsidian.desktop file in  
`~/.local/share/applications`

When I run:

`xdg-mime default obsidian.destkop x-scheme-handler/obsidian`

What I get is:

`xdg-mime: malformed argument 'obsidian.destkop', expected *.desktop Try 'xdg-mime --help' for more information.`

---

<div class="post-metadata">

**Author:** ![alltagsverstand](https://forum.obsidian.md/user_avatar/forum.obsidian.md/alltagsverstand/32/4265_2.png) [@alltagsverstand](https://forum.obsidian.md/u/alltagsverstand)\
**Post date:** [October 26, 2020, 3:31pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/13 "2020-10-26T15:31:45Z")

</div>

> [@santi](#):
>
> destkop

des **kt** op → des **tk** op is certainly a “malformed argument” for your terminal… 😉

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [October 26, 2020, 3:54pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/14 "2020-10-26T15:54:04Z")

</div>

Woops! That was an inherited typo

---

<div class="post-metadata">

**Author:** ![santi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/santi/32/93240_2.png) [@santi](https://forum.obsidian.md/u/santi)\
**Post date:** [October 26, 2020, 6:26pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/15 "2020-10-26T18:26:47Z")

</div>

No worries, thanks @alltagsverstand for realizing

I corrected it and it worked

```auto
xdg-mime default obsidian.desktop x-scheme-handler/obsidian

```

after trying

```auto
update-desktop-database

```

I get:

```auto
The databases in [/usr/local/share/applications, /usr/share/applications] could not be updated. 

```

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [October 26, 2020, 6:56pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/16 "2020-10-26T18:56:50Z")

</div>

You need `sudo` for that

---

<div class="post-metadata">

**Author:** ![santi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/santi/32/93240_2.png) [@santi](https://forum.obsidian.md/u/santi)\
**Post date:** [October 26, 2020, 11:02pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/17 "2020-10-26T23:02:36Z")

</div>

nice after doing it with sudo it didn’t return an error.

Unfortunatly it didn’t solve the blank tab in firefox, that’s such as strange side effect, not sure what it could be causing it!

---

<div class="post-metadata">

**Author:** ![Elnath04](https://forum.obsidian.md/user_avatar/forum.obsidian.md/elnath04/32/17578_2.png) [@Elnath04](https://forum.obsidian.md/u/Elnath04)\
**Post date:** [August 3, 2021, 9:16am UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/18 "2021-08-03T09:16:12Z")

</div>

> [@santi](#):
>
> Does this work with AppImageLauncher? This is how I integrate my appimagelauncher into the desktop, but it creates a strange file name `Obsidian-0.9.4_8d6dff3d6beaa7c5d002cc28372d2d8f.AppImage`

Yes, to get URI working with [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) wasn’t that hard.

1. Open your `.desktop` file. (Mine was in `/home/juris/.local/share/applications/`).

2. Find `MimeType=` and edit to `MimeType=x-scheme-handler/obsidian;`

3. Open and edit `mimeapps.list` (also in `/home/juris/.local/share/applications/`) with:

4. Be sure that name after `x-scheme-handler/obsidian=` is the same as `.desktop` file created by AppImageLauncher inside `~/.local/share/applications`

Now URI links should work.

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [August 25, 2021, 4:17pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/19 "2021-08-25T16:17:59Z")

</div>

Split this topic on August 25, 2021, 4:17pm UTC

4 posts were split to a new topic: [Open a specific vault with Obsidian URI](https://forum.obsidian.md/t/open-a-specific-vault-with-obsidian-uri/23156)

---

<div class="post-metadata">

**Author:** ![argentum](https://forum.obsidian.md/user_avatar/forum.obsidian.md/argentum/32/7733_2.png) [@argentum](https://forum.obsidian.md/u/argentum)\
**Post date:** [August 25, 2021, 4:18pm UTC](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494/20 "2021-08-25T16:18:17Z")

</div>

Closed on August 25, 2021, 4:18pm UTC



[Next page](https://forum.obsidian.md/t/obsidian-uri-set-up-for-linux-obsidian-desktop/7494.md?page=2)
