6.1-RELEASE-i386 man broken?
Matthew Seaman
m.seaman at infracaninophile.co.uk
Fri Jul 14 05:55:29 UTC 2006
J wrote:
> On 2006-07-13 (Thu) 13:25:04 [+0000], David Christensen wrote:
>> Matthew Seaman wrote:
>>> Please read what I wrote more carefully. To summarize: don't set
>>> $MANPATH in your environment, and the man(1) command will work
>>> correctly.
>> Now I understand:
>>
>>> The environment variable MANPATH should in general not be set, as
>>> that will override the effects of /etc/manpath.config.
>
> I ran into and had to solve this problem myself when first coming to
> FreeBSD, recently, as my transported Linux bash configs contained
> MANPATH=$MANPATH:/custom/manpath. What I never figured out was the
> rationale for this. Anyone mind me asking what's wrong with MANPATH or
> why manpath.config is exclusively favored? For instance, while I have a
> /usr/lib/man.conf on my Linux system and can set the default manpath
> there, man happily coexists with any MANPATH. How does one add a custom
> manpath without root privileges? Etc. Just curious; thanks.
The manpath(1) program is designed to provide standard system-wide
operation of the man(1) command. It covers all of the places the
ports system will put manpages and all of the system manpages. That
is generally sufficient for most sites.
If you have a customised directory layout and start putting man pages in
unusual places, then you've got two choices. If these oddly located man
pages are for general consumption, then add the appropriate info to
/etc/manpath.config -- by editing that one file you will make those
manpages visible immediately to all users on the system.
Otherwise if you have your own private stache of manpages you should
set MANPATH in your shell initialization scripts. However, you should
not assume that MANPATH is already set so that you can just append to
it. To get the best of both worlds, set your local $MANPATH based on the
output of manpath(1). For Bourne-type shells, something like:
MANPATH="${MANPATH:-$(manpath)}:/foo/bar/man:/baz/quux/man"
export MANPATH
Or to ignore any previous setting of MANPATH in the environment:
MANPATH=$( unset MANPATH ; manpath )
export MANPATH
csh equivalents are left as an exercise for the student.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060714/d7aaf150/signature.pgp
More information about the freebsd-questions
mailing list