"Open in system exporer" launches VSCode

I start Obsidian, open any vault, and try to open a file or a folder in the system explorer via context menu: my VSCode pops up instead of expected SpaceFM for folders for example:

root@porteus:~# xdg-mime query default inode/directory
spacefm.desktop
root@porteus:~# /I/Obsidian.AppImage --no-sandbox
Setting $HOME to /I/Obsidian.AppImage.home
Setting $XDG_CONFIG_HOME to /I/Obsidian.AppImage.config
2025-04-14 12:15:37 Loading main app package /tmp/.mount_Obsidi4WLtOM/resources/obsidian.asar
[5230:0415/001538.202733:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.portal.Desktop exited with status 127
MESA-INTEL: warning: Haswell Vulkan support is incomplete
2025-04-14 12:15:38 Checking for update using Github
libva error: /usr/lib64/dri/iHD_drv_video.so init failed
2025-04-14 12:15:38 Success.
2025-04-14 12:15:38 Latest version is 1.8.9
2025-04-14 12:15:38 App is up to date.
[5230:0415/001541.338416:ERROR:atom_cache.cc(229)] Add WM_CHANGE_STATE to kAtomsToCache
[5230:0415/001635.935695:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.portal.OpenURI.OpenDirectory: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.portal.Desktop exited with status 127
[5230:0415/001635.935710:ERROR:platform_util_linux.cc(242)] Error calling OpenDirectory
[5504:0415/001636.496723:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.portal.Desktop exited with status 127
Warning: 'unity-launch' is not in the list of known options, but still passed to Electron/Chromium.

Not sure if related, but what is also broken on my system is opening URL via “Open link in default browser” – choosing that menu has no effect.

Also, right click on a pdf file in the vault, “Open in default app” opens it in Xournal++!? Sure Xournal can display PDFs – but it’s not the default App for PDFs on my system of course.

Could someone please teach me how Obsidian interacts with external default handlers, how it picks the wrong one? Thanks

Starting Obsidian with fresh, empty Obsidian.AppImage.home and Obsidian.AppImage.config doesn’t solve it.

I’ve seen forum posts saying that Obsidian relies on xdg-open. Well, for me xdg-open /path/to/file.type opens correct Apps, for example, xdg-open *.pdf opens the Xpdfreader, which is correct. But Obsidian opens Xournal. Why? Where did it get it from?!

The solution is to use the .deb package (thanks for providing it), and NOT the .AppImage: now Obsidian correctly opens external system default apps.