angrykeyboarder
October 13th, 2006, 03:40 AM
There are several ways to view man pages in Linux.
I know you're aware of at least one way (and probably two if you're a Kubuntu/KDE user).
Of course the most common method is in a terminal or console:
$man <command>But for many, this is is not ideal because:
They're just not used to getting help this way (e.g. coming to Linux from Windows) and/or
Reading text in a terminal can be difficult. This is especially true if you have poor eyesight (I fall into this category) and/or
They would like a nicely printed version of the man page.So then... In Kubuntu:
You've got it made, as man pages are viewable in Konqueror by default.
Open Konqueror and type #<command> in the location bar. That will display the all text of the man page that you would see in a terminal, but in a much nicer DocBook (http://wiki.docbook.org/topic/DocBook) format. And this utilizes your default Konqueror fonts.
So entering:
#apt-getin Konqueror's location bar, would display the man page (right in Konqueror) for the "apt-get" command.
In Ubuntu/Xubuntu/Edubuntu:
The desktop users guide (the help icon) has a manual pages section. However, it doesn't seem to have all man pages (so I almost never use it myself).
So then, we're now down to my favorite way to view man pages. And that is:
View man pages in any web browser that you have installed.
This is especially nice with Firefox (you'll see why later on).
There is a program that converts man pages to html on the fly. it's called (appropriately enough) man2html.
(http://savannah.nongnu.org/projects/man2html/)
However, it does require that you have a web server installed (if you don't already). If you don't, it's very easy to accomplish.
There a a variety of web server programs in the Ubuntu repository. I use the ever popular Apache (http://www.apache.org/), but any of them should work (however, I'm not familiar with the others. I've not tried them).
For the following example, I'll use Apache.
Assuming you don't have a web sever installed, open a terminal and enter
sudo apt-get install apache2 man2html
(You can omit "apache2" if you do have it - or another- web sever installed already).
Now depending on your setup, you may have unmet dependencies, so accept whatever extra packages apt says you need to install along with the above.
When the installation(s) finish(es), take note of the last line of the response. It shows you the URL you need in order to view man pages in your browser.
Typically that URL is:
http://localhost/cgi-bin/man/man2html
Of course you'll want to bookmark this page.
Now open that URL in your browser of choice (I recommend Firefox - read on).
On the web page you'll see a box; That's where you enter the command you'd enter if you were viewing it in a terminal (sans the "man" portion).
So, if you want a man page for the "less" command you'd simply type "less" in the box and you'd see the man page for the command.
Now this still is a bit cumbersome, In fact, it's faster just to view man pages the old fashioned way (in a terminal).
However....
This is where it gets cool, quick and easy (if you're using Firefox).
Bookmark the above URL in Firefox.
Then go to your bookmarks menu and open your bookmarks (like you would if you wanted to organize them).
Find the above bookmark.
Right click on it and select properties.
Now, you need to make two changes here.
Step 1.
In the "Location" section, append the URL with.
?query=%sStep 2.
Right below the location box is a keyword box. In that box enter man.
So in my case, all I have to do to view a man page in Firefox is to type man <command> in the location bar!
Therefore, typing the following in the Firefox Location bar:
man aptitude.....would give you a web page (suitable for printing) with everything that you'd see in a terminal had you typed "man aptitude" there (but nicely formatted and with hyperlinks to related commands)!
That's it!
This may be a bit cumbersome to set up, but after you get it up and running it truly rocks (at least I think so).
I know you're aware of at least one way (and probably two if you're a Kubuntu/KDE user).
Of course the most common method is in a terminal or console:
$man <command>But for many, this is is not ideal because:
They're just not used to getting help this way (e.g. coming to Linux from Windows) and/or
Reading text in a terminal can be difficult. This is especially true if you have poor eyesight (I fall into this category) and/or
They would like a nicely printed version of the man page.So then... In Kubuntu:
You've got it made, as man pages are viewable in Konqueror by default.
Open Konqueror and type #<command> in the location bar. That will display the all text of the man page that you would see in a terminal, but in a much nicer DocBook (http://wiki.docbook.org/topic/DocBook) format. And this utilizes your default Konqueror fonts.
So entering:
#apt-getin Konqueror's location bar, would display the man page (right in Konqueror) for the "apt-get" command.
In Ubuntu/Xubuntu/Edubuntu:
The desktop users guide (the help icon) has a manual pages section. However, it doesn't seem to have all man pages (so I almost never use it myself).
So then, we're now down to my favorite way to view man pages. And that is:
View man pages in any web browser that you have installed.
This is especially nice with Firefox (you'll see why later on).
There is a program that converts man pages to html on the fly. it's called (appropriately enough) man2html.
(http://savannah.nongnu.org/projects/man2html/)
However, it does require that you have a web server installed (if you don't already). If you don't, it's very easy to accomplish.
There a a variety of web server programs in the Ubuntu repository. I use the ever popular Apache (http://www.apache.org/), but any of them should work (however, I'm not familiar with the others. I've not tried them).
For the following example, I'll use Apache.
Assuming you don't have a web sever installed, open a terminal and enter
sudo apt-get install apache2 man2html
(You can omit "apache2" if you do have it - or another- web sever installed already).
Now depending on your setup, you may have unmet dependencies, so accept whatever extra packages apt says you need to install along with the above.
When the installation(s) finish(es), take note of the last line of the response. It shows you the URL you need in order to view man pages in your browser.
Typically that URL is:
http://localhost/cgi-bin/man/man2html
Of course you'll want to bookmark this page.
Now open that URL in your browser of choice (I recommend Firefox - read on).
On the web page you'll see a box; That's where you enter the command you'd enter if you were viewing it in a terminal (sans the "man" portion).
So, if you want a man page for the "less" command you'd simply type "less" in the box and you'd see the man page for the command.
Now this still is a bit cumbersome, In fact, it's faster just to view man pages the old fashioned way (in a terminal).
However....
This is where it gets cool, quick and easy (if you're using Firefox).
Bookmark the above URL in Firefox.
Then go to your bookmarks menu and open your bookmarks (like you would if you wanted to organize them).
Find the above bookmark.
Right click on it and select properties.
Now, you need to make two changes here.
Step 1.
In the "Location" section, append the URL with.
?query=%sStep 2.
Right below the location box is a keyword box. In that box enter man.
So in my case, all I have to do to view a man page in Firefox is to type man <command> in the location bar!
Therefore, typing the following in the Firefox Location bar:
man aptitude.....would give you a web page (suitable for printing) with everything that you'd see in a terminal had you typed "man aptitude" there (but nicely formatted and with hyperlinks to related commands)!
That's it!
This may be a bit cumbersome to set up, but after you get it up and running it truly rocks (at least I think so).