16 May 2006

Making Firefox and Sylpheed play nicely together

Just a reminder; this has been covered extensively elsewhere on the web. In order to let Sylpheed Claws and Mozilla Firefox play nicely together, you need to fiddle a bit with some settings here and there. (Doing this for regular Sylpheed is very similar and left as an exercise.)

First create two scripts, say inside the subdirectory of your home directory called bin; call one mailto.sh:

#!/bin/sh
# mailto.sh
exec sylpheed-claws --compose "$1"

and the other firefox-open.sh:

#!/bin/sh
# firefox-open.sh
if firefox -remote 'ping()' 2> /dev/null ; then
exec firefox -remote "openurl($1, new-tab)"
else
exec firefox "$1"
fi

Then make both executable (with chmod a+x ~/bin/*.sh). Now in Sylpheed Claws, select Configuration, Preferences, External Programs. Put /home/epostma/bin/firefox-open.sh "%s" into the Web browser field. (Change /home/epostma into your home directory.) Then in firefox, visit the URL about:config. On the line that says Filter, input network.protocol-handler. You should have about a screenful of settings now. Check that network.protocol-handler.external.mailto is set to true (if not, double click). Now check if there is a setting called network.protocol-handler.app.mailto: if no, right-click and select New - String and create it. Then set it to the value /home/epostma/bin/mailto.sh (again, substitute your home directory for /home/epostma).

Now clicking on a mailto:-link in Firefox should open Sylpheed and clicking on a URL in Sylpheed should open Firefox (a new tab if it was already open and a new window otherwise).

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home