• Set default application ( browser )


    Sorry if this is mentioned before, but I tried every solution I found and nothing works.

    So, my issue is that links in apps ( for example slack or Atom ) they all open with Chromium.
    What I want is to open with my default browser, vivaldi.
    What I’ve tried :

    • set it as default browser in the xfce4 settings manager ( the “preferred applciations” section )
    • set $BROWSER to vivaldi-stable ( from .zshrc and .bashrc )
    • remove the extra lines in /etc/profile ( made by cnchi )
    • make a vivaldi.desktop file in ~/.local/share/applications/vivaldi.desktop
    • point to that .desktop from ~/.config/mimeapps.list like this:
    x-scheme-handler/http=vivaldi.desktop
    x-scheme-handler/https=vivaldi.desktop
    
    • run xdg-mime default vivaldi.desktop x-scheme-handler/http ( and the https equivalent )

    nothing works. I logged in an out etc. Anything I do, damn chromium is always launched.
    Any suggestions?
    ( also what’s the deal with those .desktop files? so confusing to set up )

  • @antouank
    Hi!
    There was a similiar post from @Jeannie____ some months ago, she had problems with Thunderbird opening links with Chromium too, maybe she can help you with. :P

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • The only thing that helped for me was to completely deinstall that damned invasive Chromium thing.
    J.

  • @Jeannie____ Wow. Is it so hard to set the default application for something so basic as opening http links? Why is that?

  • Hi!

    Check /etc/profile

    Cheers!

  • @karasu said in Set default application ( browser ):

    Hi!

    Check /etc/profile

    Cheers!

    Thanks for the suggestion.
    If you read my original post, you’ll see that I already did that.

    remove the extra lines in /etc/profile ( made by cnchi )

  • @antouank

    Sorry, I didn’t see that line.

    Are you sure xdg-settings get default-web-browser returns the correct value?

  • @karasu said in Set default application ( browser ):

    @antouank

    Sorry, I didn’t see that line.

    Are you sure xdg-settings get default-web-browser returns the correct value?

    $ xdg-settings get default-web-browser
    vivaldi-stable.desktop
    
  • Hi,

    Then, I’m afraid I have no clue what’s wrong.

    And you have that file on /usr/share/applications?

    xdg-open http://www.google.com opens vivaldi?

  • @karasu said in Set default application ( browser ):

    And you have that file on /usr/share/applications?

    11:06:02 [email protected] ~ ls  /usr/share/applications | grep vivaldi
    -rw-r--r--   1 root 4.6K Mar 28 15:28 vivaldi-stable.desktop
    

    xdg-open http://www.google.com opens vivaldi?

    it does!
    But from apps, like slack, links open to Chromium.

  • Geez…

    Can you post your full ~/.config/mimeapps.list file? (if it’s too long, use paste2.org (or any other service) and post the link here).

  • @karasu I know.

    [Added Associations]
    application/zip=org.gnome.FileRoller.desktop;
    application/text=gedit.desktop;
    image/png=ristretto.desktop;gimp.desktop;wine-extension-png.desktop;
    image/jpeg=ristretto.desktop;gimp.desktop;wine-extension-jfif.desktop;
    application/vnd.oasis.opendocument.text=libreoffice-writer.desktop;
    application/x-tar=org.gnome.FileRoller.desktop;
    video/x-matroska=vlc.desktop;parole.desktop;
    audio/x-mpegurl=parole.desktop;
    application/pdf=evince.desktop;wine-extension-pdf.desktop;
    text/x-nfo=gedit.desktop;
    text/plain=gedit.desktop;
    application/x-subrip=wine-extension-txt.desktop;
    text/html=wine-extension-htm.desktop;
    video/mp4=org.xfce.Parole.desktop;
    application/x-ms-dos-executable=wine.desktop;
    application/x-shellscript=atom.desktop;gedit.desktop;
    image/svg+xml=gimp.desktop;
    
    [Default Applications]
    image/jpeg=ristretto.desktop
    x-scheme-handler/http=vivaldi.desktop
    x-scheme-handler/https=vivaldi.desktop
    

    also, I wanted to get rid of that wine crap. But opening links is the important problem.

  • It’s a longshot, but I’d add in [Added Associations] something like this:

    application/x-extension-htm=vivaldi-stable.desktop;
    application/x-extension-html=vivaldi-stable.desktop;
    x-scheme-handler/chrome=vivaldi-stable.desktop;
    x-scheme-handler/http=vivaldi-stable.desktop;
    x-scheme-handler/https=vivaldi-stable.desktop;
    

    Change the text/html one (wine) to this:

    text/html=vivaldi-stable.desktop;
    

    And in [Default Applications] add/modify these ones:

    application/x-extension-htm=vivaldi-stable.desktop
    application/x-extension-html=vivaldi-stable.desktop;
    text/html=vivaldi-stable.desktop;
    x-scheme-handler/chrome=vivaldi-stable.desktop;
    x-scheme-handler/http=vivaldi-stable.desktop;
    x-scheme-handler/https=vivaldi-stable.desktop;
    

    I think that the ending semicolon is not mandatory if only one value is entered. But I’m not sure…

  • @karasu and then? Do I have to reboot?

  • @karasu Let me take the oportunity and avoid creating a new post:
    I have problems opening magnet links, this always open a Chromium browser and not transmission. Yesterday i added x-scheme-handler/magnet=transmission-gtk.desktop to .config/mimeapps.list both [Added Associations] and [Default Applications] but it didn’t work.
    So for now the only workaround is to copy the link and directly paste inside Transmission. Since Transmission comes installed on Antergos it could come out of the box. Any idea how can i fix it?

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • I assume it’s still not working, right? (you only have to log off and on and try again)

    If it does not work, try another thing:

    Check that this line is in your vivaldi-stable.desktop file:

    MimeType=text/html;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
    

    Then, run sudo update-desktop-database

    @fernandomaroto what’s the output of:

    xdg-mime query default handler/magnet

  • @karasu said in Set default application ( browser ):

    xdg-mime query default handler/magnet

    pc-fernando% xdg-mime query default handler/magnet
    transmission-gtk.desktop

    Here is the prompt message, when i agree to open with xdg-open it opens an empty Chromium tab
    http://prnt.sc/ew38ug

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto

    check that /usr/share/applications/transmission-gtk.desktop contains these lines (among others and in any order):

    Exec=transmission-gtk %U
    MimeType=application/x-bittorrent;x-scheme-handler/magnet;
    

    Note the %U in the Exec line. It’s absolutely necessary. The MimeType line should look as above.

    Running these commands maybe helps:

    xdg-mime default transmission-gtk.desktop application/x-bittorrent
    xdg-mime default transmission-gtk.desktop x-scheme-handler/magnet
    

    Oh, and maybe installing perl-file-mimeinfo helps. Yes, I’m shooting blindly here.

    Cheers!

  • @karasu said in Set default application ( browser ):

    check that /usr/share/applications/transmission-gtk.desktop contains these lines (among others and in any order):

    Exec=transmission-gtk %U
    MimeType=application/x-bittorrent;x-scheme-handler/magnet;
    

    Note the %U in the Exec line. It’s absolutely necessary. The MimeType line should look as above.

    Running these commands maybe helps:

    xdg-mime default transmission-gtk.desktop application/x-bittorrent
    xdg-mime default transmission-gtk.desktop x-scheme-handler/magnet
    

    I checked those files, commands yesterday, they are all fine, the commands made no difference

    Oh, and maybe installing perl-file-mimeinfo helps. Yes, I’m shooting blindly here.

    Didn’t work…

    If you are shoting blindly imagine what i did yesterday hehehe. Don’t worry, for now i’ll leave it that way. Keep on trying to help @antouank. I just thought you could had give more ideas, and i don’t want to make his post go offtopic because of me.
    Anyway thanks for your help and time.

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @karasu, checked what you said. Still nothing.
    I’m starting to think that maybe because Slack and Atom are Electron apps, they default to Chromium? Is that possible?
    Any other app with links I can try?

    xdg-open in the terminal uses vivaldi, so that’s something.
    But I use slack everyday for work, that’s why I wanted to solve that one.

    Thanks for all the help anyway.

application19 browser26 Posts 21Views 1370
Log in to reply