Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
A previous question's answers suggest that variable interpolations like $MANPATH are not supported in /etc/environment: askubuntu.com/questions/150789/… . I think you would need to extend /etc/manpath.config itself with your customizations instead of using /etc/environment. –  Paul Jun 5 '13 at 4:34
    
@Paul So is manpath.config the only way to go for achieving global persistence (WITHOUT opening the terminal once)? –  Chatterjee Jun 5 '13 at 4: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 5 '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 5 '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: askubuntu.com/questions/4983/… –  Paul Jun 5 '13 at 22:01

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.