Please no: [OS X TeX] set environment variablesforapplications

Gerben Wierda Gerben.Wierda at
Wed May 26 07:04:03 EDT 2004

> Le 25 mai 04, à 23:30, Enrico Franconi a écrit :
> PS At this point you may say: if apps were not designed with
> environments in mind, how can they be affected by environment variables
> set in environment.plist? Possibly they can't, I don't know for sure,
> being no developer. If that's the case, then this entire post is
> pointless, and I apologize. That's not the impression I got, though, by
> reading through the previous posts of this thread.

No worry, your post was essentially correct IMO. It mostly affects any
application that runs subprocesses. It might affect other apps, but this
is unlikely as GUI apps probably will not use the environment but use the
per app defaults system instead.

In answer to Enrico (who is angry at me because I make a point of this and
who is of the opinion that the TeX package's optional changing of the
shell startup PATH variable amounts to the same thing):
- with the exeception of PATH (because it is overridden), a setting in
environment.plist affects the shells started through as well.
- the environment settings in the shell startup files reversely do *not*
affect GUI apps (unless you launch them *from* the shell, which itself is
affected and passes them on except for PATH, but this generally does not
happen and it is a far-fetched scenario for a normal user.

In overview:

environment.plist scenario:
- environment.plist sets PATH and FOO
  - inherits PATH and FOO
    - shell inherits PATH and FOO from
    - shell startup file overrides PATH
      - anything started from a shell inherits FOO from environment.plist
and PATH as set by the shell startup file (including the far fetched
open -a method which then has PATH from shell startup file
and FOO from environment.plist
  - All other GUI apps as well inherit PATH and FOO
    - All subprocesses of GUI apps inherit PATH and FOO (from

shell startup file scenario (set FOO, change PATH):
- No GUI apps inherit FOO and PATH
- Only the shell (as intended) inherit FOO and PATH. Using the far fetched
open -a to start a GUI app (instead of double clicking it) will let the
GUI app inherit the shells changed PATH and set FOO.

- I am not against setting things in environment.plist per se. But I am
against setting things which do not have a general meaning, as it is a
global setting. If you want to set X11 DISPLAY for every process, I think
that is safe enough. But if you set TEXMFMAIN or a changed PATH or stuff
like that, you are going to break things in subprocesses. I do not make
this up, it is already happening and I get the reports. Besides, changing
PATh is dangerous, especially the fink way. Put the fink PATH in
environment.plist and potentially (if it is not protected against it) even
Aple's's pre and postflight installation scripts may start
to use different (possibly trojaned) versions of common unix commands.

But, after all this time, I will protect i-Installer against any
environment setting, drop everything from the inherited environment, set
my own basic environment so that I am free from environment.plist. Tricks
like X11 DISPLAY setting will then not work anymore. And if many people
start settiung different things in environment.plist you will see more and
more apps that *might* use them drop the inheritance of the values because
of the possible problems. After which you lose the function of
environment.plist at all.

Post: <mailto:MacOSX-TeX at>
Please see <> for list
guidelines, information, and LaTeX/TeX resources.

More information about the MacOSX-TeX mailing list