# URL Scheme doesn't work on Linux

**URL:** <https://forum.obsidian.md/t/url-scheme-doesnt-work-on-linux/5794>\
**Category:** Bug graveyard\
**Tags:** upstream-bug, important\
**Created:** [September 16, 2020, 2:22pm UTC](https://forum.obsidian.md/t/url-scheme-doesnt-work-on-linux/5794 "2020-09-16T14:22:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<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:** [September 16, 2020, 2:22pm UTC](https://forum.obsidian.md/t/url-scheme-doesnt-work-on-linux/5794/1 "2020-09-16T14:22:51Z")

</div>

### Steps to reproduce

1. Have two vaults `vaultA` and `vaultB` (no spaces in their names).
2. `vaultA` has a note `noteA`
3. With Obsidian closed, try to open an Obsidian URL either in the browser or through `xdg-open`:
  - obsidian://vault/vaultB
  - obsidian://vault/vaultA/noteA
  - obsidian://vault/vaultA

4. With `vaultA` open in Obsidian try to open either of these:
  - obsidian://vault/vaultB
  - obsidian://vault/vaultA/noteA

5. Try the absolute path to `noteA`
  - obsidian:///home/argen/vaultA/noteA

### Expected result

With `vaultA` open in Obsidian

- Opening the link for `obsidan://vault/vaultA/noteA` would open `noteA`
- Opening the link for `obsidian://vault/vaultB` would open `vaultB`

### Actual result

- If Obsidian is closed, the last opened vault is opened.
- If Obsidian is open, the vault picker is shown.

### Environment

- Operating system: Ubuntu 18.04 with gnome-flashback and i3

- Obsidian version: 0.8.15, installer v.0.8.14

* * *

### Additional information

My `obsidian.destkop` file located in `~/.local/share/applications/`:

```auto
[Desktop Entry]
Name=Obsidian
Comment=Markdown Notetaking App
GenericName=Text Editor
Type=Application
Path=/home/argen/bin
Exec=Obsidian-0.8.14.AppImage %u
Icon=obsidian
StartupWMClass=obsidian
MimeType=text/html;x-scheme-handler/obsidian;

```

I also tried with the unpacked AppImage, and `Exec` pointing to the `obsidian` executable with the same result.

I have also ran the following:

```bash
xdg-mime default obsidian.destkop x-scheme-handler/obsidian
update-desktop-database

```

The output of both `xdg-mime query default x-scheme-handler/obsidian` and `xdg-settings get default-url-scheme-handler obsidian` is `obsidian.desktop`.

The relevant lines from my `~/.config/mimeapps.list`:

```bash
[Default Applications]
...
text/html=obsidian.desktop
x-scheme-handler/obsidian=obsidian.desktop

```

The `text/html` mime type gets added whenever I open Obsidian, but I don’t think that plays a role here.

Edit: Looking a little closer at the `mimeapps.list`, something is not right here. Opening Obsidian makes it the **default** application for `html` files, instead of the browser. I don’t know if this is related, but this is definitely a bug. I don’t think Obsidian is intended to open other local html files, but even if it is it should be added to the `[Added Associations]` section instead of making it the default. In fact, double clicking a local html file behaves in a similar way as trying to open an obsidian link: if Obsidian is open, the vault picker is chosen or if it’s closed, the last vault is open.

---

_[View the full topic](https://forum.obsidian.md/t/url-scheme-doesnt-work-on-linux/5794)._
