I am not sure if Obsidian follows XDG specs, but could you try xdg-open https://example.org/ in your terminal? Anyways XDG is the only spec I know that should be respected by distros and linux apps in general. So, if xdg-open will open your default browser, this is indeed a bug.
I am not familiar with snap, does it containerize apps somehow? If yes, make sure that it has access to your system configuration about default browser.
And lastly, provide, how do you set your default browser? Do other apps respect your setting? Telegram for example, please provide examples of apps which respect your setting.
For me it opened chromium even though I have firefox set as default browser. Running the following commands in the terminal (and then restarting Obsidian) made it work for me:
I have the same issue, also on Ubuntu 22.04.3 LTS, also installed via snap (if that matters).
I tried the solution suggested by gregmuellegger but unfortunately it didn’t work for me. I also followed the link in his post and tried the gio approach.
Obsidian indeed does not seem to respect my default browser, and I do not have the same problem with other desktop clients.
Same issue here. I am on Ubuntu 23.10, it worked fine on Ubuntu 22.04. If I click a link in obsidian (v1.5.3) it always opens the link in firefox, but I have set google chrome as default browser, see screenshot below for Ubuntu Settings (Settings->“Default Apps”):
Also there is no issue when using xdg-open from command line. So this seems to be a bug in obsidian since xdg-open opens the url in google-chrome (the default browser). And the fix provided by above by gregmuellegger:
Same happens to me, links open with Firefox instead of Edge.
Os: Fedora release 39
Obsidian: 1.5.8
Tried the steps above related to setting xdg-mime but didn’t work.
I have a similar issue and hopefully a useful observation.
Ubuntu 22.04 with xfce4
Obsidian 1.5.8 installed as AppImage (it was also an issue with v 1.5.3)
Firefox installed as snap
xdg-open works from the command line.
obsidian fails when clicking a web link with, “Failed to execute default browser”.
I did have this working previously by removing the firefox snap and installing the Mozilla deb - and MUCH fiddling to get the default browser set correctly.
Unfortunately an update for Ubuntu reinstalled the snap, even though I had “pinned” the deb and my default settings were left in disarray. So I am no longer fighting the firefox snap, just trying to get it to work with obsidian.
All my other apps launch web links successfully as expected EXCEPT zathura (pdf viewer).
It threw exactly the same error.
Adding “set sandbox none” to the zathura config file resolved the issue.
Replying to my own post.
I tracked down my issue. It was not due to Obsidian, so a different issue to this thread, but hopefully this may help someone.
I set “terminal=true” in my desktop launcher file and found that when trying to launch a web link I was getting a permission denied error on the “Path” folder in the desktop file.
I was the owner of that folder and also part of the group.
The permissions were 700.
I changed the “Path” to my home folder which has permissions 755 and it started working.