Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Desktop]Cannot make Brave the default browser on Linux #1274

Closed
btlechowski opened this issue Sep 25, 2018 · 33 comments · Fixed by brave/brave-core#911
Closed

[Desktop]Cannot make Brave the default browser on Linux #1274

btlechowski opened this issue Sep 25, 2018 · 33 comments · Fixed by brave/brave-core#911

Comments

@btlechowski
Copy link

btlechowski commented Sep 25, 2018

Steps to Reproduce

  1. Go to chrome://settings/
  2. Scroll to Default browser
  3. Click Make default
  4. Open a file explorer and open a html file

Actual result:

Nothing happens.
The browser is not made default
File is not opened

Expected result:

The Make default disappears (like on other platforms)
image

Brave is made the default browser
File is opened

Reproduces how often:

always

Brave version (chrome://version info)

Brave 0.55.6 Chromium: 70.0.3538.16 (Official Build) dev(64-bit)
Revision 16ed95b41bb05e565b11fb66ac33c660b721f778-refs/branch-heads/3538@{#306}
OS Linux

Tested on Ubuntu 17.10

Reproducible on current release:

Brave 0.55.6 Chromium: 70.0.3538.16 (Official Build) dev(64-bit)
Revision 16ed95b41bb05e565b11fb66ac33c660b721f778-refs/branch-heads/3538@{#306}
OS Linux

cc @srirambv @kjozwiak @LaurenWags @GeetaSarvadnya

@capouch
Copy link

capouch commented Sep 26, 2018

This problem is also on Slackware-current.

@srirambv srirambv added this to the 1.0 milestone Sep 26, 2018
@bbondy bbondy modified the milestones: 1.0 (0.56.x), 1.x Backlog Sep 29, 2018
@rebron rebron added the priority/P4 Planned work. We expect to get to it "soon". label Oct 5, 2018
@srirambv
Copy link
Contributor

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Dec 29, 2018

Verification passed on

Brave 0.59.13 Chromium: 72.0.3626.28 (Official Build) beta (64-bit)
Revision 997b1040b63bac324e815797ba52be0cd8f616ed-refs/branch-heads/3626@{#461}
OS Linux
  • Verified the STR from description, able to set Brave as default browser.
    image

@IdlePhysicist
Copy link

Has this fix been released in the stable build yet? I'm experiencing this on

  • ArchLabs 2019.20
  • Brave Version 0.65.121 Chromium: 75.0.3770.100 (Official Build) unknown (64-bit)

I'm assuming that is has been fully merged & released based on this issue being closed, indicating the matter was resolved. But after adjusting each setting I can find to make Brave the default, Brave continually asks me on launch to set it to default.

@ryanmusante
Copy link

I am having this issue also. How do permanently set default?

@davemint
Copy link

davemint commented Jul 1, 2019

Still an issue for me too.

Version 0.65.114 Chromium: 75.0.3770.38 (Official Build) unknown (64-bit)

@kjozwiak
Copy link
Member

This has been merged/fixed a while ago and released in 0.59.x. The current release is on 0.66.99 so it's been a while. Definitely possible that this might have regressed on certain distro's.

@ryanmusante & @davemint which distro's are you two using?

@davemint
Copy link

This has been merged/fixed a while ago and released in 0.59.x. The current release is on 0.66.99 so it's been a while. Definitely possible that this might have regressed on certain distro's.

@ryanmusante & @davemint which distro's are you two using?

Manjaro 18.0.4

@ryanmusante
Copy link

ryanmusante commented Jul 10, 2019

Manjaro 18 (testing branch)
Brave-beta 0.66.90-1 from repository

@salif
Copy link

salif commented Jul 19, 2019

Same issue. Version 0.66.100 Chromium: 75.0.3770.142 (Official Build) Arch Linux (64-bit)

@anoop-ananthan
Copy link

Same issue here 😞

@srirambv
Copy link
Contributor

srirambv commented Aug 8, 2019

This works fine on Ubuntu. Making it default in settings sets it as system default browser. Issue could be specific to Arch Linux as we don't have an official package there. @cg505 I believe you run Arch Linux as well. Could you double-check this and log a new issue for it and mark it as Arch specific?

@cg505
Copy link

cg505 commented Aug 8, 2019

This is definitely broken on Arch. I'll see if I can take a look.

@cg505
Copy link

cg505 commented Aug 8, 2019

This is caused by a packaging error on the Arch side of things. I'll let the maintainers know.

@kjozwiak
Copy link
Member

@cg505 thanks for looking into it! Once you have more information, mind updating this issue or maybe creating another one where we can follow progress?

@cg505
Copy link

cg505 commented Aug 12, 2019

@kjozwiak This should be fixed in the unofficial Arch User Repository packages (https://aur.archlinux.org/cgit/aur.git/commit/?h=brave-bin&id=571d9fb9fde822cdbcc79eb118cb772455ca62ae for brave-bin and https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=brave&id=e63f13ba4e458f3f55a14e443c9591a7b7305521 / maximbaz/pkgbuilds#7 for brave). Majaro and other Arch-based repos should be using these packages as well.

@corecontingency
Copy link

corecontingency commented Sep 3, 2019

@cg505 Still seems to be broken for me. Brave is set as the default browser, but Brave still asks me to set it as default every time I open it. Pressing on the Make Default button in Brave does nothing. Using Arch with KDE and wayland, but still broken if I use a X11 session. Using brave-bin package from AUR.

I don't have any custom desktop files for brave in ~/.local/share/applications/.

Picture is attached.

Should I make a new issue for this? Thanks.

@cg505
Copy link

cg505 commented Sep 3, 2019

@corecontingency What is the output of these two commands?

pacman -Qi brave-bin
ls -l /usr/share/applications | grep brave

Also, what version does brave report in brave://version?

@corecontingency
Copy link

corecontingency commented Sep 3, 2019

@cg505

pacman -Qi brave-bin

Name            : brave-bin
Version         : 0.68.132-1
Description     : Web browser that blocks ads and trackers by default (binary release).
Architecture    : x86_64
URL             : https://brave.com/download
Licenses        : custom
Groups          : None
Provides        : brave  brave-browser
Depends On      : gtk3  nss  alsa-lib  libxss  ttf-font
Optional Deps   : cups: Printer support [installed]
                  pepper-flash: Adobe Flash support
                  libgnome-keyring: Enable GNOME keyring support
Required By     : None
Optional For    : None
Conflicts With  : brave
Replaces        : None
Installed Size  : 228.24 MiB
Packager        : Unknown Packager
Build Date      : Mon 02 Sep 2019 11:53:41 PM MST
Install Date    : Mon 02 Sep 2019 11:55:28 PM MST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

This is the normal AUR package. I installed it using yay, but has the same problem even if using makepkg -si.

ls -l /usr/share/applications | grep brave

-rw-r--r-- 1 root root 4972 Sep 2 23:53 brave-browser.desktop

Also, what version does brave report in brave://version?

Brave | 0.68.132 Chromium: 76.0.3809.132 (Official Build) unknown (64-bit)
-- | --
Revision | fd1acc410994a7a68ac25bc77513d443f3130860-refs/branch-heads/3809@{#1035}

Is there any setting to make it stop asking to be the default browser outright, like Firefox has? I looked in the settings, but couldn't find anything. Is there an about:config (equivalent) setting that I can flip?

@cg505
Copy link

cg505 commented Sep 3, 2019

@corecontingency Do you have xdg-utils installed? You can check by running pacman -Q xdg-utils

@corecontingency
Copy link

corecontingency commented Sep 3, 2019

@cg505

pacman -Q xdg-utils

xdg-utils 1.1.3+18+g0547886-1

Yes. Would it help if I uninstalled, and then reinstalled xdg-utils, using pacman -Rns to wipe config files? Are there any config files in the $HOME directory I would need to manually remove too?

EDIT: That fixed it... somehow. I still am not sure what caused the problem in the first place. Very weird.

@cg505
Copy link

cg505 commented Sep 8, 2019

That's definitely a bit weird. The notable file would have been ~/.config/mimeapps.list. Regardless, glad you got it resolved.

@arnholm
Copy link

arnholm commented Jun 18, 2020

I have this problem under Kubuntu 18.04, Brave is set as default browser in KDE and in Brave settings, but when Brave is started, it claims Brave is not default and ask me to press a button to make it default, but nothing ever happens.

Brave 1.10.93 Chromium: 83.0.4103.106 (Official Build) (64-bit)
Revision ce7134bb3d95141cd18f1e65772a4247f282d950-refs/branch-heads/4103@{#694}
OS Linux

@fmarier
Copy link
Member

fmarier commented Sep 11, 2020

For Arch users, we are aware of the issue and are tracking it separately here: #2377

@arnholm For Ubuntu, here are a few things you could check to make sure that Brave is set as default correctly: https://feeding.cloud.geek.nz/posts/set-default-web-browser-debian-ubuntu/

@arnholm
Copy link

arnholm commented Sep 12, 2020

@fmarier thank you for the Ubuntu tip. I followed all of those steps, but Brave still claims it isn't the default browser. Most things seem to work fine, the Brave browser does start as expected, but I still get the "Brave isn't your default browser". Pressing "Set as default" has no effect.

I am now on Brave Version 1.13.86 Chromium: 85.0.4183.102 (Official Build) (64-bit)
Kubuntu 18.04

@verndog
Copy link

verndog commented Sep 13, 2020

I used all the above answers to no avail. An obscure comment somewhere suggested using this:
xdg-mime default brave-browser-nightly.desktop x-scheme-handler/https x-scheme-handler/http
It worked for me every time!
(change "nightly" to what brave your using)

@srirambv srirambv changed the title Cannot make Brave the default browser on Linux [Desktop]Cannot make Brave the default browser on Linux Sep 14, 2020
@chyandour5
Copy link

chyandour5 commented Oct 5, 2020

This may be a possible fix for some, it worked for me. https://discuss.getsol.us/d/5550-default-web-browser

@fmarier
Copy link
Member

fmarier commented Oct 5, 2020

This may be a possible fix for some, it worked for me. https://discuss.getsol.us/d/5550-default-web-browser

Thanks for the link @chyandour5 . That particular problem seems specific to the unofficial Solus packages.

@cept73
Copy link

cept73 commented Oct 31, 2020

Same issue on Ubuntu 20.04.1 LTC.

Brave was installed via snap.
If I delete second browser - Firefox, Brave became default browser, but every time on start asks to set Brave as default.
I didn't found where to disable this check (to devs: need to return this option).
If I've installed FF again, FF became default automatically.

sudo update-alternatives --config gnome-www-browser
gives: no alternatives for gnome-www-browser

For me helps installing Firefox via snap (not via apt as before)
snap install firefox
then Brave still default after install, but still asks to set default every run (at least might be ability to turn this behaviour off)

@fmarier
Copy link
Member

fmarier commented Oct 31, 2020

@cept73 Could you please open a new issue for this. It seems to be snap-specific (I use our official packages on 20.04 without problems) and so we should track that issue separately from this one.

@oviniciusfeitosa
Copy link

If are you using Brave Nightly follow these steps:

xdg-mime default brave-browser-nightly.desktop x-scheme-handler/https
xdg-mime default brave-browser-nightly.desktop x-scheme-handler/http
xdg-settings set default-web-browser brave-browser-nightly.desktop

Hope it helps 👍

https://vinnyfs89.gitbook.io/knowledge/technology/browser/chrome-or-brave/known-issues#set-brave-nightly-as-default-browser-using-linux

@AndreTrinLove
Copy link

(SOLVED)
I just went on:
Settings - Default apps.. - Web - brave.

Screenshot from 2022-01-23 08-44-42

..(PS)..
My linux is Zorin 16 OS (ubuntu)
I'm new here and it is my first time trying to help.
So, i'm sorry for any mistakes or obvious noob moves, in advance.

@DoughMucker
Copy link

DoughMucker commented Jan 3, 2023

Had the same issue in Lubuntu 22.04. Here's what, counterintuitively, fixed it for me...

Firefox was still my default though I had uninstalled it...

$ xdg-settings get default-web-browser
firefox.desktop

Tried changing it to Brave with no luck....

$ xdg-settings set default-web-browser brave-browser.desktop
xdg-settings: $BROWSER is set and can't be changed with xdg-settings

So I tried setting firefox again as the default...

$ xdg-settings set default-web-browser firefox.desktop
xdg-settings: $BROWSER is set and can't be changed with xdg-settings

And it worked...

$ xdg-settings get default-web-browser
brave-browser.desktop

Go figure. I can't guarantee it was exclusively that as I had also been messing around with mimetypes and xdg-open (below), but that was the last thing I tried before Brave stopped asking me to set it as the default browser.

$ xdg-open "http://google.com"
Opening in existing browser session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.