This post is the start of a question and its own answer. Its purpose is to document a solution that has seemingly not been found before.
You can skip to the TLDR if you don’t want to read; it’s at the end of this post.
My post contained errors; they have been edited.
You can take a look at the replies under - there are additional explanations and corrections to my post, it’s interesting !
Hello Garuda Forums,
I have had an issue with changing default browsers from firedragon to librewolf. Firedragon feels a bit too feature-packed for me, so I simply feel more at home with Librewolf, while keeping firedragon as a secondary browser.
The problem I encountered was that despite the Default Web Browser (from KDE Settings Default Applications) being set to Librewolf, Firedragon would still open for different things (e.g. python webbrowser.open amongst others).
I quickly figured out that this was happening because the environment variable $BROWSER
was set to firedragon explicitly.
A few quickfixes were already posted on this forum (and elsewhere), advising the setting of $BROWSER
from a fish configuration file, e.g. from ~/.fish_profile
, ~/.config/fish/config.fish
or /etc/fish/config.fish
.
While this fix may convince other people, I wanted to understand why my $BROWSER
was acting like that.
Another possible quickfix probably was uninstalling firedragon (and maybe symlinking the executable to librewolf), but I wanted to keep the package.
I obviously searched in the different config dirs fish may have, to no avail.
I tried set -S | grep BROWSER
(which shows variables’ history) said that it was defined in global scope as firedragon (the librewolf is from when I had .fish_profile
):
set -S | grep BROWSER
$BROWSER: set in global scope, exported, with 1 elements
$BROWSER[1]: |librewolf|
$BROWSER: originally inherited as |firedragon|
I also could not find anywhere where this variable would be set by running fish_trace=1 fish -lic 'echo'
, which meant a definition from higher.
I ran multiple system-wide grep
s and find
s, including these horrors (ran from /
):
sudo find -name "*.fish" -not -path "proc*" -not -path "sys*" -not -path ".snapshots*"
sudo grep -rE "set.{0,6}BROWSER" --exclude-dir=proc --exclude-dir=sys --color=auto --exclude-dir=.snapshots`
I did in fact look into lots of files.
In the end, the one that allowed me to find the right file was:
sudo grep -rE "BROWSER.*firedragon" --exclude-dir=proc --exclude-dir=sys --color=auto --exclude-dir=.snapshots
Which gave me a hit at /etc/skel/.config/environment.d/garuda.conf
**~/.config/environment.d/garuda.conf
:
...
~/.config/environment.d/garuda.conf: BROWSER=firedragon
...
As I had already gone through a lot to find a match (4 hours of searching !!), I was sure it was the culprit. I changed it to BROWSER=librewolf
and rebooted : voilà, fixed.
I really wish this was documented somewhere before, this search was painful, but at least it’s here now, so enjoy and I hope this post helped you
I’m actually interested in seeing what other things this folder contains. When I have time maybe.
**: While it did hit /etc/skel/.config/environment.d/garuda.conf
, this is not the file that affects existing user sessions; the right one is in your home config folder. Read the next post for explanation !
TLDR : Run
sudo sed -i 's/firedragon/librewolf/' ~/.config/environment.d/garuda.conf
and reboot