Steps to reproduce
Use a Linux-based operating system.
- Have a PDF file in the Vault
- Have Evince or Okular as a default PDF opening application
- In Obsidian, right click on the PDF and open it in the default app
This makes Obsidian stop responding until the external application has been closed.
I’ve managed to circumvent this by creating a new desktop shortcut for evince with the
-w flag added and setting it as my default. This change detaches the children process and releases Obsidian when the default app is used to open the PDF.
I expected to be able to use both, Obsidian and Okular/Evince.
I could only use the PDF reader, Obsidian was stuck until I quit the PDF viewer.
- Operating system: Arch Linux, i3wm
- Obsidian version: v0.12.19
strace for obsidian shows this syscall if it’s of any use:
141495 execve("/usr/bin/evince", ["/usr/bin/evince", “/home/nenad-home/Dropbox/SecondBrain/Software Engineering/Leadership/Books/book.pdf”], 0x564f598b93a0 /* 50 vars */) = 0 <0.000252>
this is a problem with how your Desktop environment handles opening files associated with other programs.
Has been asked other times. Search the forum for possible solutions.
I have Ubuntu 20.04.3 LTS, Evince 3.36.10 and Obsidian v0.12.19 and I can not reproduce the error. I can open several PDF files from within Obsidian and both the PDF viewers and Obsidian keep on working as expected.
I scoured the forum trying all kind of combination of keywords: linux, block, freeze, default app, and I found out this one which is the closest: Opening in default app now results in Obsidian blocking until I close the default app
However, this doesn’t seem to be solved in the forum. The other poster in the link I shared claims that this behavior worked before, so maybe the problem was introduced in a newer version of Obsidian.
I’ve managed to solve it with a “hack”. I’ve created a dummy .desktop file that points to this wrapper script which runs the PDF viewer and detaches the process.
Dummy desktop file in ~/.local/share/applications:
and the zathura-wrapper script:
zathura "$1" & disown