1

I am currently giving a LaTeX course for students. Most linux users have TeX Live 2009 installed which is much too old, since I want to use biblatex and biber. If they install TeX Live from the website they can not access it because the PATH is not set up correctly.

I now found out that one can solve this by adding the PATH

PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH 

to .bashrc and .profile. However I wonder if this could be configured for all users?

Furthermore I have a problem with the mac users. pdflatex starts from within TeXShop, but is not found from any other editor. We use TeXstudio for example. Any hint what could be wrong there?

  • 1
    see my answer: http://tex.stackexchange.com/questions/8603/how-to-configure-kile-in-texlive-2010 –  Oct 25 '11 at 07:12
  • Do you use MacTeX on the Mac? (http://www.tug.org/mactex/2011/) This is the modification of TeX Live for Mac. – Legolas Oct 25 '11 at 07:31
  • 1
    @Herbert: Your answer at http://tex.stackexchange.com/questions/27922/setting-the-path-to-textlive-installation-round-2/27934#27934 is better (the other answer has uname -i in it). – Andrew Stacey Oct 25 '11 at 08:31
  • @Legolas: I have not mac, and I would have to ask the student, but i assume that mactex is installed. – Matthias Pospiech Oct 25 '11 at 08:57

3 Answers3

5

To make that global, you have to configure it globally. As root, add the PATH statement either:

  • to a file under /etc/profile.d (if that directory exists), as Herbert suggests, or
  • to /etc/profile

This actually turns out to be a Unix question.

MPi
  • 570
  • For OSX you should add the paths as a set of symlinks in /etc/paths.d and /etc/manpaths.d. With FreeBSD and other Unices, you have to do something different again... – Charles Stewart Oct 25 '11 at 09:08
  • @CharlesStewart On the other hand, MacTeX does this during its installation. – egreg Oct 25 '11 at 12:53
  • 1
    @CharlesStewart The paths in /etc/paths.d aren't symbolic links. They are just snippets of text that get appended to the main path. MacTeX creates the file /usr/paths.d/TeX which contains simply the string "/usr/texbin". – Alan Munn Oct 25 '11 at 13:47
  • @Alan: Ah, it has been a long time since I messed about with that. It is just the same as /etc/profile.d, except of course OSX has to be gratuitously different. Thanks for the correction. – Charles Stewart Oct 26 '11 at 11:56
  • @egreg: I've use Texlive with Macs, not Mactex, because I don't like the idea of having to learn a whole different file hierarchy and configuration behaviour to my Linux boxes. – Charles Stewart Oct 26 '11 at 11:59
  • 1
    @CharlesStewart There is no different file hierarchy: MacTeX installs TeX Live in /usr/local/texlive/<year> exactly like it's on Linux boxes (with manual installation) and it does automatic configuration for all users. – egreg Oct 26 '11 at 12:08
  • @egreg: Ah, then I should take a look. What does "automatic configuration for all users" mean? – Charles Stewart Oct 26 '11 at 12:13
  • @CharlesStewart It means doing the proper additions to PATH and MANPATH that are accomplished in a different way than on GNU/Linux (Mac OS X is BSD-based). – egreg Oct 26 '11 at 12:19
1

Since all machines run Unix/Linux, you can also do a shared NFS install: Install TL once on a server and share the installation via NFS. OpenSUSE has a package for that (texlive-nfs), TL2011 is somewhere in factory.

  • The university has no centralized server system for students and if I configure such a server it will be available within my institute, but not for the students. Anyway I would like to have something that works on the computer of the students not only within the university network. – Matthias Pospiech Oct 25 '11 at 11:12
1

On Linux I'd suggest to include the necessary paths to the /etc/environment file. You have to edit that file as root. Here is mine:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/texlive/2011/bin/x86_64-linux"
MANPATH="/usr/local/texlive/2011/texmf/doc/man"
INFOPATH="/usr/local/texlive/2011/texmf/doc/info"

Note that you'll may have problems updating TeX Live with tlmgr. Use the env command to change running environment for tlmgr. For example:

sudo env PATH="$PATH" tlmgr --gui

For the tlmgr GUI probably you'll have to install Perl/Tk.

szantaii
  • 4,719
  • 2
  • 36
  • 51