Obsidian doesn't use default browser on Ubuntu 22.04

I’m new to Obsidian. Switching over from Evernote, because they stopped working on their linux client.

I installed Obsidian via Snap and had the same issue as Obsidian does not open links in the standard browser on ubuntu

Obsidian always uses Firefoxe instead of the system default browser.

This doesn’t not happen if you use AppImage or install via dpk.

Don’t know if it’s a problem with snap in general or the way how the Obsidian snap was build.

1 Like

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.

1 Like

I can confirm that this is a bug – xdg-open uses Chrome. Obsidian opens things in Firefox.

In addition, I am running Ubuntu 20.04 and not using snap, so the bug does not appear to be specific to the Ubuntu version or to snap.

1 Like

I can confirm this issue as well.

Same issue here, Obsidian always open firefox. xdg-open open chrome as well.

  • Obsidian 1.4.16
  • Ubuntu 22.04.3 LTS

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:

xdg-mime default firefox.desktop x-scheme-handler/http
xdg-mime default firefox.desktop x-scheme-handler/https

For using chrome as default browser it would be:

xdg-mime default google-chrome.desktop x-scheme-handler/http
xdg-mime default google-chrome.desktop x-scheme-handler/https

Got the solution from here: Default browser not used from within Snap? - #32 by onkeltem - snapd - snapcraft.io