2

Has anyone had success configuring Surfraw on OSX? How do I get a working configuration for OSX? http://www.surfraw.org/

  • surfraw 2.2.8 is in both macports and homebrew - have you tried installing via those systems? – Scot Feb 21 '14 at 4:15
2

Once you've installed it (I used Macports) your ~/.surfraw.conf file should look like this, at a minimum:

SURFRAW_graphical=yes
SURFRAW_graphical_browser=open

The open command opens the default GUI application for whatever it's passed. In this case it's passed a http:// URL so it opens it in the default browser.

  • 1
    It needed the extra line SURFRAW_text_browser=open – incandescentman Feb 21 '14 at 9:38
  • Do you have SURFRAW_text=yes somewhere in there? Mine works great with ony those two lines. Anyway, glad you got it running! – miken32 Feb 21 '14 at 16:44
  • It's strange, right? I did not have SURFRAW_text=yes. Don't know why SURFRAW_graphical=yes didn't work. Anyway, yes it's working, and thanks for the lead with open! – incandescentman Feb 21 '14 at 19:55
1

Surfraw 2.2.8 can be installed using either Homebrew or Macports.

Here's how to install via Homebrew. These commands should be typed within the terminal application:

Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Install Surfraw

brew install surfraw
  • It's installed, but when I run it, I get /usr/local/bin/surfraw: line 470: /Applications/Google: No such file or directory. I'm trying to figure out a working configuration. I don't have Lynx, so in my .surfraw.conf I'm using SURFRAW_text_browser=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome, which should be the correct file location. – incandescentman Feb 21 '14 at 5:32
  • How did you install? I used the above procedure, and when typing $ sr google "foo" it opens my default browser (Safari or Chrome). This is with no .surfraw.conf file – Scot Feb 21 '14 at 8:07
  • I installed using brew. I just deleted .surfraw.conf, uninstalling, then reinstalling using brew install surfraw. Then the command again. Same result: /usr/local/bin/surfraw: line 470: http://www.google.com/search?q=foo&num=30: No such file or directory – incandescentman Feb 21 '14 at 9:09
  • Tried installing with port. Same error, different directory: /opt/local/bin/surfraw: line 470: http://www.google.com/search?q=foo&num=30: No such file or directory – incandescentman Feb 21 '14 at 9:11
  • I made some progress. I tried sr -browser="/Applications/Safari.app/Contents/MacOS/Safari" google foo. But this opens Safari with the url file:///Users/peter/http:/www.google.com/search%3Fq=foo&num=30 – incandescentman Feb 21 '14 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .