Re: Re: where does mc find the files it needs?



On Thu, 7 Aug 2003, Hugo Vanwoerkom wrote:

That is obvious, but it doesn't answer my question: where does MC find
its files? You answered where YOU find mc's files, I can do that too.
But how does the tarball mc know its menu is in /usr/local/share/mc and
the Debian mc know that it is in /etc/mc instead and the mkpart mc know
that it is in /usr/lib/mc? We got 3 versions of mc here with 3 different
places for the files, how does mother mc know where to find all this
stuff if I do not see $MC_DATADIR being set?

Sorry for not replying earlier.  I thought someone would answer this
trivial question, but everybody failed to check the manual :-)

If you run "man mc", you can find this:

       -f     Display the compiled-in search paths for Midnight Commander
              files.

Yes, that's what you need:

$ mc -f
/usr/local/share/mc/

Actually, I'm not sure Debian binary would do the right thing - it may be
using both /etc/mc and /usr/share/mc dependent on how likely the file may
need to be modified.

As for the hardcoded paths in the manual, it's a result of a tough choice
between simplicity for ordinary users (who have only one binary) and
explaining the complete algorithm how to find the actual path every time a
file with full path is mentioned.

-- 
Regards,
Pavel Roskin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]