I am running GNOME 3 and am trying to write a script in a desktop file that redirects mailto links to Yahoo! webmail.
Stuff like these pages helped me a bit, but I still cannot get a working script.
My goal is to get something like "mailto:Dan Hoang <ntg255@gmail.com>"
to become "mailto:ntg255@gmail.com"
and pass it on to Epiphany.
Script so far:
Exec=env qs='echo $1 | sed 's/mailto:/To=/' | sed -e 's/\(To==1&\).*\( *@=2&\)/\1\2/' | sed 's/\?subject=/\&Subject=/'' epiphany %U --new-tab http://compose.mail.yahoo.com/?$qs”
Notes:
Script works for mailto links with only e-mail addresses without the sed -e 's/\(To==1&\).*\( *@=2&\)/\1\2/'
part. This part was my attempt at removing the name.
Also, the %U attached to epiphany serves no purpose; it is only there to allow it to be set as a default application.