Using Chrome or Chromium for Mailto Links in Ubuntu

I’ve just switched over to using Chromium as my default browser in Ubuntu. Why? Because why not? Also, my profile in Chrome was mysteriously devoured by an evil act of faulty Internet provision, forcing me to have to rebuild my profile (my saved passwords, most visited sites, etc – thankfully Chrome/Chromium will sync your favorites! That’s amazing! Anyways…). So, what better time to switch to Chromium? But then I had to make Chromium handle my mailto links as well.

Long ago, this helped me set gmail as the default, but in Firefox. When I switched to Chrome, I edited the script given there to use Chrome. And now, I’ve edited it to use Chromium. Here’s what you do…

1. Save one of the following scripts as a file somewhere that makes good sense. Mine is at ~/

Using Chromium:


chromium-browser "`echo $1 | sed 's/mailto://'`"

Using Chrome:


/opt/google/chrome/google-chrome "`echo $1 | sed 's/mailto://'`"

2. Open up System -> Preferences -> Preferred Applications. In the Internet tab, set the Mail Reader to ‘Custom’ and put the pathname of the script in the command slot, followed by ‘%s’. For example, mine readsĀ /home/zach/ %s.

3. Click on all the mailto links you can find. Like this one: My apologies if that’s a real address that I just told everybody to spam.


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s