Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which .conf file do I need to edit in order to view man pages in a web browser? I'd like to use Google Chrome to do this.

Is this possible?

share|improve this question
up vote 5 down vote accepted

One way to do this is to put the following command in ~/.profile:

export PAGER="col -b  | open -a /Applications/ -f"

The PAGER environmental variable controls what program man uses to display man pages. the col command removes all of the backspace-formatting from the man page. The open command saves the output as a temporary text file and opens it with

Or you can edit the PAGER variable in /private/etc/man.conf. You could also probably edit the NROFF variable and eliminate the need to use col -b. See the man page for man.conf.

share|improve this answer
Thanks Nathan. That does the trick perfectly. I've just altered the line to read: export PAGER="col -b | open -a /Applications/Google\ -f" so it'll open in Chrome instead of Safari. – boehj May 21 '11 at 0:35
I'd been wanting to do this for myself anyway, and I'm glad I finally found time to look into it. I used TextWrangler with the command /usr/bin/edit --view-top --clean -t "Man page" – Nathan Grigg May 21 '11 at 1:13 is exactly what you're looking for.

share|improve this answer
Cheers. That does look interesting, esp. "We just threw in some color, some bold headers and cleaned it up a bit, so they go easy on the eye." I wonder if I can get such functionality from further editing a .conf file? – boehj May 21 '11 at 2:12

You can add a function to your ~/.profile:

function gman {
     man "$1" | col -b > "/tmp/$1"
     open -a "/Applications/Google" "/tmp/$1"
share|improve this answer
This function wasn't working for me Graham. Not sure why. – boehj May 21 '11 at 0:39
Is Google Chrome in /Applications/ or somewhere else? – Graham May 21 '11 at 3:51
It's in /Applications/. – boehj May 21 '11 at 8:06
Just an additional step. After adding the function in profile folder. Make sure to source it or reopen terminal. link source ~/.profile – Bharath Kumar Nov 23 '15 at 10:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.