Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Browse man pages with a web browser UNIX
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...]
    •    
  • Currently 2.80 / 5
  You rated: 4 / 5 (5 votes cast)
 
[15,303 views]  

Browse man pages with a web browser | 21 comments | Create New Account
Click here to return to the 'Browse man pages with a web browser' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Browse man pages with a web browser
Authored by: gregraven on Jan 20, '06 06:33:29AM

For about one-tenth the effort, you can install and use Bwana:

http://www.bruji.com/bwana/

---
--
Greg Raven
Apple Valley, CA



[ Reply to This | # ]
Browse man pages with a web browser
Authored by: evolve75 on Jan 20, '06 06:52:16AM
Or install Sogudi for Safari to get the same funtionality and much more for free :-)

---
Anupam

[ Reply to This | # ]

Browse man pages with a web browser
Authored by: tforrest on Jan 20, '06 09:57:49AM
I've used Sogudi for quite some time and never knew about this. So for the rest of the uniformed Sogudi users:
SogudiPowerCustomize
It's on by default. So for instance to see the launchd man page type man:launchd in the address bar

[ Reply to This | # ]
Browse man pages with a web browser
Authored by: dmmorse on Jan 20, '06 08:46:40AM
Or use manServer. I've been using this for a few years and it works wonderfully! No need for anything other than the provided PERL script.

[ Reply to This | # ]
Browse man pages with a web browser
Authored by: whytoi on Jan 20, '06 12:55:19PM

Bwana is the one for me also. Nicely formatted with colour coding in Safari.



[ Reply to This | # ]
Browse man pages with a web browser
Authored by: blgrace on Jan 20, '06 02:12:29PM

Agreed, been using Bwana since it was first mentioned on this site in combination with a small bash script which was also submitted to this site - which means you can use it directly from the terminal or from Safari.
Too easy



[ Reply to This | # ]
Sogudi + Acid
Authored by: JohnnyMnemonic on Jan 20, '06 06:50:33AM
Personally, I use Sogudi + Acid and I find the combo powerful, I can search for man pages in the "Google" box or in the adress bar. Then, I configured Acid to recognize "man -k" searches, which I can get to by hotkey. Much nicer than consuming a term window with a man page! Plus colors and clickable links are a useful bonus. And it all installs as a package.

[ Reply to This | # ]
Sogudi + Acid
Authored by: djdawson on Jan 20, '06 07:12:07AM

I'm surprised that I've never seen anyone mention this URL for web access to the OS X man pages:

http://developer.apple.com/documentation/Darwin/Reference/ManPages/index.html

It may not be the slickest solution, but it's quick and easy, and you can do a simple text search in your browser window to find stuff.

HTH

Dana



[ Reply to This | # ]
Browse man pages with a web browser
Authored by: jeremyp on Jan 20, '06 09:12:06AM
Or if you have access to the Internet, try this: Apple manpage page.

[ Reply to This | # ]
Browse man pages with a web browser
Authored by: MacCoaster on Jan 20, '06 04:13:31PM

Too bad Apple's man pages don't have all the man pages on my Power Mac. What if I wanted to read the man page for DarwinPorts? Some ports I installed with DarwinPorts?

---
The Mac Coaster



[ Reply to This | # ]
Browse man pages with a web browser
Authored by: jazzman34653 on Jan 22, '06 08:03:21PM

Thank you for this GREAT and useful hint! It is so simple and without a lot of folderol. I just put it in my bookmarks annd there it is in my bookmarks bar ready for me to use. Thanks again for this simple solution.



[ Reply to This | # ]
Browse man pages with a web browser
Authored by: aaronfaby on Jan 20, '06 09:46:11AM
ManOpen owns them all.

---
Great Mac Hosting - http://www.serverlogistics.com

[ Reply to This | # ]

i second the endorsement of ManOpen
Authored by: garbanzito on Jan 20, '06 12:00:53PM

everything else is clumsy in comparison; particularly nice is the "openman" command by which one accesses ManOpen from the shell



[ Reply to This | # ]
Browse man pages with a web browser
Authored by: MacCoaster on Jan 20, '06 04:18:51PM

The reason why I did this hint is because I didn't like ManOpen personally. It was too awkward for me. The Man2html or Bwana/Sogudi solution is much cleaner for my tastes.

But that's just me.

---
The Mac Coaster



[ Reply to This | # ]
Quicksilver bookmark
Authored by: aqua on Jan 20, '06 01:39:06PM

Can someone explain to me how to add the quicksilver bookmark like explained in the hint?

Thanks



[ Reply to This | # ]
Quicksilver bookmark
Authored by: MacCoaster on Jan 20, '06 04:21:50PM

Usually with Quicksilver bookmarks you group them in one bookmark folder. You use exactly what I provided, including the three asterisk marks at the end. The three asterisk marks at the end tell Quicksilver to activate the text input after you've hit return after typing 'man'. Quicksilver will replace the *** with whatever you typed.

I hope that is clear.

---
The Mac Coaster



[ Reply to This | # ]
Quicksilver bookmark
Authored by: aqua on Jan 20, '06 05:35:41PM

I was actually wondering how to add a bookmark, but I figured it out.

Thanks for the hint! :)



[ Reply to This | # ]
Browse man pages with a web browser
Authored by: MacCoaster on Jan 20, '06 04:30:14PM
robg, have you made sure your man paths are set? Like:
@ManPath        = qw(
    /opt/local/man
    /opt/local/share/man
    /usr/share/man
    /usr/local/man
);
and
@Path           = qw(
    /opt/local/bin
    /usr/local/bin
    /bin
    /usr/bin
);
and of course make sure your cgi-bin directory is set with
$CgiBin         = "/cgi-bin";
and make sure $ManConvPrg points to the right man2html binary:
$ManConvPrg     = '/opt/local/bin/man2html';
So it's possible that you need to change that to /sw/bin/man2html or whatever Fink has it. That's all I can think of.

---
The Mac Coaster

[ Reply to This | # ]

Browse man pages with a web browser
Authored by: Touchstone on Jan 22, '06 07:52:40AM
The *NIX Manual widget is the best Man-pages browser I've found.

http://www.interdimensionmedia.com/widgets.html

I like that it's a widget so I don't have to start a program when I want to access the man pages. And it's so easy to setup. Just download and install like any other widget.

[ Reply to This | # ]

Browse man pages with a web browser
Authored by: DRobertAdams on Feb 09, '06 12:21:23PM
Here's a useful little shell script that I alias as 'man'...
#!/bin/bash
SECTION=all
if [ $# == 2 ]; then
   SECTION=$1
   shift
fi
NAME=$1

/usr/bin/open -a Firefox.app \ 
"http://localhost/cgi-bin/man.cgi?section=$SECTION&topic=$NAME"


[ Reply to This | # ]
Browse man pages with a web browser
Authored by: philemine on Feb 10, '06 09:37:11AM

To make it work with fink:

edit your man.cgi and change following:

$ManConvPrg = '/sw/bin/man2html';
$ManPrg = '/usr/bin/man';

@ManPath = qw(
/usr/local/man
/usr/man
/usr/X11R6/man
/usr/share/man
/sw/man
);

@Path = qw(
/bin
/usr/bin
/sw/bin
);

hopefully it gonna work



[ Reply to This | # ]