2

I usually use google but whenever I load it in a text browser I have to press down several times to go to the field where you enter the search string. This is redundant. How do people use text-only web browsers to do web searches?

2 Answers 2

3

For most search engines, you can just modify the URL, append ?q=<term> and do the search. E.g. -

https://duckduckgo.com/?q=hello

https://www.google.com/search?q=hello

http://www.bing.com/search?q=hello
1

+1 for Bibhas answer (try searching with eg links www.duckduckgo.com :/ ).

Surfraw can automatize that. It provides a fast unix command line interface to a variety of popular WWW search engines and other artifacts of power:

Surfraw uses your prefered text or graphical browser to display the result. This can be customized via ~/.surfraw.conf (XDG's supported: ~/.config/surfraw/conf):

SURFRAW_graphical_browser=/usr/bin/Firefox
SURFRAW_text_browser=/usr/bin/links
SURFRAW_graphical=no

An then,

  • Search DDG for "foo":

    $ sr duckduckgo foo
    
  • See Stackexchange's latest unanswered questions:

    $ sr stack -sort=null
    

Where duckduckgo and stack are Elvi Full list of Elvi, just like DDG bangs!

2
  • tuk0z - when run in gnome-terminal, I can't get surfraw to recognize ~/.config/surfraw/conf, but when I copy that conf to ~/.surfraw.conf, it works fine - even though that second file is not even mentioned in man surfraw. I'm not sure what XDG's are. Could you clarify?
    – Diagon
    Commented Jun 10, 2020 at 3:23
  • Well, I found their new home on gitlab, and in their config documentation I don't see any mention of ~/.config/surfraw/conf. I'll have to look more, but it appears that their man page is out of date.
    – Diagon
    Commented Jun 10, 2020 at 3:31

You must log in to answer this question.

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