📜 ⬆️ ⬇️

Open mailto links in Firefox and / or GNOME in GMail

Since I use only mail on GMail and the standard Ubunt Evolution I have nothing to do, I decided to set up my system so that all the mailto links would open in GMail.

So this is done in 2 stages. At the beginning we will translate Ubuntu and then Firefox.

Do it once :

1) Open in Ubuntu: System \ Preferences \ Preferred Applications
')
image

2) Select Mail Reader - Custom and enter:

~/.config/open_mailto.sh %s

3) Create a file:

nano ~/.config/open_mailto.sh

and enter there:

#!/bin/sh
firefox mail.google.com/mail?view=cm&tf=0&to=`echo $1 | sed 's/mailto://'`


4) We give rights

chmod u+x ~/.config/open_mailto.sh

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) Agree that we want to add Gmail

image

4) Now click on the mailto link and Firefox will ask you how to open it. Choose Gmail, tick “Remember my solution”

image

That's all. Now your Ubuntu and Firefox uses Gmail by default.

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

Source: https://habr.com/ru/post/46424/


All Articles