Home

May. 20th, 2008

Ubuntu and Gmail

I was tired of not having mailto: links work correctly on my Ubuntu machine, so I did a bit of google-ing and found a very useful Perl one-liner here.

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'


Ubuntu (and possibly other Gnome) users, stick this in the Mail Reader custom command field of System -> Preferences -> Preferred Applications -> Internet.
Thanks to dcrooke at gmail dot com. It works like a charm.
mangavatar

November 2009

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Advertisement

Page Summary

Syndicate

RSS Atom
Powered by LiveJournal.com