LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 06-09-2010, 05:09 PM   #16
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,224

Original Poster
Rep: Reputation: 49
The more I know the more I seem to ignore.


Before the whole thing began, echo $MANPATH output four elements (paths): path1,...,path4. I edited /etc/profile and removed the MANPATH statement, which contains path1 and path2. I rebooted, and I see echo $MANPATH outputs only path3 and path4. OK. But running man mplayer, I get the manual! This seems to contradict man's manual, which says that /usr/lib/man.conf won't be read if MANPATH is not empty (or unset). (Only in man.conf does the path of the mplayer manual appears.) Anybody explains me (maybe I'd say teach me)?
 
Old 06-09-2010, 06:35 PM   #17
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,950

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Doh, you're right. According to the man manpage:
Quote:
If MANPATH is set, man uses it as the path to search for manual page files. It overrides the configuration file and the automatic search path, but is overridden by the -M invocation option.
it shouldn't happen.
I guess this is because the new MANPATH starts with a ":" in case you comment it out from /etc/profile, e.g in my box (running Slack64), it's
Code:
:/usr/lib64/java/man:/usr/lib64/java/man:/usr/share/texmf/man
Running
Code:
man -w
it gives:
Quote:
/usr/local/share/man:/usr/share/man:/usr/man:/usr/lib64/java/man:/usr/share/texmf/man:/usr/local/man:/usr/X11R6/man
so apparently it uses man.conf.
You should also read the "SEARCH PATH FOR MANUAL PAGES" part of the man manpage.

BTW you don't need to reboot after editing /etc/profile. You can logout/login again, or run
Code:
source /etc/profile
to use the new settings.

Regards
 
Old 06-09-2010, 09:31 PM   #18
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,224

Original Poster
Rep: Reputation: 49
Identical thing happens in my box:
# echo $MANPATH
:/usr/lib/java/man:/usr/share/texmf/man
# man -w
/usr/local/share/man:/usr/man:/usr/lib/java/man:/usr/share/texmf/man:/usr/local/man:/usr/X11R6/man

It seems to be true that "man uses a SOPHISTICATED method of finding manual page files" (man manpage, SEARCH PATH FOR MANUAL PAGES). Well, I think that removal of the MANPATH statement from /etc/profile, will not modify the system behavior except in allowing me quick access to the mplayer manpage. All the more so that the two elements contained in the MANPATH statement in /etc/profile are already contained in /usr/lib/man.conf.

Thanks, bathory, and I expect soon to be able to close this thread before it grows longer than it is worth.
 
Old 07-02-2010, 07:52 AM   #19
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,224

Original Poster
Rep: Reputation: 49
The solution.

SLACKWARE 12.0 distro:


Then, this is the current state of the system:
Code:
root@darkstar:~# locate mplayer.1
/usr/local/share/man/man1/mplayer.1

From /etc/profile (the line was commented by me):
#export MANPATH=/usr/local/man:/usr/man

From /usr/lib/man.conf
MANPATH /usr/man
MANPATH /usr/share/man
MANPATH /usr/local/man
MANPATH /usr/local/share/man
MANPATH /usr/X11R6/man
#
MANPATH_MAP     /bin                    /usr/share/man
MANPATH_MAP     /sbin                   /usr/share/man
MANPATH_MAP     /usr/bin                /usr/share/man
MANPATH_MAP     /usr/sbin               /usr/share/man
MANPATH_MAP     /usr/local/bin          /usr/local/share/man
MANPATH_MAP     /usr/local/sbin         /usr/local/share/man
MANPATH_MAP     /usr/X11R6/bin          /usr/X11R6/man
MANPATH_MAP     /usr/bin/X11            /usr/X11R6/man
MANPATH_MAP     /usr/bin/mh             /usr/share/man
#
Current path used by man:
root@darkstar:/etc# 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
Current MANPATH enviroment variable contents:
root@darkstar:/etc# echo $MANPATH
:/usr/lib/java/man:/usr/share/texmf/man
Notice the ':' starting the line, as pointed out by bathory.
The mplayer installer did this:
Allocated its man file in /usr/local/share/man/man1/mplayer.1. Then it modified /etc/profile, adding the line
MANPATH /usr/local/share/man/man1

I think, if 'man mplayer' did not output the manual it was due to strange behaviour on the part of man and its path searching mechanism, and the mplayer installer is not to be blamed. These are notes to myself rather than any other thing. Anyways,

The solution:
I commented out the line 'export MANPATH=/usr/local/man:/usr/man'

Now 'man mplayer' outputs the manual. Of course, this is only one of several possible fixes and could not be done without the generous help of LQers. Regards.

Last edited by stf92; 07-02-2010 at 09:32 AM.
 
  


Reply

Tags
man


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
find: paths must precede expression -- already checked google/man/faqs escalf Programming 5 03-02-2010 11:12 AM
waht file have paths for man? man.conf? where? xcore_on Linux - Newbie 4 05-23-2006 10:38 AM
man alsamixer not showing the man page nosaku Slackware 1 12-20-2004 09:52 AM
How to quit man (less) and keep man info on screen? peb Linux - Newbie 7 03-25-2004 11:02 PM
Compiling packages on RH 7.1 causes man files to be named man.gz mmboam Linux - General 0 05-09-2001 07:47 PM


All times are GMT -5. The time now is 10:24 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration