Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-30-2011, 09:34 PM   #1
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,655

Rep: Reputation: 51
MANPATH begins with ':'. Syntactically correct?

Kernel, Slackware 12.0

$ echo $MANPATH
Is this path syntactically correct? I ask 'cause a colon is the first character. Thanks.
Old 05-30-2011, 10:56 PM   #2
Senior Member
Registered: May 2006
Distribution: Caldera, CTOS, Debian, FreeBSD, Mac OS X, Mandrake, Minix, OpenBSD, Slackware, SuSE
Posts: 1,757

Rep: Reputation: 80
It's not correct, initial MANPATH variable being set in /etc/profile is being clobbered. Check where MANPATH is being set and appended.

I'm running 13.37, not 12.0, I suspect it will be similar.

# Set the values for some environment variables:
export MANPATH=/usr/local/man:/usr/man
# Append any additional sh scripts found in /etc/profile.d/:
for profile_script in /etc/profile.d/*.sh ; do
  if [ -x $profile_script ]; then
    . $profile_script
unset profile_script
It then appends any additional MANPATH in /etc/profile.d:
export MANPATH="${MANPATH}:${JAVA_HOME}/man"
So resulting MANPATH is:

$ echo $MANPATH
Old 05-31-2011, 05:40 PM   #3
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,655

Original Poster
Rep: Reputation: 51
Thanks for your reply. I have the same settings in those three files, except that I commented out the line in /etc/profile. The reason is this: in /usr/lib/man.conf I have
# Every automatically generated MANPATH includes these fields
MANPATH /usr/man
MANPATH /usr/share/man
MANPATH /usr/local/man
MANPATH /usr/local/share/man
MANPATH /usr/X11R6/man
If I leave the line in /etc/profile uncommented, then I lose these five paths, in accordance with man's man. And with it commented out, here's what happens:
bash-3.1$ echo $MANPATH
bash-3.1$ man -w
which satisfactory for me, but seems to contradict the manual. That is, when seeing MANPATH set and not empty, man shouldn't read /usr/lib/man.conf.

Anyways, your post puts it clearly, and that's good enough for me. Thanks again.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MANPATH problem RudraB Linux - General 3 11-27-2009 01:08 AM
Setting MANPATH rcmonroig Linux - Newbie 4 09-23-2009 11:43 PM
syntactically hopeless... Greebstreebling Linux - Software 5 09-23-2007 01:28 PM
MANPATH weirdness johnMG Debian 2 04-04-2006 01:47 PM
Manpath praveenv Linux - Newbie 2 08-28-2004 03:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration