Open mailto links in Firefox and / or GNOME in GMail

Since I exclusively use mail on GMail and I don’t need a standard Ubunt Evolution, I decided to configure my system so that all mailto links open in GMail.

So do it in 2 steps. First, translate Ubuntu and then Firefox.

Do it once :
1) Open in Ubuntu: System \ Preferences \ Preferred Applications
2) Select in Mail Reader - Custom and enter:
3) Create a file:
and enter it there:
4) Give rights
Do two :
1) Open Gmail in Firefox
2) In the address bar of the tab in which GMail is open, enter

javascript:window.navigator.registerProtocolHandler("mailto","https://mail.google.com/mail/?extsrc=mailto&url=%s","GMail")

3) We agree that we want to add Gmail
4) Now we click on the mailto link and Firefox will ask you how to open it. Select Gmail, check the box “Remember my decision”
That's all. Now your Ubuntu and Firefox uses Gmail by default.

Sources:
http://www.howtogeek.com
http://lifehacker.com