Geoff Garside

Feb 14 2008

Leopard Manpath

If you use MacPorts quite a bit like I do then you sometimes need to read a manpage for a MacPorts installed application. Unfortunately MacPorts doesnt add the /opt/local/share/man path to MANPATH so your man command won’t find them.

The solution as it seems it very easy though at first glance its a bit complicated to decide where you should add this new path. This is because you’ve got three choices, /etc/man.conf, /etc/manpaths and /etc/manpaths.d/. Its pretty much up to you but I opted to do it this way.

$ sudo bash
Password:
bash-3.2# echo "/opt/local/share/man" > /etc/manpaths.d/MacPorts
base-3.2# exit
$

now close your Terminal and open a new one and do

$ echo $MANPATH
/usr/share/man:/usr/local/share/man:/opt/local/share/man:/usr/X11/man

and you should get something like that. Ahhh, much better. It even beats X11 to the punch but thats most likely down to the alphabet.

Comments
blog comments powered by Disqus