<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: How do I execute this command at start up in OS X?</title>
	<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X/</link>
	<description>Comments on Ask MetaFilter post How do I execute this command at start up in OS X?</description>
	<pubDate>Thu, 13 Dec 2007 14:43:24 -0800</pubDate>
	<lastBuildDate>Thu, 13 Dec 2007 14:43:24 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: How do I execute this command at start up in OS X?</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X</link>	
		<description>OS X-filter: I&apos;ve been searching but having a hard time finding an answer anywhere. I have a command I put into the terminal each time I boot my Mac that disables some third party firewall I can&apos;t find to delete. I&apos;d like a shell script that would launch and just execute the command each time I start up my computer. &lt;br /&gt;&lt;br /&gt; I&apos;ve made a script.sh file and put it in the &quot;start up items&quot;, but it just launches my text editor. heh.&lt;br&gt;
&lt;br&gt;
So what&apos;s the best way to execute something like:&lt;br&gt;
&lt;br&gt;
sudo ipfw add 0 deny udp from any to any 4550&lt;br&gt;
&lt;br&gt;
when I start up, friends?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.78590</guid>
		<pubDate>Thu, 13 Dec 2007 14:31:21 -0800</pubDate>
		<dc:creator>mattoly</dc:creator>
		
			<category>OSX</category>
		
			<category>startup</category>
		
			<category>unix</category>
		
	</item> <item>
		<title>By: spaceman_spiff</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1166444</link>	
		<description>How did you edit it?  Is it possible that it&apos;s actually script.sh.txt, and the .txt isn&apos;t showing?  If you know how to use vi or emacs, try using that instead; otherwise, use nano (just run &quot;nano&quot; at the command line - it&apos;s pretty self-explanatory).  Also, check that it&apos;s executable - &quot;chmod a+x script.sh&quot; should do it, I think.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1166444</guid>
		<pubDate>Thu, 13 Dec 2007 14:43:24 -0800</pubDate>
		<dc:creator>spaceman_spiff</dc:creator>
	</item><item>
		<title>By: ook</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1166461</link>	
		<description>The google search term you&apos;re looking for is &quot;launchd&quot; -- you&apos;ll find lots of tutorials for creating a launchd plist by hand, or there&apos;s apparently a shareware &lt;a href=&quot;http://www.codepoetry.net/products/launchdeditor&quot;&gt;gui&lt;/a&gt; you can use (which I haven&apos;t tried personally).</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1166461</guid>
		<pubDate>Thu, 13 Dec 2007 14:52:20 -0800</pubDate>
		<dc:creator>ook</dc:creator>
	</item><item>
		<title>By: mrzarquon</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1166469</link>	
		<description>You need to create a launchd item to check run the script at boot. It involves creating a file in /Library/LaunchDaemons/ which will call your script at boot time. You can read up on it &lt;a href=&quot;http://www.afp548.com/article.php?story=20050620071558293&quot;&gt;here&lt;/a&gt;. This is the &apos;good&apos; way to do it.&lt;br&gt;
&lt;br&gt;
Also check /System/Library/LaunchDaemons or /Library/LaunchDaemons as the firewall that you are looking to bypass would have had to install itself there in order to launch at start also. (if it is not in startup items either).&lt;br&gt;
&lt;br&gt;
Also the command runs at root via launchdaemons, so you don&apos;t need the sudo command.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1166469</guid>
		<pubDate>Thu, 13 Dec 2007 14:56:35 -0800</pubDate>
		<dc:creator>mrzarquon</dc:creator>
	</item><item>
		<title>By: DJWeezy</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1166503</link>	
		<description>I can;t provide a exemplary answer but i setup a coworkers computer to start synergy on startup and i remember it took me like 2.5 hours of googling and script work to set it up.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1166503</guid>
		<pubDate>Thu, 13 Dec 2007 15:19:45 -0800</pubDate>
		<dc:creator>DJWeezy</dc:creator>
	</item><item>
		<title>By: churl</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1166539</link>	
		<description>Would it work to do it this way?&lt;br&gt;
- open a new text file in TextEdit, convert to plaintext (Format -&amp;gt; Make Plain Text)&lt;br&gt;
- paste &lt;i&gt;sudo ipfw add 0 deny udp from any to any 4550&lt;/i&gt; into it&lt;br&gt;
- save as &lt;b&gt;whatever.txt&lt;/b&gt;&lt;br&gt;
- in the finder, rename it to &lt;b&gt;whatever.command&lt;/b&gt; (making sure it&apos;s not actually &quot;whatever.command.txt&quot; with the extension hidden)&lt;br&gt;
- drag-and-drop &lt;b&gt;whatever.command&lt;/b&gt; to your login items (System Preferences -&amp;gt; Accounts -&amp;gt; Login Items)&lt;br&gt;
&lt;br&gt;
&lt;small&gt;Unrelated; DJWeezy I was really confused that you had so much trouble auto-starting Synergy until I realized you probably meant &lt;a href=&quot;http://synergy2.sourceforge.net/&quot;&gt;this synergy&lt;/a&gt; and not &lt;a href=&quot;http://wincent.com/a/products/synergy-classic/&quot;&gt;this synergy&lt;/a&gt;.&lt;/small&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1166539</guid>
		<pubDate>Thu, 13 Dec 2007 16:13:59 -0800</pubDate>
		<dc:creator>churl</dc:creator>
	</item><item>
		<title>By: singingfish</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1166651</link>	
		<description>Lingon (google it) is a gui for creating launchd items.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1166651</guid>
		<pubDate>Thu, 13 Dec 2007 18:04:36 -0800</pubDate>
		<dc:creator>singingfish</dc:creator>
	</item><item>
		<title>By: mattoly</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1166728</link>	
		<description>Thanks everyone, this helped. I got it working. :)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1166728</guid>
		<pubDate>Thu, 13 Dec 2007 19:02:56 -0800</pubDate>
		<dc:creator>mattoly</dc:creator>
	</item><item>
		<title>By: AmbroseChapel</title>
		<link>http://ask.metafilter.com/78590/How-do-I-execute-this-command-at-start-up-in-OS-X#1168833</link>	
		<description>Call me crazy, but:&lt;br&gt;
&lt;br&gt;
&lt;em&gt;&lt;strong&gt;&amp;gt;some third party firewall I can&apos;t find to delete&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
you installed a third-party firewall on your Mac and now you don&apos;t know how to delete it? Wouldn&apos;t you rather have our help with that instead?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.78590-1168833</guid>
		<pubDate>Sat, 15 Dec 2007 18:13:28 -0800</pubDate>
		<dc:creator>AmbroseChapel</dc:creator>
	</item>
	</channel>
</rss>
