Tuesday, February 28, 2012

How to Use DuckDuckGo in XXXTerm and Abaco

Since I've been experimenting and playing with Plan 9, I made a patch to use DuckDuckGo in Plan 9's abaco web browser. You can find it here on my Bitbucket. Writing the modifications and testing my changes was a splendid way to test acme — a Plan 9 IDE of sorts — in a practical way. Oh and here's a screenshot (the original is here).

I tried taking the screenshot inside the drawterm session, but the /dev/screen device file was only providing a truncated stream of data no more than a byte or two long.

XXXTerm is a great webkit-based browser with a minimal look and feel other web browsers attempt to achieve, but at a great loss of functionality. XXXTerm handles cookies intelligently, allows for extensive meaningful configuration, tabbed browsing, and works with plugins such as Java or Flash. I would also say XXXTerm is a lot easier to use than suckless surf or uzbl. The quick way to use DuckDuckGo in XXXTerm is a few-liner:

search_string = https://duckduckgo.com/?q=%s
alias = d,https://duckduckgo.com/?q=%s

This will configure the search bar when using the fancy_gui mode to use DuckDuckGo, and it'll let you search DuckDuckGo by entering a "d" followed by one or more search terms in the :open dialog or in the address bar present while using the fancy_gui mode. Also, if you use the feature that enumerates objects on the page with numbers for mouse-less operation (or don't want to use Javascript on DuckDuckGo), you may want to instead use https://duckduckgo.com/html or https://duckduckgo.com/lite.

You can always reach DuckDuckGo by visiting ddg.gg in your web browser. You can always add search terms to a URL provided you URL-encode them if your browser doesn't do it "automagically": ddg.gg/?q=\+hello+world. It will redirect your browser to https://duckduckgo.com/. Unfortunately, sometimes DuckDuckGo does not detect if your browser has Javascript enabled so it may not work if you go to the main page so you have the alternative choices of images and at duckduckgo.com/html or no images and only one column at duckduckgo.com/lite. You can see I chose the lite version for abaco; I did this because drawterm works slowly over the large and vast internet :).

See DuckDuckGo's goodies page, tech goodies page, and the other pages on help.duckduckgo.com for more in-depth information about how to use DuckDuckGo to its full potential.

No comments:

Post a Comment