Hello @0bdc9c966fd8a4e720ef, good for you for sticking with it and digging deep to try to find a solution. I have a couple notes about your topic if you are interested.
The files in /etc/skel
have no effect on the user session at all. No applications refer to any of the configurations in these files, and the system does not look here for environment variables or other settings.
In fact, making changes to files in /etc/skel
will not even persist because the next time the package providing a config in /etc/skel
is updated (in this example, the package is garuda-dr460nized
), all of the changes you have made will be overwritten with whatever values are defined in the package.
The purpose of the files in /etc/skel
is to populate a user’s /home
directory with a bunch of default configs when a new user is created on your system. Whenever a new user is created on your system (including during the initial installation), all the files in /etc/skel/
are copied over to /home/*user_name*/
.
Unlike the files in /etc/skel
(which do nothing), the files in the user’s home directory should be honored by applications and system processes. It is the files in /home
you need to modify to make the changes you want.
The counterpart in your home directory for /etc/skel/.config/environment.d/garuda.conf
will be ~/.config/environment.d/garuda.conf
. This is the file which is able to set environment variables for your user when you log in. If you have not changed this file yet, then the environment variable which sets your default browser to Firedragon is still active.
You can see for yourself like this:
echo $BROWSER
If you want to update the BROWSER
value in ~/.config.environment.d/garuda.conf
with sed
, the command would be:
sed -i 's/firedragon/librewolf/' ~/.config/environment.d/garuda.conf
Notice the “g
” is not needed in this case since there is only one replacement.
On top of all of that, you should be aware that most graphical applications will not honor the BROWSER=librewolf
environment variable anyway. Command-line programs traditionally use environment variables, but graphical applications typically use the XDG MIME Applications specification instead. XDG MIME Applications - ArchWiki
To change your default browser from Firedragon to Librewolf, you should update the values in ~/.config/mimeapps.list
. This is the file where you can declare user overrides for default applications. It takes precedence over system configurations.
If you want to make this adjustment with sed
, that would look like this:
sed -i 's/firedragon/librewolf/g' ~/.config/mimeapps.list
Notice in this case, the “g
” is used because we are specifying a global replacement for the file.
Before you run that command, take a look at the file to see what is actually set as the default. It is possible to have multiple “default” applications set for any given MIME type, which would look like this for example:
[Default Applications]
application/pdf=firedragon.desktop;librewolf.desktop
application/json=firedragon.desktop;librewolf.desktop
application/x-xpinstall=firedragon.desktop;librewolf.desktop
x-scheme-handler/http=firedragon.desktop;librewolf.desktop
application/xhtml+xml=firedragon.desktop;librewolf.desktop
x-scheme-handler/https=firedragon.desktop;librewolf.desktop
...
If you have something like that, you would need to amend the sed
command accordingly. In this example, to set Librewolf to be the preferred default browser would be like this:
sed -i 's/firedragon.desktop;librewolf.desktop/librewolf.desktop;firedragon.desktop/g' ~/.config/mimeapps.list
I hope that helps.