A Non-Exhaustive Guide to Setting The Damn Default Browser

why are there so many things to set

anyways.

xdg-mime default mybrowser.desktop x-scheme-handler/https x-scheme-handler/http text/html
xdg-settings set default-url-scheme-handler http mybrowser.desktop
xdg-settings set default-url-scheme-handler https mybrowser.desktop

# in your shell profile. note this is a bin on PATH
export BROWSER=mybrowser

gio mime text/html mybrowser.desktop

This should make it so the right browser loads when opening a link and when opening html files on disk.

If I’m missing any, please send ‘em in so i can update this.