[Tex/LaTex] $TEXMFHOME setting

environment-variables

I use texlive 2012 on ubuntu 12.04.
I wanted my ~/texmf folder invisible, so I edited my texmf.cnf file which is in /usr/local/texlive/2012 directory:

TEXMFHOME = ~/.texmf

I rebooted my computer and ran the command

kpsewhich -var-value TEXMFHOME

which gave me /home/myusrname/texmf.
I checked texmf.cnf file again and it still had the line above.
And my TEXMFHOME really is ~/texmf because I tested one of my .sty file under/.textmf and it did not work, while it still worked under ~/texmf.

Should I change something else to change my TEXMFHOME?

Best Answer

In Ubuntu:

$ kpsewhich -var-value TEXMFHOME
/home/gpoo/texmf
$ export TEXMFHOME=$HOME/.texmf
$ kpsewhich -var-value TEXMFHOME
/home/gpoo/.texmf

You can export the variable in your .bashrc file as:

if [ -d ~/.texmf ] ; then
    export TEXMFHOME=~/.texmf
fi
Related Question