If you’re like most people, your email client of choice is probably Gmail. But if you’re using Ubuntu, there’s a good chance that Gmail isn’t the default mail client. In this article, we’ll show you how to set Gmail as the default mail client in Ubuntu. First, open up the System Settings application in Ubuntu. In the System Settings application, click on Mail and Contacts. In the Mail and Contacts window, click on the Accounts tab. Under “Mail Accounts,” click on the down arrow next to “Gmail.” Click on “Set as Default Account.” If you want to use another email account other than Gmail as your default mail account, simply click on “Set Other Account As Default” and enter your email address into the “Default Email Address” field. ..


Just go to System \ Preferences \ Preferred Applications

Under Mail Reader, select Custom, and then put this into the Command window, changing “geek” to your username.

Next, you’ll need to save this shell script into your user directory ( /home/username ).

For the curious, here’s the contents of the script:

If you’d like to make the script open a new tab in an existing Firefox window, you can replace the firefox line in the script with the following:

firefox https://mail.google.com/mail?view=cm&tf=0&to=`echo $1 | sed ‘s/mailto://’`

Update: If you want to make the script file hidden by default, you can rename it with a . at the beginning of the file like this: .open_mailto.sh. You’ll have to change the path in the preferences, of course.

Open a terminal and type in the following command, to make the script executable:

Now it should be working.

To test it out… I clicked the contact link on my page… and it immediately opened in Gmail.

Note that if you aren’t logged into Gmail you’ll be prompted to login to gmail… and you’ll have to click the email link again. Seems like Gmail’s login redirector won’t open the send mail page. But then again… why aren’t you logged into Gmail?

Update: Changed to point to a script so that the mailto: tag would be removed. Thanks VERY much to Mr Linux for not just noticing, but giving me the working script.