LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-04-2006, 12:28 PM   #1
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
MANPATH weirdness


I keep an ~/opt directory for local software installs. It's got an ~/opt/local/man directory in it, along with some man pages (for example, nedit.man and nc.man).

I'm trying to set my MANPATH to include /home/john/opt/local/man, but although the environment variable is getting set, man still won't find those man pages. That is, if I set my MANPATH like so:
Code:
export MANPATH=/home/john/opt/local/man:$MANPATH
I still can't just run "man nc" to get that man page (I've got to use the -l option and specify the full path to that man page).

Also confusing is this: why does the default .bash_profile use the shell syntax:
Code:
MANPATH=~/man${MANPATH:-:}
?

That ${MANPATH:-:} means (according to the bash man page) to put in $MANPATH, or else, if $MANPATH isn't set, to just put in a colon. (?) That looks like a bug to me...

Finally -- and this seems pretty weird -- if I do:
Code:
export MANPATH=/home/john/opt/local/man
then man can no longer find any of its pages. Even though, previously, $MANPATH was empty!

Can anyone explain this weirdness?

Thanks.
 
Old 04-04-2006, 12:39 PM   #2
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Original Poster
Rep: Reputation: 32
Ok, well, for one thing, I now see from manpath(1) that the extra colon in my $MANPATH is significant, so there is method to the ${MANPATH:-:} madness.

Last edited by johnMG; 04-04-2006 at 12:47 PM.
 
Old 04-04-2006, 12:47 PM   #3
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Original Poster
Rep: Reputation: 32
Alright. If I set MANPATH in ~/.bash_profile like so
Code:
export MANPATH=/home/john/opt/local/man${MANPATH:-:}
then the output of the manpath command tells me:
Code:
manpath: warning: $MANPATH set, appending /etc/manpath.config
/home/john/opt/local/man:/home/john/opt/local/man:/usr/local/man:/usr/local/share/man:/usr/share/man:/usr/X11R6/man
Note that it's showing /home/john/opt/local/man *twice*. Very odd...
 
  


Reply


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
Firefox weirdness Slagazor Linux - Software 3 04-17-2005 01:17 PM
Manpath praveenv Linux - Newbie 2 08-28-2004 02:21 AM
Grub weirdness czarherr Red Hat 1 05-26-2004 12:23 PM
Synaptic Weirdness chris319 Linux - Software 2 09-05-2003 11:43 PM
please help: mouse weirdness JamesM Slackware 2 08-12-2003 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:33 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