Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 15136  / 1 Year ago, sun, december 18, 2022, 6:56:36

How can I make manpages (from the man command) open in a web browser for easier navigation?


More From » browser

 Answers
7

man2html


To search man pages


I installed the man2html package then navigated to http://localhost/cgi-bin/man/man2html to view the man pages. These pages can be viewed offline, link to other man pages and feature a search function.
Source


To directly open a page (from command line)


I made this script here (it's not short), it just navigates directly to the webpage (from man2html) for a certain manpage. It can open multiple man pages specified as command line arguments. Save the script somewhere and give it execute permissions (chmod +x script.sh). Run it as ~/script.sh (assuming saved in ~ directory) with pages to open as arguments. To open something like init(8), use ~/script "8 init".




dwww


To search man pages


Install the dwww paackage and navigate to http://localhost/dwww/man/1 to search the pages. These pages can be viewed offline, link to other man pages and feature a search function.


To directly open a page (from command line)


I made this script here (it's not short), it just navigates directly to the webpage (from dwww) for a certain manpage. It can open multiple man pages specified as command line arguments. Save the script somewhere and give it execute permissions (chmod +x script.sh). Run it as ~/script.sh page (assuming saved in ~ directory) with pages to open as arguments. To open something like init(8), use ~/script init/8. Without pcregrep, you need to type the /8 all the time, with it, just type the name of the page.


[#29692] Sunday, December 18, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iething

Total Points: 49
Total Questions: 127
Total Answers: 112

Location: Luxembourg
Member since Tue, Jan 25, 2022
2 Years ago
;