Score:0

Can't seem to make Brave my default browser for local files

cn flag

I'm running XUbuntu 20.04 and have Brave, Chrome, and Firefox installed. I generally only use Brave these days unless I need to check something on one of the other two. Brave is set as my preferred browser in the Preferred Applications dialog:

enter image description here

Similarly, xdg-settings shows Brave as my default:

% xdg-settings get default-web-browser
brave-browser.desktop

Despite that, if I execute xdg-open some/on-disk/web/page.html it fires up Chrome. I rummaged around in my environment variables for XDG-related values but found nothing. Running xdg-open using bash -x I saw that it eventually runs exo-open. Running exo-preferred-applications just brought up the above dialog, so one would hope exo-open consults whatever database that uses. Still, it appears not to in all instances. Executing exo-open --launch WebBrowser does open Brave. Running it like this:

exo-open smontanaro/htmlcov/index.html

Chrome opens. Running it like this:

exo-open https://www.google.com/

Brave opens. I've yet to be able to construct a file: URL which brings up Brave. For example, In addition to the above relative path, this full path URL still fires up Chrome:

exo-open file:///home/skip/src/smontanaro.net/smontanaro/htmlcov/index.html

Why can't I seem to get Brave to open with an on-disk file: URL?

Score:0
cn flag

Associate the html mimetype to Brave rather than Chrome.

In Thunar, you can do this by right-click any html file, then "Open with", "Open with other application". Select the application, then do not forget to check the mark "Use as default for this kind of file" before hitting Open.

In Files (nautilus) on the default Ubuntu desktop, right-click the file to open Properties, then set the default application on the "Open With" tab.

cn flag
Thanks. That (Thunar - Nautilus isn't installed on my system) seems to have solved the problem, though I didn't see any "Use a as default ..." checkbox. There must be some other database somewhere which exo-open consults other than what xdg-settings and exo-preferred-applications show me. Any idea where that is?
vanadium avatar
cn flag
The box is at the bottom of the dialog. Else, it may depend on the version of Thunar. For me, it is there in the version of Thunar that comes with Xubuntu 21.10. Else, it may depend on the version of Thunar. Perhaps older versions always change the default (so no opportunity to open only once with another app).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.