Tuesday, February 3, 2009

Gmail and Ubuntu

You ever click on an "email me" link to find it starts up evolution?

Me too, it is dumb, everyone should use gmail.

Here is how to have it launch a new tab in Firefox that opens up gmail and fills out the To: line and the Subject: line (if there was one in the link).

Go to
System>Preferences>Preffered Applications

Change Mail Reader from Evolution to Custom
Paste the following in the text box below
perl -MURI::Escape -e '$to= shift; if ($to =~ /^([^\?]+)\?(.*)$/){$to=$1;$args="&".$2;$args=~s/\&subject=/&su=/};$to =~ s/^mailto://i; exec("firefox","https://mail.google.com/mail/?view=cm&fs=1&tf=1&cmid=22&to=".URI::Escape::uri_escape($to).$args);' '%s'
Hit close.
Fin (you don't even need to restart firefox to see if it works).
To check if it worked click here (don't actually send that e-mail)

No comments: