36

I just installed 12.04 and when clicking mailto: links Thunderbird opens.

I want Gmail to open in the browser, in which mailto: was clicked.

  • So if I am in Firefox and click a mailto: link a new FF tab should with Gmail should open.
  • And if I am in Chrome, a new Chrome tab should open accordingly.

Is there a way to do this via some script? Or would I need to set this in some system settings?

4 Answers 4

49

You can make Chrome open when you click a mailto: link:

Access Gmail, and click an icon of the shape of overlapped double diamonds, next to the star icon in the omni-box where the URL is displayed.

https://i.stack.imgur.com/Vt7wJ.png

If you don't see it, try reloading the page.

Source, by mulogics on Web Applications Stack Exchange

If you somehow missed the opportunity and said 'no' after the diamond question, your chance to undo that is under chrome://settings/handlers, where gmail will be listed as handler-question-blocked.

4
  • 1
    If the diamonds don't appear there is also this option: developers.google.com/web/updates/2012/02/…
    – nedned
    May 24, 2017 at 7:29
  • @nedned I seem to have broken my configuration trying to test that. I unset the handler in Chrome and followed the instructions, but when the popup appeared, I accidentally closed it. Now I've tried everything but I can't get it back.
    – wjandrea
    Jun 6, 2017 at 21:17
  • 2
    @nedned I was just digging through my Chrome settings when I noticed Gmail was blocked from becoming an email handler. (In Settings -> Content settings -> Handlers.) Not sure how exactly that happened, but I got it working now!
    – wjandrea
    Oct 18, 2018 at 1:01
  • after removing from the blocked list. Refresh your Gmail, it again asks this time click 'Allow'.
    – itsoft3g
    Dec 11, 2019 at 11:14
29

There is an option for that in firefox.

Edit -> Preferences -> Applications -> mailto

or

Firefox menu -> Options -> Options -> Applications -> mailto

Firefox Options Page

2
  • 2
    This should be marked as the "accepted answer" assuming that OP is using the currently default Firefox browser with Ubuntu.
    – Petrus K.
    Apr 22, 2015 at 12:20
  • 1
    we should merge this answer with the answer above, both are useful.
    – Jared Chu
    Aug 25, 2017 at 9:11
15

gnome-gmail lets you do exactly that.

This is what reads from the Description section in the control file of gnome-gmail package.

support for Gmail as the preferred email application in GNOME

To install gnome-gmail, run this command:

sudo apt-get install gnome-gmail

After installing, open gnome-gmail and adjust your settings.

However, if and when you click on the mailto: links, it will open a Gmail tab in the preferred browser instead of whichever browser you are currently in.

1
  • I'm getting an error: Access blocked: Viagee's request is invalid. Error: 400: invalid_request
    – isaaclw
    Oct 25, 2022 at 19:56
2

As of Ubuntu 14.04, these instructions did the job under Chrome:

  1. Open your Gmail account
  2. Open the Javascript console. (ctrl-shift-J)
  3. In the Javascript console, enter:

    navigator.registerProtocolHandler(
        "mailto",
        "https://mail.google.com/mail/?extsrc=mailto&url=%s",
        "Gmail");
    
  4. Press Enter, and you should get the confirmation popup to approve.

This needs to be repeated for each browser profile you have.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .