DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 10th December 2014
raindog308 raindog308 is offline
Fdisk Soldier
 
Join Date: Sep 2011
Posts: 67
Default Does surfraw work for you?

I heard about surfraw and it sounded cool. However, upon playing with it:

Code:
 # surfraw google -results=10 openbsd                                  
/usr/local/lib/surfraw/google[128]: http://www.google.com/search?q=openbsd&num=10: not found
I see the same in FreeBSD, though it works in Debian Linux, which usually means someone was not thinking cross-platform when they coded.

I was originally interested because I thought it pulled in semantic info - for example, if you said 'surfraw rhyme time' it would pull in rhymes for the word 'time' or if you said 'surfraw weather 90210' it would give you a weather forecast. The ability to get that at the command line (and then of course pipe and play with it) sounded neat...

...however when I played with it on Debian, it appears to just format a query and submit it to links/lynx, which...I could do myself.

But before I move on to more interesting things, if the port is broken, I'd like to let the maintainer know. I wasn't able to see the cause at a glance, despite adding -x to some things.
Reply With Quote
  #2   (View Single Post)  
Old 10th December 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Seeing as there are OpenBSD developers and users (and friends of mine) in the surfraw AUTHORS file, it's hard to imagine that surfraw would be broken. And it is not.

It seems like you are missing devel/xdg-utils which includes the xdg-open script that surfraw will use by default (or maybe you have no default browser).

Try this:

Code:
$ mkdir -p ~/.config/surfraw
$ echo "SURFRAW_text_browser=/usr/local/bin/lynx" >> ~/.config/surfraw/conf
$ echo "SURFRAW_graphical=no" >> ~/.config/surfraw/conf
Of course, this requires www/lynx but you can obviously replace that with whatever you like.

Btw, this info is very clearly explained in the surfraw manpage.
Reply With Quote
  #3   (View Single Post)  
Old 10th December 2014
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

It's trying to open a browser to disply the results, which is what I thought surfraw does...
Reply With Quote
  #4   (View Single Post)  
Old 10th December 2014
raindog308 raindog308 is offline
Fdisk Soldier
 
Join Date: Sep 2011
Posts: 67
Default

Thanks!

My fault for not reading further. I was expecting something different than having it fire up a browser, and yes I didn't have a default browser installed on that box.

I'm still wondering what exactly the advantage of surfraw is...why not simply start links/lynx and surf?
Reply With Quote
  #5   (View Single Post)  
Old 10th December 2014
pawaan pawaan is offline
Fdisk Soldier
 
Join Date: Jan 2013
Posts: 82
Default

Thanks ibara !
Following your directives, surfraw is now working (NetBSD 6.1.5 amd64 though)
Reply With Quote
  #6   (View Single Post)  
Old 11th December 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by raindog308 View Post
I'm still wondering what exactly the advantage of surfraw is...why not simply start links/lynx and surf?
It's much much faster, especially with text-based browsers. Just look at the different elvi... who has time to navigate to all those pages and search engines individually?

Searching the OpenBSD mailing lists from the command line? Yes please.
Reply With Quote
  #7   (View Single Post)  
Old 11th December 2014
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

Quote:
Originally Posted by raindog308 View Post
I was expecting something different than having it fire up a browser
Try links+ with -dump perhaps?

Tim.

Last edited by TronDD; 11th December 2014 at 02:27 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
why won't my table work? tomp OpenBSD Security 3 25th August 2011 12:23 PM
My Mouse Don't Work ??? sharris FreeBSD General 9 7th May 2011 02:15 AM
nspluginwrapper not work... marduk NetBSD Installation and Upgrading 4 3rd January 2011 10:23 PM
ATI Catalyst.... Does it work? echoblack OpenBSD Installation and Upgrading 10 17th June 2009 09:04 AM
Getting Qt4 to work on FreeBSD enpey FreeBSD Ports and Packages 6 6th May 2008 07:20 AM


All times are GMT. The time now is 12:46 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick