0

Having installed TeX Live on my system (by downloading and running the script from TUG's website: http://www.tug.org/texlive/acquire-netinstall.html), I tried editing the MANPATH variable by adding the following line in my /etc/environment:

MANPATH=$MANPATH:/usr/local/texlive/2012/texmf/doc/man

(There was no MANPATH entry previously)

However, setting the MANPATH here seems to be overriding the /etc/manpath.config file, and thus the system manual pages are no longer found. Whereas, if I use export in my .bashrc, mandb prepends the content of manpath.config to the exported value.

What is wrong with this syntax? After all, https://help.ubuntu.com/community/EnvironmentVariables does say that /etc/environment is the place for setting system-wide environment variables

The same issue for INFOPATH

Chatterjee
  • 103
  • 3
  • A previous question's answers suggest that variable interpolations like $MANPATH are not supported in /etc/environment: http://askubuntu.com/questions/150789/difference-between-bash-bashrc-and-etc-environment-file . I think you would need to extend /etc/manpath.config itself with your customizations instead of using /etc/environment. – Paul Jun 05 '13 at 04:34
  • @Paul So is manpath.config the only way to go for achieving global persistence (WITHOUT opening the terminal once)? – Chatterjee Jun 05 '13 at 04:41
  • Actually, do you really need a custom installation of texlive in /usr/local in the first place? If you install it using Software Center (or sudo apt-get) instead, then the man pages would go into the default system path and the question of how to update MANPATH would be moot. – Paul Jun 05 '13 at 12:17
  • I wasn't aware of this. sudo apt-get is apparently choosing /usr/local as the default installation directory! – Chatterjee Jun 05 '13 at 21:28
  • Sounds like you may be installing from somebody's PPA. On my system, dpkg -L texlive texlive-base only lists things in /etc, /usr/bin, /usr/share, etc., not /usr/local. Take a look at your software sources: http://askubuntu.com/questions/4983/what-are-ppas-and-how-do-i-use-them – Paul Jun 05 '13 at 22:01
  • I just downloaded and ran the script from TUG's website: http://www.tug.org/texlive/acquire-netinstall.html – Chatterjee Jun 05 '13 at 22:18
  • Could you also add the part on MANPATH not supporting variable interpolation – Chatterjee Jun 06 '13 at 01:48
  • OK sure, why not. – Paul Jun 06 '13 at 03:06

1 Answers1

0

A previous question's answers suggest that variable interpolations like $MANPATH are not supported in /etc/environment: difference between bash.bashrc and /etc/environment file . I think you would need to extend /etc/manpath.config itself with your customizations instead of using /etc/environment.

However, you probably don't need a custom installation of texlive in /usr/local in the first place. If you install it using Software Center (or sudo apt-get) instead, then the man pages would go into the default system path and the question of how to update MANPATH would be moot.

Paul
  • 7,007
  • 3
  • 23
  • 30