<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Upgraded to Leopard : Making use of /etc/paths.d and path_helper</title>
	<atom:link href="http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/feed/" rel="self" type="application/rss+xml" />
	<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/</link>
	<description>Just a little square in a sea of blogs</description>
	<lastBuildDate>Tue, 09 Aug 2011 19:26:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Timo Meinen</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-127</link>
		<dc:creator>Timo Meinen</dc:creator>
		<pubDate>Tue, 19 Jan 2010 08:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-127</guid>
		<description>You can just erase the default PATH entry before path_helper is called like this:

if [ -x /usr/libexec/path_helper ]; then
	PATH=&quot;&quot;
	eval `/usr/libexec/path_helper -s`
fi

Then you have full control in /etc/paths and /etc/paths.d. Do this in

/etc/profile
/etc/csh.login
/etc/zprofile</description>
		<content:encoded><![CDATA[<p>You can just erase the default PATH entry before path_helper is called like this:</p>
<p>if [ -x /usr/libexec/path_helper ]; then<br />
	PATH=&#8221;"<br />
	eval `/usr/libexec/path_helper -s`<br />
fi</p>
<p>Then you have full control in /etc/paths and /etc/paths.d. Do this in</p>
<p>/etc/profile<br />
/etc/csh.login<br />
/etc/zprofile</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bledsoe</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-126</link>
		<dc:creator>John Bledsoe</dc:creator>
		<pubDate>Thu, 07 Jan 2010 04:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-126</guid>
		<description>In Snow Leopard, moving &quot;/usr/local/bin&quot; to the top in &quot;/etc/paths&quot; now works without modifying &quot;/etc/profile&quot;.</description>
		<content:encoded><![CDATA[<p>In Snow Leopard, moving &#8220;/usr/local/bin&#8221; to the top in &#8220;/etc/paths&#8221; now works without modifying &#8220;/etc/profile&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reid Ellis</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-125</link>
		<dc:creator>Reid Ellis</dc:creator>
		<pubDate>Thu, 12 Mar 2009 16:38:05 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-125</guid>
		<description>Something to note is that the starting path is read from ~/.MacOSX/environment.plist which you can manipulate:

defaults read ~/.MacOSX/environment PATH

defaults write ~/.MacOSX/environment PATH &quot;$PATH&quot;</description>
		<content:encoded><![CDATA[<p>Something to note is that the starting path is read from ~/.MacOSX/environment.plist which you can manipulate:</p>
<p>defaults read ~/.MacOSX/environment PATH</p>
<p>defaults write ~/.MacOSX/environment PATH &#8220;$PATH&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renato</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-124</link>
		<dc:creator>Renato</dc:creator>
		<pubDate>Sat, 02 Aug 2008 20:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-124</guid>
		<description>I had also the problem of wanting /usr/local/bin be first in the path before the defaults. My issue was that I wanted to override a default install of svn and use a newer installed in /usr/local/bin. But the problem is the same as for you.

I played around w/ &quot;/etc/path.d&quot; and edited &quot;/etc/paths&quot; itself adding always &quot;/usr/local/bin/&quot; on top but it would always get listed after the defaults. 

I looked at &quot;/etc/paths&quot; and found the following entries:
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

I had in &quot;/etc/paths.d/&quot; only the file &quot;X11&quot; which contained one line: &quot;/usr/X11/bin/&quot;
doing a &quot;set&quot; or &quot;echo $PATH&quot; from the command line would return:
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

So it was clear (also explained in the man page for path_helper) that the content of of the paths.d directory would always be appended to what was found in &quot;paths&quot; itself.

I placed &quot;/usr/local/bin&quot; at top of paths but the order didn&#039;t change. I logged out and back in and even rebooted to make sure there is nothing else causing this behavior but it always remained in the same order. 

If I removed &quot;/usr/local/bin&quot; it was gone from the path but the rest stayed as is.
I had the suspicion that the content of &quot;/etc/paths&quot; didn&#039;t really matter for the default entries of &quot;/usr/bin:/bin:/usr/sbin:/sbin&quot; and took them completely out of &quot;/etc/paths&quot; and logged into another shell to prove it. And sure enough, even w/o the entries the path variable was the same. 
Therefore here is the order it apparently uses when it calls &quot;path_helper&quot; from /etc/profile at login:
1) System defaults
2) /etc/paths content aside system defaults
3) /etc/paths.d/ content
Apple wanted apparently to play save and not allow users to override system defaults and evtl. cripple the system. 

I finally solved the problem by adding 
export PATH=/usr/local/bin/:$PATH;

before the path_helper call in /etc/profile:
if [ -x /usr/libexec/path_helper ]; then
        eval `/usr/libexec/path_helper -s`
fi

Now &quot;/usr/local/bin&quot; is searched first</description>
		<content:encoded><![CDATA[<p>I had also the problem of wanting /usr/local/bin be first in the path before the defaults. My issue was that I wanted to override a default install of svn and use a newer installed in /usr/local/bin. But the problem is the same as for you.</p>
<p>I played around w/ &#8220;/etc/path.d&#8221; and edited &#8220;/etc/paths&#8221; itself adding always &#8220;/usr/local/bin/&#8221; on top but it would always get listed after the defaults. </p>
<p>I looked at &#8220;/etc/paths&#8221; and found the following entries:<br />
/usr/bin<br />
/bin<br />
/usr/sbin<br />
/sbin<br />
/usr/local/bin</p>
<p>I had in &#8220;/etc/paths.d/&#8221; only the file &#8220;X11&#8243; which contained one line: &#8220;/usr/X11/bin/&#8221;<br />
doing a &#8220;set&#8221; or &#8220;echo $PATH&#8221; from the command line would return:<br />
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin</p>
<p>So it was clear (also explained in the man page for path_helper) that the content of of the paths.d directory would always be appended to what was found in &#8220;paths&#8221; itself.</p>
<p>I placed &#8220;/usr/local/bin&#8221; at top of paths but the order didn&#8217;t change. I logged out and back in and even rebooted to make sure there is nothing else causing this behavior but it always remained in the same order. </p>
<p>If I removed &#8220;/usr/local/bin&#8221; it was gone from the path but the rest stayed as is.<br />
I had the suspicion that the content of &#8220;/etc/paths&#8221; didn&#8217;t really matter for the default entries of &#8220;/usr/bin:/bin:/usr/sbin:/sbin&#8221; and took them completely out of &#8220;/etc/paths&#8221; and logged into another shell to prove it. And sure enough, even w/o the entries the path variable was the same.<br />
Therefore here is the order it apparently uses when it calls &#8220;path_helper&#8221; from /etc/profile at login:<br />
1) System defaults<br />
2) /etc/paths content aside system defaults<br />
3) /etc/paths.d/ content<br />
Apple wanted apparently to play save and not allow users to override system defaults and evtl. cripple the system. </p>
<p>I finally solved the problem by adding<br />
export PATH=/usr/local/bin/:$PATH;</p>
<p>before the path_helper call in /etc/profile:<br />
if [ -x /usr/libexec/path_helper ]; then<br />
        eval `/usr/libexec/path_helper -s`<br />
fi</p>
<p>Now &#8220;/usr/local/bin&#8221; is searched first</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamil Kisiel</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-123</link>
		<dc:creator>Kamil Kisiel</dc:creator>
		<pubDate>Mon, 14 Jul 2008 21:37:08 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-123</guid>
		<description>Lorin: You can add paths to /etc/paths instead, if you care about the order.</description>
		<content:encoded><![CDATA[<p>Lorin: You can add paths to /etc/paths instead, if you care about the order.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lorin Rivers</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-122</link>
		<dc:creator>Lorin Rivers</dc:creator>
		<pubDate>Tue, 24 Jun 2008 20:11:03 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-122</guid>
		<description>What&#039;s wacky about this whole scheme is that you have no control over load order, so if you (for example) use MacPorts, how do make /opt/local/bin be the first part of your $PATH?</description>
		<content:encoded><![CDATA[<p>What&#8217;s wacky about this whole scheme is that you have no control over load order, so if you (for example) use MacPorts, how do make /opt/local/bin be the first part of your $PATH?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-121</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Wed, 23 Apr 2008 00:35:21 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-121</guid>
		<description>Nevermind that previous comment...like a previous poster mentioned path helper is automatically initialized in the /etc/profile</description>
		<content:encoded><![CDATA[<p>Nevermind that previous comment&#8230;like a previous poster mentioned path helper is automatically initialized in the /etc/profile</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-120</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Wed, 23 Apr 2008 00:29:11 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-120</guid>
		<description>I used a vanilla (unmodified) /etc/profile as it is read only for me, and just added a nice little test file called cdrtools to /etc/paths.d and it worked like a charm! All I had to do was restart my terminal app (opening a new tab would have done the trick as well I assume.

Thanks!</description>
		<content:encoded><![CDATA[<p>I used a vanilla (unmodified) /etc/profile as it is read only for me, and just added a nice little test file called cdrtools to /etc/paths.d and it worked like a charm! All I had to do was restart my terminal app (opening a new tab would have done the trick as well I assume.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jürgen</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-119</link>
		<dc:creator>Jürgen</dc:creator>
		<pubDate>Mon, 07 Apr 2008 19:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-119</guid>
		<description>Thanks for your post! I helped me a lot.</description>
		<content:encoded><![CDATA[<p>Thanks for your post! I helped me a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ajordens</title>
		<link>http://littlesquare.com/2008/01/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-118</link>
		<dc:creator>ajordens</dc:creator>
		<pubDate>Mon, 03 Mar 2008 08:03:50 +0000</pubDate>
		<guid isPermaLink="false">http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/#comment-118</guid>
		<description>I agree that it&#039;s not that much of a difference but you will only be hard-coding the paths in one location.

Personally (and prior to using paths.d in Leopard) I&#039;d just do my all my exports and PATH setup in the /etc/profile or .bash_profile directly.

For a lot of frameworks, you will need to define a FRAMEWORK_HOME environment variable in addition to simply including it on the path.  In these situations, I&#039;d argue there&#039;s a slight benefit.

And I agree w/ your suggestion to Guillaume, that&#039;s a pretty standard approach to separating your VMs and is something Apple and the various Linux distros having been doing for awhile (/etc/alternatives/java, etc.).</description>
		<content:encoded><![CDATA[<p>I agree that it&#8217;s not that much of a difference but you will only be hard-coding the paths in one location.</p>
<p>Personally (and prior to using paths.d in Leopard) I&#8217;d just do my all my exports and PATH setup in the /etc/profile or .bash_profile directly.</p>
<p>For a lot of frameworks, you will need to define a FRAMEWORK_HOME environment variable in addition to simply including it on the path.  In these situations, I&#8217;d argue there&#8217;s a slight benefit.</p>
<p>And I agree w/ your suggestion to Guillaume, that&#8217;s a pretty standard approach to separating your VMs and is something Apple and the various Linux distros having been doing for awhile (/etc/alternatives/java, etc.).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

