• How to set the default browser?


    Today, I wanted to set my default browser. For some reason, all links that I click on in applications will be opened by chromium,although I have set qupzilla as default browser in the plasma5 system settings as well as in /etc/environment.
    env | cat browser still outputs chromium as default browser.
    Any Ideas how to change that? I really hate chromium and it’s only installed because a small number of websites I vistit don’t display correctly in qupzilla.
    J.

  • Hi,

    This is really painful as there are different places where you can specify your default apps.

    What do you get if you run this in a terminal?
    xdg-mime query default text/html

    And this one?
    grep html ~/.config/mimeapps.list

    And this one?
    env | grep BROWSER

    Which browser opens if you run this in a terminal?
    xdg-open https://www.google.com

    There are some other threads in this forum that might help:
    https://forum.antergos.com/topic/7734/google-chrome-default-browser
    https://forum.antergos.com/topic/7578/can-t-set-chromium-as-the-default-browser
    https://forum.antergos.com/topic/6512/set-default-application-browser

  • So, here are the outputs of the commands listed above:

    xdg-mime query default text/html
    vivaldi-stable.desktop

    grep html ~/.config/mimeapps.list generated no output

    env | grep BROWSER
    BROWSER=/usr/bin/chromium

    xdg-open https://www.google.com opens a qupzilla instance

    J.

  • @Jeannie____ said in How to set the default browser?:

    xdg-mime query default text/html
    vivaldi-stable.desktop

    do you have vivaldi installed ?

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3-wm#gnome-shell

  • Yes, vivaldi is installed too.
    J.

  • Seems that there is no solution, out of uninstalling chromium…
    Would be interesting what applications open links inside chromium, may it is setable inside this applications…

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3-wm#gnome-shell

  • So basically you are saying, that there is no way to set up a default browser at all and that various installed browsers set themselves as default in various places/configs in the system?
    J.

  • /etc/environment is modified by CNCHI and holds this:

    # >>> BEGIN ADDED BY CNCHI INSTALLER
    BROWSER=/usr/bin/chromium
    EDITOR=/usr/bin/nano
    # <<< END ADDED BY CNCHI INSTALLER
    

    /etc/profile the same …

    You can try to change there to qupzilla but as we see before this does not do the job…

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3-wm#gnome-shell

  • @Jeannie____ said in How to set the default browser?:

    So basically you are saying, that there is no way to set up a default browser at all and that various installed browsers set themselves as default in various places/configs in the system?

    No, I think it is due to the programs from which the link is opened out…

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    howto-install-antergos
    how to add system logs
    i3-wm#gnome-shell

  • Oh, also check /etc/profile

    So basically you are saying, that there is no way to set up a default browser at all

    A solution that works in all cases (all DE’s), no, afaik.

    and that various installed browsers set themselves as default in various places/configs in the system?

    More or less. And Cnchi also does some configuration, so it complicates things if you want to use something different than firefox or chromium.

    This needs a “standardization” for ages… each DE, each MIME system, each environment variable… I do not understand why they don’t agree in just one system and use it.

    xdg tried to do this… it works in XFCE, Gnome and Mate (afaik). But XFCE also uses exo (check exo-preferred-applications).

    Last time I checked, Plasma didn’t use xdg, but this might have changed.

    And it’s worse, because as @joekamprad says, each browser sets its own programs to open links.

    It’s odd you don’t have a mimeapps file ¿?

    I have these two:

    ~/.config/mimeapps.list
    ~/.local/share/applications/mimeapps.list
    

    Can you check that you have the mime-types and the shared-mime-info packages installed?

  • mime-types and shared-mime-info are installed, yes
    J.

  • Shit. That’s odd.

    Are you sure you don’t have these?

    ~/.config/mimeapps.list
    ~/.local/share/applications/mimeapps.list
    

    I say it’s odd because I only use i3 and I have those files…

    Anyway, you have to change your BROWSER env var to BROWSER=chromium.desktop

    You can set in /etc/profile or /etc/environment

    like this:

    export BROWSER=chromium.desktop
    

    And this should return your default browser:
    xdg-mime query default x-scheme-handler/http
    but you said it returns vivaldi, right? If you want chromium you have to change it, too.

    xdg-settings set default-web-browser chromium.desktop
    

    Hope this helps.

  • Hell, no, I neither want chromium nor vivaldi to be my default browser.
    I have changed /etc/profile and /etc/environment to BROWSER=/usr/bin/qupzilla.
    Still xdg-mime query default x-scheme-handler/http outputs this: vivaldi-stable.desktop.
    J.

  • Hi, sorry I got confused and thought that you wanted chromium.

    Does xdg-settings set default-web-browser qupzilla.desktop make any difference?

    Cheers!

  • Just ran sudo xdg-settings set default-web-browser qupzilla.desktop.

    Got this message back: xdg-settings: $BROWSER is set and can’t be changed with xdg-settings

    xdg-mime query default x-scheme-handler/http still shows vivaldi.desktop as output.

    Seems this whole system is fubar. This is by no means meant to blame the Antergos developers, it’s just my general opinion about default browsers in Linux systems.

    J.

  • @Jeannie____ said in How to set the default browser?:

    sudo

    You shouldn’t use sudo if you want to change the browser for the current user, not root.

  • Running
    xdg-settings set default-web-browser qupzilla.desktop without sudo
    followed by
    xdg-mime query default x-scheme-handler/http
    still shows vivaldi.desktop as output.
    J.

  • @Jeannie____ said in How to set the default browser?:

    vivaldi.desktop

    Geez. I do not understand why you can’t change it.
    What if you do this? (it’s trying to cheat, so xdg will think it’s running vivaldi instead of qupzilla)

    cp /usr/share/applications/qupzilla.desktop ~/.local/share/applications/vivaldi.desktop
    

    If you want to undo it, simply delete the local vivaldi file:

    rm ~/.local/share/applications/vivaldi.desktop
    
  • cp /usr/share/applications/qupzilla.desktop ~/.local/share/applications/vivaldi.desktop
    That seems to have done the trick, now
    xdg-mime query default x-scheme-handler/http
    outputs
    qupzilla.desktop
    Thanks a lot.
    J.

browser28 Posts 19Views 370
Log in to reply