[Xquartz-dev] env variables and launchd problem
Peter Dyballa
Peter_Dyballa at Web.DE
Wed Mar 23 02:50:03 PDT 2011
Am 23.03.2011 um 00:48 schrieb Jeremy Huddleston:
> Why do you find yourself needing ~/.MacOSX/environment at all?
It's so simple (elegant?) and it can be made the single point of
failure. Instead of constantly updating a dozen different files it's
better to update these files once to use the contents of ~/.MacOSX/
environment.plist and then to maintain this file only. The file is
needed to set the environment in which the Mac OS X processes run.
They are not launched via some shell that is configured by its init
files.
It nevertheless allows to override these settings in the init or RC
files for use in shells. And this works instantaneously, no log out
and log in are needed to to make them work. So one can easily develop
improvements of the settings in ~/.MacOSX/environment.plist
>
>>
>> IMO this should not be necessary, because up to Leopard ~/.MacOSX/
>> environment.plist is read when you log in. Then all processes
>> inherit this environment. The X clients are a bit different and
>> used to inherit their environment from X11.app – until recently!
>
> Nope. X11 clients do inherit their environment from X11.app, since
> that's the process that forks and execs them. That has not changed.
Yes, right! The problem is that X11.app now does not inherit the set
environment and passes something not so useful to the X clients. Which
needs to be corrected. Particularly the manner to set / als current
working directory. $HOME is correct.
>
>> The defaults command can be used anywhere else.
>
> NSDefaults have nothing to do with environment variables.
It can be used used this way: setenv LANG `defaults read "$
{HOME}/.MacOSX/environment" LANG`.
--
Greetings
Pete
A blizzard is when it snows sideways.
More information about the Xquartz-dev
mailing list