BUG REPORT: OSX: Don't use ~/.MacOSX/environment.plist

Return to Installation

BUG REPORT: OSX: Don't use ~/.MacOSX/environment.plist

Postby jeremyhu » Tue Feb 02, 2010 5:58 pm

I've been working with a user to figure out why his system has become unstable, and the root cause is your software package. You setup a ~/.MacOSX/environment.plist which essentially breaks all the user's LaunchAgents:

$ cat ~/.MacOSX/environment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DYLD_LIBRARY_PATH</key>
<string>/Developer/Panda3D/lib</string>
<key>MAYA_PLUG_IN_PATH</key>
<string>/Developer/Panda3D/plugins</string>
<key>MAYA_SCRIPT_PATH</key>
<string>/Developer/Panda3D/plugins</string>
<key>PATH</key>
<string>/Developer/Tools/Panda3D</string>
<key>PYTHONPATH</key>
<string>/Developer/Panda3D/lib</string>
</dict>
</plist>


1) You are telling launchd to use /Developer/Tools/Panda3D as PATH. This means that no system directories are in PATH, and any other script started by at LaunchAgent will not have access to /usr/bin /bin, etc.

2) Ditto for PYTHONPATH.

3) Do NOT EVER EVER EVER EVER set DYLD_LIBRARY_PATH in a deployment scenario. If you find you need to, then you are doing something ELSE wrong, and setting DYLD_LIBRARY_PATH is NOT the solution.
jeremyhu
 
Posts: 2
Joined: Tue Feb 02, 2010 5:54 pm

Postby rdb » Wed Feb 03, 2010 4:13 am

1+2) Oh, my apologies. I didn't know about that.
Can you check if adding :$PATH to the path setting works?

3) You're right, we don't need it. I simply forgot to remove it before the release. Sorry about that.

Anyways, I'm totally in favor of removing the environment.plist. I'll see what I can do for a future 1.7.1 release.
I don't think its such a big deal for people to add /Developer/Tools/Panda3D/ to their PATH themselves.
rdb
 
Posts: 11144
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby jeremyhu » Wed Feb 03, 2010 11:57 am

If you want to add something to PATH, the way to do it is by creating a file in /etc/paths.d (just like X11 does)
jeremyhu
 
Posts: 2
Joined: Tue Feb 02, 2010 5:54 pm

Postby rdb » Thu Feb 04, 2010 3:38 am

Great, thanks! I didn't know about that one.
rdb
 
Posts: 11144
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands


Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron