Every Geek uses Gmail… it’s pretty much required. And now you can set Gmail as the default client in Ubuntu without any extra software. (Windows requires the Gmail notifier be installed).
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.
/home/geek/open_mailto.sh %s
Next, you’ll need to save this shell script into your user directory ( /home/username ).[Download]
For the curious, here’s the contents of the script:
#!/bin/shfirefox https://mail.google.com/mail?view=cm&tf=0&to=`echo $1 | sed ’s/mailto://’`
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 -remote “openurl(http://blockedsiteaccess.com/browse.php?u=czovL21haWwuZ29vZ2xlLmNvbS9tYWlsP3ZpZXc9Y20mYW1wO3RmPTAmYW1wO3RvPWBlY2hvICQxIHwgc2VkQBlzL21haWx0bzovTxlgLG5ldy10YWI%3D&b=5)”
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:
chmod u+x ~/open_mailto.sh
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.
i followed your tutorial but get Failed to execute default Mail Reader.input/output error. Thing is I use Chromium and replaced Firefox in the script.. Not sure thats enough tho.. Changed Web browser to Chromium in preferred apps yet Chromium popup asks if I want it as preffered. I click yes then in settings defaults to none.. if it makes sense..
Didnt work with either Chromium or Firefox as preferred web app but installed Gnome-gmail app and directed preferred mail app to user/bin/gnome-gmail and it works now.
Gnome-gmail
http://sourceforge.net/projects/gnome-gmail/files/latest/download?source=files
I like this software and it was great to access any blocked sites but now our school not allow us to install any software at school but after getting know about one great link where i can just click and access any blocked site check this it is very useful when you are in school or college. for example if you want to access Myspace at school then check this. UnblockProxy