Using Firefox to view HTML man pages
Posted by Jason on December 28, 2007
The problem
One of the things I face as a newcomer to Ubuntu is new commands and new syntaxes. How do I copy/move/rename files? What are the options to list directory contents? And so on…you all know the deal.
The first stop (so far as I know) is the man pages. These are reference pages that come with just about every program and are very informative. Usually, you can figure out what you need to do if you carefully read the man pages.
However, the man command by default invokes a text-based viewer that is not the most attractive thing to read, so…
The Solution
I want to view the man pages as HTML, and from Firefox (my web browser). I want to be able to type in something like man ls into the Firefox address bar and see the results.
This is how I did it:
1. Install a local web server.
sudo apt-get install apache2
2. Install the documentation for that web server (this probably isn’t necessary, but I like to install documentation packages when available.)
sudo apt-get install apache2-doc
3. Install the man2html package, which converts man pages to HTML format
sudo apt-get install man2html
4. Create a Custom Keyword in Firefox:
Bookmarks > Organize Bookmarks…
Go to “Custom Keywords”, and create a new bookmark in whatever category you like.
Use this for the “Location”: http://localhost/cgi-bin/man/man2html?query=%s
Use this for the “Keyword”: man
The Results
Now, just type man ls into the Firefox address bar, and you should see the man HTML for the ls command. If you type man man, you can choose which page to reference.
Hey hey! I figured out how to do something all by myself!
5 Responses to “Using Firefox to view HTML man pages”
Sorry, the comment form is closed at this time.

K.Mandla said
Nicely done! I’ll have to give this a try. I usually rely on die.net for online man pages, but this could be better. Cheers!
ushimitsudoki said
Hello!
I did not know about die.net, thanks for turning me on to that!
I also added your blog to my links section – I hope that is ok!
Hackety Hack Hack « Me and U(buntu) said
[...] these for quick man references to the libraries and headers. Don’t forget the little “HTML man pages in firefox” trick – it’s a big help! Possibly related posts: (automatically generated)Hey, Gnome! [...]
Aeron said
Thanks for that! Now I can view man pages without having to use the ugly terminal ;)
bdimych said
there is also debian package dwww