« Creating Xbox ISOs in Linux |
Drupal SEO »
Set Gmail as the Default Mail Client in Linux
I use Gmail as my primary e-mail and wanted to be able to use it as my default client for my operating system.
We will be creating a script that, when activated, will call up Firefox and send us to the composition section of Gmail. Then we will set this script up as the default e-mail client and send the target e-mail address to it. So, first we will put together a simple script and name it gmailto.sh. Here is what it should be comprised of:
#! /bin/sh
firefox "https://mail.google.com/mail?view=cm&tf=0&to=
`echo $1 | sed 's/mailto://'`"
I placed this script in my /home/user/bin folder as I do all of my personal scripts and then made it executable with:
[user@localhost bin]$ chmod u+x gmailto.sh
Now all we have to do is specify this script as our default mail handler. In Fedora, using Gnome, this menu is listed under System>Preferences>More Preferences>Preferred Applications.

It is important to place the %s after calling the script in the Preferred Applications window so that it places the target address into your new message.
Topics: Linux
Share: del.icio.us | digg | reddit
No comments yet.