Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2006 06:55:28 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: 6.1-RELEASE-i386 man broken?
Message-ID:  <44B731D0.90001@infracaninophile.co.uk>
In-Reply-To: <20060714003829.GA27743@brokedownpalace>
References:  <20060714014823.c4d0b759.nick@nickwithers.com>	<000f01c6a6ba$6d1d4340$0a10a8c0@holgerdanske.local> <20060714003829.GA27743@brokedownpalace>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCD8293D0C9CEEFFC85DA0BE8
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

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.
>=20
> I ran into and had to solve this problem myself when first coming to
> FreeBSD, recently, as my transported Linux bash configs contained
> MANPATH=3D$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=3D"${MANPATH:-$(manpath)}:/foo/bar/man:/baz/quux/man"
	export MANPATH

Or to ignore any previous setting of MANPATH in the environment:

	MANPATH=3D"$( unset MANPATH ; manpath ):/foo/bar/man:/baz/quux/man"
	export MANPATH

csh equivalents are left as an exercise for the student.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


--------------enigCD8293D0C9CEEFFC85DA0BE8
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEtzHQ8Mjk52CukIwRA83jAJ9/7SNAsHAndEP+HqbTUZCudTCqAgCaAlwM
wNJJz5NTl7g0yOtaWHNbfAU=
=Yptd
-----END PGP SIGNATURE-----

--------------enigCD8293D0C9CEEFFC85DA0BE8--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44B731D0.90001>