[tex-k] [tex-live] mktexlsr does not include $TEXMFLOCAL when refreshing
George N. White III
gnwiii at gmail.com
Wed Mar 25 13:44:24 CET 2009
On Tue, Mar 24, 2009 at 11:49 AM, R (Chandra) Chandrasekhar
<chandra at ee.uwa.edu.au> wrote:
> Zdenek Wagner wrote:
>> mktexlsr /some/path rebuilds ls-R in /some/path while mktexlsr
>> consults texmf.cnf and rebuilds ls-R in directories listed in
>> TEXMFDBS. Probably "sudo mktexlsr" finds some other mktexlsr, not the
>> one distributed with TeX Live, thus it finds different texmf.cnf and
>> rebuilds ls-R in different directories. Try
>> sudo which mktexlsr
>> It will show you which mktexlsr was used.
> Thank you for your quick reply. What you have pointed out certainly is the
> cause of the reported behaviour.
> sudo which mktexlsr
> whereas the one in the texlive path is at:
> sudo /usr/local/texlive/2008/bin/x86_64-linux/mktexlsr
> does indeed include the $TEXMFLOCAL directory.
> In my .bashrc file, I have:
> PATH=/usr/local/texlive/2008/bin/x86_64-linux:$PATH; export PATH
> MANPATH=/usr/local/texlive/2008/texmf/doc/man:$MANPATH; export MANPATH
> INFOPATH=/usr/local/texlive/2008/texmf/doc/info:$INFOPATH; export INFOPATH
> which mktexlsr
> gives me
> So, it is the sudo that is changing the executable.
> I suspect that I have three options:
> 1. Clear all executables in /usr/bin that have been superseded by those
> installed by by texlive. This is non-standard and difficult because some
> were put in by the kile package and other packages, and although I have
> removed kile for now, some residual packages might remain.
> 2. Ensure that the texlive executables are seen first by the superuser as
> well. Doe this mean that I have to include the above lines in /root/.bashrc
> as well? If so, are there any security implications?
In general, "root" should only be used when necessary. It is quite
practical to administer TL without "root". Somewhere in the documentation
it is mentioned that TL should not be installed by "root". TL binaries
should not be run by "root".
> 3. Explicitly specify the mktexlsr to use by including the full path. This
> seems the neatest option at present.
> I would appreciate advice on what would be the best option.
Don't use "root" for TL. Not only does this avoid the complications
of different paths for su and sudo, it limits the potential damage
of some bug in the rather complex scripts needed to administer
TL. It is very easy to change ownership of the TL directories
to some ordinary user, so even if you installed using "root",
you can change to the recommended configuration later.
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
More information about the tex-k