Re: Environment Variables when Launching X11.app
Re: Environment Variables when Launching X11.app
- Subject: Re: Environment Variables when Launching X11.app
- From: Zac Durham <email@hidden>
- Date: Thu, 7 Jan 2010 14:49:31 -0500
Doug,
Thanks for the response. I've been reading the article from Apple about
.MacOS/environment.plist, as this applies to all applications that are
launched by WindowServer-including, here, X11.app. I believe my
solution lies here but I do not understand what to use for key and
string values in a plist as they pertain to UNIX env variables. Much
less, I still don't understand what role g-s-d has with respect to UNIX env variables.
Interestingly enough, the other day I wondered what effect creating an AppleScript application that included '
do shell script 'startx'' would have, but much to my dismay, it yields the same result. Sure, it launches X11.app, but none of the gnome settings are persistent from session to session using that method either. The only thing I can think of is that the AppleScript app itself also is governed by the aforementioned plist.
So, at this point, if anyone else has any idea about this problem or can provide an example of how the plist should look to consider UNIX environment variables, I am all ears. Thank you for the discussion so far.
Zac Durham
On Thu, Jan 7, 2010 at 1:55 PM, Doug McNutt
<email@hidden> wrote:
At 10:57 -0500 1/7/10, Jeremy Huddleston wrote:
>No, there is nothing really special about "Apple" apps. Binaries built for darwin follow the same inheritance rules as any other UNIX.
>The correct thing to do is something like this:
>
>mkdir ~/.xinitrc.d
>cat > ~/.xinitrc.d/gnome.sh <<EOF
># make the freedesktop menu entries work
>export XDG_DATA_DIRS=/opt/local/share
>export XDG_DATA_HOME=/opt/local/share
>export XDG_CONFIG_DIRS=/opt/local/etc/xdg
>
># enable sound
>export ESPEAKER=localhost
I'm stuck on OSX version 10.3.9 where X11 has a whole lot of problems but I long ago learned that one needs a file:
$HOME/.MacOSX/environment.plist
in which one can define environment variables that make it to UNIXy applications as a real environment. The AppleScript editor and "do shell script" are notorious for ignoring UNIX shell startup scripts and any $PATH you might set there. Apple has published a note about the plist format for environment.plist.
Be aware though that environment.plist is read at log in to aqua and not whenever you start up a shell or xterm. Also watch out for system-wide shell startup files in /etc that may override a $PATH variable you set up in environment.plist.
--
--> Halloween == Oct 31 == Dec 25 == Christmas <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden