Google Apps as Default Email Client in Ubuntu


I have a vanilla install of Ubuntu Hardy Heron. In Firefox, when I click someone’s email that uses the mailto link, it opens up the Evolution email client. This is the suck if you don’t use a desktop email client which more and more smart people are doing these days.

I use an email with my own domain, hosted on Google Apps for all my email needs. With a little inspiration from this page, I got Google Apps to be the default email client instead. Here’s how…

– Fire up your favorite text editor
– Copy and paste the following code:


firefox "`echo $1 | sed 's/mailto://'`"

Replace “” with your hosted Google Apps domain

– Save the file with the “.sh” extension (example: “”)
– Use a terminal to make the file executable with the following command:

$ chmod u+x path_to_file

The path_to_file is the location of the script. (example: “~/”)

– In Firefox, go to Edit > Preferences > Applications > mailto > Use other…
– Browse to and select the file you just created earlier

Woohoo! Now when you click a mailto link, it should compose a new email in the browser using Google Apps. Test it out by emailing me if it worked

Thanks to this comment, there’s a more elegant way to do this.

  1. In Firefox’s address bar, copy and paste the following and hit enter:
  2. Click “I’ll be careful, I promise!” when the warning appears
  3. In the “Filter:” field, copy and paste:
  4. Double click the found result to change the boolean value from false to true
  5. In the address bar, copy and paste the following:
    javascript:window.navigator.registerProtocolHandler("mailto","","Google Apps")
  6. Replace “” with your own Google Apps hosted domain and hit enter
  7. Click “Add Application” when it asks you a question
  8. go to Edit > Preferences > Applications > mailto
  9. Choose “Use Google Apps”

That’s it! Test it out by clicking my email,

I wish Firefox had it as a default option instead of the craptastic Yahoo! Mail.


3 Responses to “Google Apps as Default Email Client in Ubuntu”

  1. 1 Daniel May 14, 2008 at 12:39 am

    You can do that, and I had in my home directory for a couple of versions, but once GMail got IMAP, there was no need. Set Evolution up to use your Gmail account by default. While you’re at it, add your Google Calendar and use Conduit to sync the contacts.

    Suddenly, you’ve got your calendar and reminders in your clock applet and you don’t need a script (or FF running) to shoot off an e-mail.

  2. 2 Anonymouns May 14, 2008 at 3:06 am

    Firefox3 can now directly open mailto links in gmail.Try this to use gmail directly using firefox 3.

  1. 1 Trackback on May 20, 2008 at 4:58 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s



%d bloggers like this: