How to open with default app PDF or OTHER files OUTSIDE the vault?


I have already found here several threads with very similar questions, and tried their solutions, but none works… so here I am.

What I’m trying to do

I am running Obsidian v1.1.16 on Ubuntu Linux 22.04.1 LTS

In my vault, I have many notes that are short comments of much longer PDF or ODF/LibreOffice files, or sometimes even of large infographics in PNG or JPG format: all files that, for several reasons I have to keep OUTSIDE the Obsidian vault.

I badly need to insert in each of those notes a link to the full document, so that when I click on it INSIDE Obsidian, that document is opened OUTSIDE Obsidian with the default app for that file format, be it Evince, LibreOffice, Gimp…

Things I have tried

Following what I found in other threads here, I have tried adding links like this to the notes:

- [FULL DOCUMENT](file:///home/work/archive/original-file.pdf)

but when I click on them in Editing or Reading mode, nothing happens. Also, if I right-click on the link, again both in Editing or Reading mode, there is NOTHING like “open in external app” in the pop-up menu.

I have also tried to put the link between double square brackets in several ways, e.g:
- [[file:///home/work/archive/original-file.pdf]]

- [[FULL DOCUMENT|file:///home/work/archive/original-file.pdf]]

but nothing happens anyway.

Ditto if I add or remove slashes after the “file:” substring of the link.

What now? Maybe I should change some mailcap/MIME level setting, but how? Or is it really impossible to open generic files on the same computer but outside the vault, with the default system apps?

Hold Ctrl and pull it to Obsidian to create a clickable link for it.


This :arrow_up:

I believe you are looking for
[some pfd](file:////home/work/archive/some.pdf) or with < > if there’s a space anywhere
[some pfd](<file:////home/work/archive/some other.pdf>)

I use macOS and it’s [some pfd](file:////Users/ME/Desktop/some.pdf).

file:/// also works fine on macOS.

@ariehen ,

you suggestion

I believe you are looking for some pfd](file:////home...

is exactly what I said I had tried, without success, before posting:

but just for the sake of it, I tried again, and I confirm it does not work. Nothing happens. Ditto for the suggestion by @Fuyuu : that is just a different method to generate the same markdown code, “file:///…” so it yelds the same results


I started obsidian from the command line, to view any error message, and indeed, when I click on the link in obsidian, it says so:

Opening file: /home/work/archive/testfile.pdf
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
/usr/bin/wslview: line 31: echo: write error: Bad file descriptor
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
/usr/bin/wslview: line 48: echo: write error: Bad file descriptor
/usr/bin/wslview: line 216: /mnt/c/Windows/System32/reg.exe: No such file or directory
/usr/bin/wslview: line 308: [: -ge: unary operator expected
/usr/bin/wslview: line 94: echo: write error: Bad file descriptor

where wslview is this.

So the problem is… why on Earth does Obsidian tries to use Windows “stuff” on Linux??? And how to tell it to stop doing that, and use the Linux applications?

Just to be sure, this is absolutely correct and should work.

I am running Ubunut 22.04 LTS as well and never had any problems with opening external links. My only idea so far:

  1. Are you using obsidian simultaneously on a Windows machine, along with any syncing service? If so, you could try to use a different configuration folder for both (cf. settings → about)
  2. Are you using any plugins that might change the way external links are handled? If so - along with the above configuration settings - there might occur some conflicts between different operating systems.

SOLVED, by removing the wslu package with this command:

sudo apt remove wslu

Now Obsidian correctly opens both PDF and LibreOffice files with evince and LibreOffice, when I click on their links. I am leaving the original version of this post below for reference, and because if anybody does know why Obsidian ended tied up to wslview, I’d like to know.

Thanks, everybody.

I know, but thanks for the confirmation.

And no, I am not using obsidian on any windows machine. HOWEVER:

I have just copied the whole vault on a laptop running the same version of Ubuntu, ran apt-get upgrade on the laptop, dowloaded the the current Obsidian snapimage, and used it to open the same file described in my original post.

On the laptop, everything works fine, when I click on the link it DOES open the local file with evince.

AND, there is no wslview on the laptop, so the problem is almost surely there.

That is, for some reason I honestly don’t remember, wslview got installed on the Ubuntu desktop, got attached to Obsidian, and screwed it. And only to Obsidian, the file managers on the desktop have no problems to open PDF or other files. So…

  • (again) does anybody have an idea of WHY Obsidian would use wslview on a Linux only system?
  • could I remove wslview without consequences for the rest of the system?

I have asked the same questions also on the Ubuntu list, but no answer so far…

TIA for any help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.