Change the default browser in Arch Linux i3 windows manager

On a new Arch linux i3 install, the default browser is palemoon. I use google chrome as my default browser. This guide shows how to go about changing the default browser to the one I like.

After a fresh install, I tried changing but it couldn’t work. Upon checking the logs, I found this error:

xdg-settings: $BROWSER is set and can't be changed with xdg-settings

Using the terminal to type

# Get the default browsewr
xdg-settings get default-web-browser

# This should change the default browser but this fails with the above error
xdg-settings set default-web-browser google-chrome.desktop

Solution

Change the browser in mimelist file ~/.config/mimeapps.list. Update all references of palemoon to google-chrome.desktop in that file

vim ~/.config/mimeapps.list

The BROWSER variable is set in this file /home/$USER/.profile. Find it and replace with this

export BROWSER=/usr/bin/google-chrome-stable
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy