Browse man pages with a web browser

Jan 20, '06 05:34:00AM

Contributed by: MacCoaster

So you hate scrolling through man pages in the terminal and don't want to produce PDF versions because they would take up space, be slow, or not be as easy to access? I've often wondered about those online man browsers. So I dug a little bit deeper and found man2html. But wait, there's more. It includes a CGI script.

With DarwinPorts installed, go to the Terminal and type in:

$ sudo port install man2html
$ cp /opt/local/www/cgi-bin/man.cgi /Library/WebServer/CGI-Executables
When done, make sure you have enabled Personal Web Sharing in System Preferences -> Sharing. Then point your favorite browser to http://localhost/cgi-bin/man.cgi, and you've got browseable man pages! They even link to one another.

Even better, if you use Quicksilver, add a bookmark for your man pages by using this...
http://localhost/cgi-bin/man.cgi?section=all&topic=***
...for the bookmark. Name it man. Now you can easily trigger Quicksilver and then type man [Return] some_unix_app [Return] to get the man some_unix_app page immediately.

[robg adds: I tried to duplicate this tip with Fink, which also has man2html available. It didn't, however, include the CGI. I downloaded that separately from the man2html homepage and edited it to match my setup, but still no go -- the CGI would run, but the returned man pages were blank. I'm sure it's something simple I've done wrong, so if anyone can correct me, please comment...]

Comments (21)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060116033426984