Skip to content

Instantly share code, notes, and snippets.

@moraisaugusto
Created February 19, 2022 01:18
Show Gist options
  • Save moraisaugusto/0aa2d65c0a0f135026e090e12ed5864b to your computer and use it in GitHub Desktop.
Save moraisaugusto/0aa2d65c0a0f135026e090e12ed5864b to your computer and use it in GitHub Desktop.
change default browser using xdg

check the default web browser using

xdg-settings --list
xdg-settings get default-web-browser
echo $BROWSER

If you want to change the Chrome to Firefox and your default-web-browser is already Firefox, then you have to check the .config/mimeapps.list

[Default Applications]
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment