LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-30-2011, 08:34 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

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


Kernel 2.6.21.5, Slackware 12.0

Hi:
Code:
$ echo $MANPATH
:/usr/lib/java/man:/usr/share/texmf/man
$
Is this path syntactically correct? I ask 'cause a colon is the first character. Thanks.
 
Old 05-30-2011, 09:56 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

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.

/etc/profile
Code:
# Set the values for some environment variables:
export MANPATH=/usr/local/man:/usr/man
---snip---
# 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
  fi
done
unset profile_script
It then appends any additional MANPATH in /etc/profile.d:

jre.sh
Code:
#!/bin/sh
export MANPATH="${MANPATH}:${JAVA_HOME}/man"
tetex.sh
Code:
#!/bin/sh
MANPATH="$MANPATH:/usr/share/texmf/man"
So resulting MANPATH is:

Quote:
$ echo $MANPATH
/usr/local/man:/usr/man:/usr/lib64/java/man:/usr/share/texmf/man
 
Old 05-31-2011, 04:40 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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
Code:
# 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:
Code:
bash-3.1$ echo $MANPATH
:/usr/lib/java/man:/usr/share/texmf/man
bash-3.1$ man -w
/usr/local/share/man:/usr/share/man:/usr/man:/usr/lib/java/man:/usr/share/texmf/man:/usr/local/man:/usr/X11R6/man
bash-3.1$
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.
 
  


Reply



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 12:08 AM
Setting MANPATH rcmonroig Linux - Newbie 4 09-23-2009 10:43 PM
syntactically hopeless... Greebstreebling Linux - Software 5 09-23-2007 12:28 PM
MANPATH weirdness johnMG Debian 2 04-04-2006 12:47 PM
Manpath praveenv Linux - Newbie 2 08-28-2004 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:53 PM.

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