Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating MANPATH for all users

Status
Not open for further replies.

relz

Technical User
May 5, 2002
23
IL
Hi,
Some of the programs I install require updating of the MANPATH variable to acess their man pages. How do I update the man page search path for all users in the system so they can all see the new man pages? Is there some kind of global MANPATH variable, that all users have on startup?
 
Specify the MANPATH in /etc/profile which is read on login by all users. HTH.
 
Thanks Ken,
I was a bit scared to add such a line to /etc/profile since nothing of the such existed before.
Where is the default man pages search path defined BEFORE a variable MANPATH is assigned? I mean that users with no mention of MANPATH can still see some man pages, how do I know which pages they were so I don't miss out something with the MANPATH I give them.

REL
 
Make your entry in /etc/profile something like:

export MANPATH=$MANPATH:<new paths to add>

The $MANPATH will preserve whatever is in the MANPATH before you add to it in /etc/profile. HTH.
 
I understand not to run over the old MANPATH. What I'm saying is that some users don't have any MANPATH that is
they get:

[0]test11@slicer:~>echo $MANPATH
MANPATH: Undefined variable.


but still if I try &quot;man man&quot; it will find the man page.

Back to my problem I added this line to /etc/profile

Code:
MANPATH=/usr/local/man:/usr/share/man:usr/local/fileutils-4.0/man/:/usr/local/samba/man:/opt/SUNWspro/man:/usr/apache/man:/usr/dt/man:/usr/openwin/man; export MANPATH
but it didn't help!


 
Are you missing the leading / from the /usr/local/fileutils... entry? Not sure if this will make any difference, however. Post back if not. Cheers.
 
You're right Ken, I was missing the /
(not that it made any difference).

I've got to go now.
Thanks for the help,
REL
 
your version
MANPATH=/usr/local/man:/usr/share/man:usr/local/fileutils-4.0/man/:/usr/local/samba/man:/opt/SUNWspro/man:/usr/apache/man:/usr/dt/man:/usr/openwin/man;
export MANPATH

my version

export MANPATH
MANPATH=/usr/man:/usr/openwin/man:/usr/dt/man:/usr/local/man:/usr/share/man:/usr/local/fileutils-4.0/man:/usr/local/samba/man:/opt/SUNWspro/man:/usr/apache/man
 
What's the difference jamisar?
I haven't worked much with a Bourne shell, so I don't know the syntax very well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top