Opened 13 years ago

Closed 13 years ago

#29708 closed enhancement (wontfix)

set PATH globally in /etc/launchd.conf

Reported by: sorin.sbarnea@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version:
Keywords: Cc:
Port:

Description

It look that the *only* way to update PATH enviroment on OS X for all users and all kinds of applications (console or GUI) is to modify /et/launchd.conf

Currently macports does not do this.

Refference http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x

Change History (3)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase

The request to update the PATH of all users, instead of just the user who is logged in at the time that MacPorts is installed, is a duplicate of #24930.

The request to update PATH for GUI apps in addition to console apps is new AFAIK. What apps would benefit from this change?

I'm not familiar with /etc/launchd.conf or the implications of using it instead of or in addition to what we already do.

comment:2 Changed 13 years ago by sorin.sbarnea@…

Yesterday I found the first application that was failing to detect hg because the tool was not found in path (PyCharm).

I studied the issue because previously I have similar issues on OS X, and I discovered that the only way to modify the path for the entire system and all applications is /etc/launchd.conf which by the way is empty by default.

The idea is thay GUI application that will want to use a macport installed command will fail if we do not update the PATH for gui applications.

comment:3 Changed 13 years ago by jmroot (Joshua Root)

Resolution: wontfix
Status: newclosed
Summary: macports does not properly change PATH environment on installationset PATH globally in /etc/launchd.conf
Type: defectenhancement
Version: 1.9.2

Changing the environment for all apps is a really bad idea. Anything that assumes that the commands it runs are the Apple-supplied versions will break when the MacPorts ones behave differently. GUI apps shouldn't rely on PATH having a particular value anyway.

Note: See TracTickets for help on using tickets.