[sylpheed:35123] Re: problems clicking on links since firefox upgrade?

Craig McCluskey craigm at lanl.gov
Fri Feb 24 00:21:30 JST 2012


On Thu, 23 Feb 2012 14:04:55 +0100 Frantz de Germain
<Frantz.de-Germain at info.univ-angers.fr> wrote:

> Hello,
> 
> I've a problem since I've upgraded from Ubuntu 8.04 to Ubuntu 10.04 and
> from Firefox 3.6 to Firefox 10 : this external command in my
> preferences doesn't work any more :
> 
> firefox -remote 'openURL(%s,new-tab)'
> 
> 
> I use Sylpheed 3.1.1
> 
> If I try to run this command on a terminal, I've got this error, despite
> firefox is already running :
> 
> Error: No running window found


I ran into the problem of not being able to open html attachments in my
web browser by double-clicking on the attachment in Sylpheed, so I wrote
the following script, called seamonkey.fixurl. I changed the web browser
command in Sylphed to "seamonkey.fixurl %s" and things have been working
well. Since Seamonkey is a derivative of Firefox, I expect it should work
for Firefox as well.


Craig

========================================================

#!/bin/sh
#
# /usr/local/bin/seamonkey.fixurl
#
# A script to pre-pend "file://" to local file URLs so SeaMonkey will
# open both them and Internet URLs correctly.
#
#       27 Sep 2006             Craig McCluskey
#               - Written.
#       28 Sep 2006             Craig McCluskey
#               - Changed to look for sylpheed and if not present (because
#                 it's not a local file), look for ://. If that's not
#                 present, pre-pend http:// .
#       24 Jun 2009             Craig McCluskey
#               - Had problems with some emails having URLs that were
#                 written as "http:// www...." causing $1 to be "http://"
#                 and $2 to be the rest of the URL. Changed definition of
#                 L to $* to concatenate all of the input parameters, thus
#                 ignoring the spaces.
#       20 Feb 2010             Craig McCluskey
#               - If the URL has an ampersand in it, like URLs from the
#                 APS careers site, seamonkey opens a new, blank window
#                 instead of a new tab with the URL displayed.
#               - Added definition of $N, which takes the first part of
#                 the URL before an ampersand.
#

L=$*

echo $L | grep sylpheed > /dev/null
retval1=$?

if test $retval1 -eq 0
  then
    M="file://$L"
  else
    echo $L | grep :// > /dev/null
    retval2=$?
    if test $retval2 -eq 0
      then
        M="$L"
      else
        M="http://$L"
    fi
fi

N=`echo $M | cut -d"&" -f1`

WHO=`whoami`
echo "L: $L" > /tmp/0.url.$WHO
echo "M: $M" >> /tmp/0.url.$WHO
echo "N: $N" >> /tmp/0.url.$WHO


/usr/local/bin/seamonkey -remote "openURL($N, new-tab)"


More information about the Sylpheed mailing list