Score:0

How can I change which browser gets opened from Terminal?

in flag

I've already seen this old question from 2011: How do I change the browser that gnome terminal opens links with?

and also How can I manually change the default web browser?

And I've already set my default browser to Chrome. To prove it, I run xdg-settings get default-web-browser and see the result google-chrome.desktop.

If I click URLs from emails or documents or even within the Terminal's output, they properly open in Chrome.

But running commands in terminal (such as to run a local webserver of a React app) continues to open my Brave browser, which I don't want.

How can I fix this?

Bovine avatar
ru flag
You might [edit](https://askubuntu.com/posts/1386383/edit) your question to include the terminal command(s) that you are running.
cn flag
see the .env file in each react app file. It will have a BROWSER= tag or if not you can add it.
vanadium avatar
cn flag
Perhaps `sudo update-alternatives --config x-www-browser` will cope with this.
Ryan avatar
in flag
@Rinzwind Thanks for the suggestion. Unfortunately it didn't help.
Ryan avatar
in flag
@vanadium Thanks. That looked promising, especially since it showed "auto mode" as selected, which was `/usr/bin/brave-browser-stable`. I changed it to `/usr/bin/google-chrome-stable` but unfortunately it still opened Brave.
vanadium avatar
cn flag
Can you specify more precisely when it goes wrong? With which commands does it go wrong?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.