How to open mailto: with gmail in chrome

19 Jun 2010

I use Gmail as my main e-mail client so I grew rather tired of having Thunderbird (or Evolution Mail) open every time I press a mailto-tag in Chrome on my Ubuntu (10.04 LTS) machine. This is how you get Gmail instead of your standard email client.
First you need to open a terminal and write

$	gnome-default-applications-properties

In the newly opened window set the email command to

gnome-open https://mail.google.com/mail/?extsrc=mailto&url=%s

Do not forget to set Chrome as your default browser.

You can get the email to be automatically filled out by for you if you change the email command in gnome-default-applications-properties to

$		sh /home/user/gmailinchrome.sh %s

(where “user” should be replaced by your username). Then you have to put a shell-script in your /home folder. This is done by creating a file named gmailinchrome.sh in your home folder and copying the following text into the file.


#!/bin/sh
/opt/google/chrome/google-chrome 
“https://mail.google.com/mail?view=cm&tf=0&to=`echo $1 | sed ‘s/mailto://’`”

blog comments powered by Disqus