Tuesday, February 28, 2012

How to Use DuckDuckGo in XXXTerm and Abaco

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
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.

Other
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.

Sunday, February 26, 2012

The Eight Year Old Bug

I just installed www/firefox from the FreeBSD ports again — I have been switching between www/opera, www/xxxterm, and www/chromium of late. I launched Firefox and noticed I already had some non-default settings. Right. I must have used Firefox before I removed all my ports and reinstalled only a handful necessities. I exited Firefox and removed ~/.mozilla. I then launched Firefox again. Firefox would not start:

ww@ironwood:~ $ firefox
WARNING: NS_ENSURE_TRUE(compMgr) failed: file /usr/ports/www/firefox/work/mozilla-release/xpcom/build/nsComponentManagerUtils.cpp, line 90
nsStringStats
 => mAllocCount:              5
 => mReallocCount:            3
 => mFreeCount:               5
 => mShareCount:              1
 => mAdoptCount:              0
 => mAdoptFreeCount:          0
XDM authorization key matches an existing client!XDM authorization key matches an existing client!XDM authorization key matches an existing client!XDM authorization key matches an existing client!XDM authorization key matches an existing client!Error: cannot open display: :0
nsStringStats
 => mAllocCount:              9
 => mReallocCount:            4
 => mFreeCount:               9
 => mShareCount:              5
 => mAdoptCount:              0
 => mAdoptFreeCount:          0
1|ww@ironwood:~ $ nsStringStats
 => mAllocCount:              5
 => mReallocCount:            3
 => mFreeCount:               5
 => mShareCount:              1
 => mAdoptCount:              0
 => mAdoptFreeCount:          0

1|ww@ironwood:~ $


I was surprised to see any sort of outright unstable behavior from good old Firefox. I did some DuckDuckGo-ing — Google for cute people — and found a bug originally filed in 2004. I skimmed the comments until I found my fix in the 12th comment: set environment variable XRE_IMPORT_PROFILES to 1. I was then prompted upon launching Firefox to optionally "Import Settings and Data" from Opera.

My system is running FreeBSD 9.0-STABLE:
$ uname -a
FreeBSD ironwood 9.0-STABLE FreeBSD 9.0-STABLE #2: Fri Feb 17 05:01:41 CST 2012     root@ironwood:/usr/obj/usr/src/sys/MYGENERIC  amd64

Firefox's pkg info is — pkgng from ports-mgmt/pkg (It is not in freshports yet):
$ pkg info firefox
firefox-10.0.2,1: Web browser based on the browser portion of Mozilla

I also checked the version Firefox itself reports:
$ firefox --version
Mozilla Firefox 10.0.2$

A little side-note is also that command does not produce a final newline character, so it clobbers my shell prompt. Maybe I will get around to fixing this.

It frustrates me to see bugs go unnoticed for years. I have seen this happen with bugs in Android and Chromium as well. The Android issue is that the Droid font included on Android devices does not have IPA glyphs nor glyphs for a handful of popular Unicode code points, so thus I can not read text that I have been able to read at any computer or iOS device for probably ten years now. The Chromium issue is that the browser makes certain assumptions that lead to the browser going into full-screen mode when the user really meant to maximize the browser window. Edit: Actually the Chromium issue is pertaining to an issue not relating to what I originally thought it did. I currently don't know whether is is still Chromium's fault.

I hope to contribute some time to help fix these pesky issues. If you have read this, comment on the bugs I wrote about — they all need dire attention. It becomes concerning when bugs are ignored, especially if there is a possibility a paid employee should be fixing them for you.

Sunday, February 12, 2012

oh hai thar

Hello, thar.

Yes thar.

My interests are: Old computing systems, computing, games (though I try to not "play like a sweaty gamer" these days), communication arts, security, cyberspace, and to a lesser extent meatspace.

I lurk under a few different names on Freenode and other IRC servers. I am currently living in the US.

Hear from me more later.
♥wjcw