Problem changing TEXMFHOME setting

Dan d3vf4n at tutanota.com
Mon Oct 16 19:48:48 CEST 2023



>>     tlmgr conf texmf TEXMFHOME ~/path/to/tree
>>
>
> That should work, and is the recommended way ;-) Unless ....
>
>>  - OS LinuxMint 21.2 (Victoria)
>>  - tlmgr revision 60693 (2021-10-04 04:24:25 +0200)
>>  - tlmgr using installation: /usr/share/texlive
>>  - TeX Live (https://tug.org/texlive) version 2021
>>
>
> Something is messed up in the way Arch does TeX Live packaging.
>
My TeXLive distribution is made up of OS packages installed via the package manager. I have not added, removed or modified anything of the latex distribution.


> With upstream TeX Live in ~/tl/2023:
>
> $ kpsewhich -var-value TEXMFHOME
> /home/norbert/texmf
> $ cat ~/tl/2023/texmf.cnf
> % (Public domain.)
> % This texmf.cnf file should contain only your personal changes from the
> % original texmf.cnf (for example, as chosen in the installer).
> %
> % That is, if you need to make changes to texmf.cnf, put your custom
> % settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than
> % the distributed file (which is .../texlive/YYYY/texmf-dist/web2c/texmf.cnf).
> % And include *only* your changed values, not a copy of the whole thing!
> %
> TEXMFLOCAL = /usr/local/share/texmf
>
In my system, the file containing the definitions of the variables such as TEXMFHOME, TEXMFDIST and the like is "/usr/share/texlive/texmf-dist/web2c/texmf.cnf"; the equivalent of your "~/tl/2023/texmf.cnf".
The root of the distribution is "/usr/share/texlive" (TEXMFROOT), while latex contents are in "/usr/share/texlive/texmf-dist" (TEXMFDIST).


> $ tlmgr conf texmf TEXMFHOME ~/lib/tex
> tlmgr: setting texmf TEXMFHOME to /home/norbert/lib/tex (in /home/norbert/tl/2023/texmf.cnf)
>
> $ kpsewhich -var-value TEXMFHOME
> /home/norbert/lib/tex
>
> tlmgr conf texmf writes into TEXMFROOT/texmf.cnf
> This seems to not be writable, or it is in a strange place.
>
Yes, indeed, it writes to the file "texmf.cnf" in the root of the texlive distribution. In my case, it is not writable (/usr/share/texlive/texmf-dist/texmf.cnf), so I must call the program with superuser privileges: either with "doas" or "sudo". This is how I do it
    $ doas tlmgr conf texmf TEXMFHOME '~/texmf/texmf-custom'
This is the output in the terminal
    (running on Debian, switching to user mode!)
    (see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)
    tlmgr: setting texmf TEXMFHOME to ~/texmf/texmf-custom (in /usr/share/texlive/texmf.cnf)
The variable is actually written to the file "/usr/share/texlive/texmf.cnf"
    $ cat /usr/share/texlive/texmf.cnf
    TEXMFHOME = ~/texmf/texmf-custom
Despite this, the actual value of the variable does not change
    $ kpsewhich -var-value=TEXMFHOME
    /home/my-user/texmf

For some reason the change made via tlmgr to the variable TEXMFHOME is ignored, and I cannot make out why.
For now I am setting the variable through an environment variable (in ~/.bashrc) and works, but I would prefer to manage any change via the tlmgr instead of adding environment variables.

Any ideas or suggestions on why this happens?
Thank you in advance.

Regards,


Dan.



More information about the tex-live mailing list.