Linux

Change the default browser in Arch Linux i3 windows manager

Pinterest LinkedIn Tumblr

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

I am a Devops Engineer, but I would describe myself as a Tech Enthusiast who is a fan of Open Source, Linux, Automations, Cloud and Virtualization. I love learning and exploring new things so I blog in my free time about Devops related stuff, Linux, Automations and Open Source software. I can also code in Python and Golang.

Write A Comment