Re: urlview - open firefox tab
On Fri, Feb 27, 2009 at 12:24:24PM +0100, Joost Kremers wrote:
> On Thu, Feb 26, 2009 at 10:20:22PM -0700, Joseph wrote:
> > On 02/26/09 22:02, Kyle Wheeler wrote:
> >>
> >>> firefox -remote openURL('http://www.cskk.ezoshosting.com/cs/',new-tab)...
> >>> sh: -c: line 0: syntax error near unexpected token `('
> >>
> >> Well, sure - bare parentheses mean something to your shell. That's why
> >> you have to put the backslashes in front of them. It's got nothing to
> >> do with the single quotes inside. You could do this:
> >
> > in urlview I have:
> > OMMAND firefox -remote openURL\(%s,new-tab\)
> >
> > When I try to open any URL:
> > Executing: firefox -remote
> > openURL\('http://domainkeys.sourceforge.net/',new-tab\)...
> > Error: Failed to send command: 500 command not parseable
>
> i haven't used urlview since i started using xfce4's Terminal, which
> recognises urls and makes them clickable, but back when i did, my .urlview
> looked like this:
>
> ###############################################################################
> # Urlview configuration file.
> # man urlview <Man page>
> #
> # The defaults are shown here:
> #
> REGEXP (((https?|ftp|gopher)://|(mailto|file|news):)[^'
> \t<>"]+|(www|web|w3)\.[-a-z0-9.]+)[^' \t.,;<>"\):]
> COMMAND /home/joost/bin/urlhandler.sh %s
> #
> ###############################################################################
>
> and the script urlhandler.sh looked like this:
>
> ==============================================================================
>
> #!/bin/bash
>
> export PATH=/usr/bin:/usr/local/bin:
>
> if [ ! -z $DISPLAY ] ; then
>
> # for some stupid reason, firefox -remote cannot handle the fact that
> # there are commas in urls. therefore, we have to parse the url through
> # sed and replace commas with their ascii code %2c:
>
> exec firefox -remote "openURL($(echo $@|sed 's/,/%2c/g'),new-tab)"
> else
> TERM=linux
> exec links "$@"
> fi
>
> ==============================================================================
>
> however, given that firefox doesn't need the -remote option nor the command
> openURL anymore, i'd try this in .urlview:
>
> COMMAND firefox %s
>
> my guess is that'll work just fine...
I use Cygwin ion a laptop for mail, with mutt of course, and:-
COMMAND "/cygdrive/c/Program Files/Mozilla Firefox/firefox" %s
in my .urlview works fine, so you are certainly correct if firefox is on
your path.
Brian.
>
> --
> Joost Kremers, PhD
> University of Frankfurt
> Institute for Cognitive Linguistics
> Gr??neburgplatz 1
> 60629 Frankfurt am Main, Germany
--
Brian Salter-Duke (Brian Duke)