"Open in default app" blocks Obsidian until app is closed

What I’m trying to do

My vault contains books as PDFs that I open using the default app to edit and highlight. My default PDF viewer is sioyek and whenever I try to open the PDF using the default app, sioyek gets launched, however, I can’t do anything in the Obsidian window.

Things I have tried

I don’t know what I can do here.

There’s a similar issue from some years back.

I cannot reproduce that, but then, it may be due to my operating system, Linux Fedora 40.

I noticed this bug happens with Okular as well. My Obsidian version is v1.5.12.

I found someone else facing the same bug.

It’s a pretty annoying issue. Could someone from the team please address it as a bug and work on it?

Nobody can help you fix this if you do not disclose your operating system. Many people on many operating systems do not have the issue.

I am using Arch Linux.

I have found a way to reproduce this. This seems to happen on setups without a desktop environment. For example, even on Fedora 38 (quickemu VM), there are no issues on GNOME, but if I install i3 on it, then I get the same issue.

Steps to reproduce:

  1. Install a non-DE window manager (e.g. i3wm).
  2. Launch Obsidian.
  3. Open an attachment using the default app.
  4. Obsidian UI freezes.

@vanadium I’ve narrowed down the exact behaviour. This bug happens on setups where the XDG_CURRENT_DESKTOP variable is not set to GNOME.

To reproduce, launch Obsidian as follows:


Opening any PDF in the system PDF viewer will block Obsidian now.

In contrast, things work fine if I do launch Obsidian as follows:


I don’t know why Obsidian changes the process spawning behaviour based on the DE. Because, by spoofing GNOME, Obsidian is working fine for me even with DWM on Arch Linux.

The fix should be to have the same behaviour as GNOME for other values of XDG_CURRENT_DESKTOP as well.