r/SteamDeck•
aeiron

Stop Edge from taking over default browser

Question

I downloaded Edge to get Xbox game pass streaming on linux and since then it's taken over as default browser and keeps overriding the system setting which is set to Firefox. Doesn't appear to be a setting for it to stop taking over in Edge. Has anyone had luck keeping Firefox as the default browser? Tried google, but it all I could find was people complaining about the same problem in Ubuntu.

Posted Aug 11, 2022, 4:16 AM UTC

22
adines•

Easiest way I can think of is to launch edge with a script that makes your default-browser setting read-only while edge is still running. Something like so:

#!/bin/sh
chmod u-w ~/.local/mimeapps.list
/path/to/microsoft/edge #replace this
chmod u+w ~/.local/mimeapps.list

This should(?) prevent all programs from changing any default file or url handlers while edge is running.

There are other solutions:

  1. Run edge as a different user (this can be done automatically and not require a logout with some sudoers magic). You can make that user have the same home directory and primary group as your "normal" user, and make your home directory g+rw, but your mimeapps.list g-w. This has the advantage of only preventing edge from changing your defaults, even while it is running. It has the disadvantage of being a bit of a hack, honestly.
  2. Use something more advanced like apparmor or linux namespaces. This is probably the "right" way to do it.

edit:

Instead of chmod'ing mimeapps.list, you could xdg-settings set default-web-browser firefox.desktop. You would need to know when edge is changing your default (when edge starts up? when it closes?), and adjust the script accordingly. Something as simple as:

#!/bin/sh
/path/to/microsoft/edge #replace this
xdg-settings set default-web-browser firefox.desktop

might work. This has the advantage of not preventing any program (including edge!) from changing your defaults, but rather immediately changing the default back as soon as edge closes.

2
AutoModeratorMOD•

Hello u/aeiron, if you haven't done so already, [click here to search for your question.](https://www.reddit.com/r/SteamDeck/search/?q=Stop Edge from taking over default browser)

Useful resources: Servor's Enhanced FAQ | Servor's Enhanced FAQ Thread (with more answers in the comments!) | Our Wiki Guides Page.

If you find an answer, please leave a comment on this post with the answer for others!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1