<?xml version="1.0" encoding="UTF-8"?>

<rss version='2.0' 
     xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
     xmlns:doap="http://usefulinc.com/ns/doap#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

    <channel>
        <!-- This XML Feed shows details for the page launchd 
             and everything recently tagged launchd -->
        <creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/
          </creativeCommons:license>
        <title>launchd on SWiK</title>
		<link>http://swik.net/launchd</link>
        <doap:name>launchd</doap:name>
        <doap:description></doap:description>
        <description></description> 
	  <!-- see doap:description for full description -->
        <link>http://swik.net/launchd</link>
        
        <pubDate></pubDate>
        <lastBuildDate></lastBuildDate>
            
        <item>
            <title>Lingon by Peter Borg</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Lingon+by+Peter+Borg/ceurp</link>
            <description></description>
            
            <pubDate>Mon, 15 Sep 2008 23:04:01 -0700</pubDate>
        </item>
            
        <item>
            <title>[from bradleyjames] Technical Note TN2083: Daemons and Agents</title>
            <link>http://swik.net/User:jeyrb/jey%27s+network%27s+del.icio.us+bookmarks/%5Bfrom+bradleyjames%5D+Technical+Note+TN2083%3A+Daemons+and+Agents/ccmol</link>
            <description>&amp;quot;This technote describes the most common problems encountered when developing daemons and agents on Mac OS X, and offers detailed advice on solving those problems.&amp;quot;</description>
            
            <pubDate>Fri, 15 Aug 2008 21:04:35 -0700</pubDate>
        </item>
            
        <item>
            <title>Running GlassFish on Mac OS X using launchd : Low Bit</title>
            <link>http://swik.net/GlassFish/del.icio.us%2Ftag%2Fglassfish/Running+GlassFish+on+Mac+OS+X+using+launchd+%3A+Low+Bit/ca18g</link>
            <description></description>
            
            <pubDate>Mon, 21 Jul 2008 17:45:19 -0700</pubDate>
        </item>
            
        <item>
            <title>launchd</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/launchd/b77ku</link>
            <description></description>
            
            <pubDate>Tue, 24 Jun 2008 05:02:02 -0700</pubDate>
        </item>
            
        <item>
            <title>Running GlassFish on Mac OS X using launchd - Low Bit</title>
            <link>http://swik.net/GlassFish/del.icio.us%2Ftag%2Fglassfish/Running+GlassFish+on+Mac+OS+X+using+launchd+-+Low+Bit/b5z18</link>
            <description>GlassFishをlaunchdで自動起動する</description>
            
            <pubDate>Wed, 28 May 2008 09:09:56 -0700</pubDate>
        </item>
            
        <item>
            <title>Lingon by Peter Borg</title>
            <link>http://swik.net/XML/del.icio.us%2Ftag%2Fxml/Lingon+by+Peter+Borg/b5e5v</link>
            <description>Lingon is a graphical user interface for creating launchd configuration files for Mac OS X Leopard</description>
            
            <pubDate>Mon, 19 May 2008 08:25:07 -0700</pubDate>
        </item>
            
        <item>
            <title>Automating Rick Rolls with launchd</title>
            <link>http://swik.net/Typo/Encytemedia/Automating+Rick+Rolls+with+launchd/b4sgf</link>
            <description>
            &lt;p&gt;Lets face it:  Your coworkers can be a real pain in the ass sometimes.  What better way 
to remind them of this than automated Rick rolls?  They’re likely to never know what hit them.&lt;/p&gt;
&lt;h3&gt;What is launchd?&lt;/h3&gt;

&lt;p&gt;According to the &lt;a href=&quot;http://developer.apple.com/macosx/launchd.html&quot;&gt;launchd guide on Apple’s website&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;The launchd daemon takes over many tasks from cron, xinetd, mach_init, and init, 
    which are UNIX programs that traditionally have handled system initialization, called 
    systems scripts, run startup items, and generally prepared the system for the user&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;launchd stores tasks in &lt;code&gt;plist&lt;/code&gt; format.  You can find your agents in ~/Library/LaunchAgents.
Here is a typical launcd file that will open iTunes every 60 seconds:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
  &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;
  &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
  &amp;lt;dict&amp;gt;
    &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;com.alternateidea.article.test&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
    &amp;lt;array&amp;gt;
        &amp;lt;string&amp;gt;/usr/bin/open&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;-b&amp;lt;/string&amp;gt;
    &amp;lt;string&amp;gt;com.apple.iTunes&amp;lt;/string&amp;gt;
    &amp;lt;/array&amp;gt;
    &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
    &amp;lt;false/&amp;gt;
    &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;
    &amp;lt;integer&amp;gt;60&amp;lt;/integer&amp;gt;
  &amp;lt;/dict&amp;gt;
  &amp;lt;/plist&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Obviously this would be seriously annoying, but for the purpose of this demonstration, 
save this file as “com.alternateidea.article.test” in your ~/Library/LaunchAgents folder.&lt;/p&gt;

&lt;p&gt;This script won’t run automatically, so we need to load it up first using the &lt;code&gt;launchctl&lt;/code&gt; 
program:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;launchctl load ~/Library/LaunchAgents/com.alternateidea.article.test.plist&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Our agent is loaded up now.  After 60 seconds, you should see iTunes.app open.  Pretty nice, eh?&lt;/p&gt;

&lt;p&gt;Ok, so we don’t want to keep running this agent.  Lets unload it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;launchctl unload ~/Library/LaunchAgents/com.alternateidea.article.test.plist&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Never gonna give you up.  Never gonna automate your Mac.&lt;/h3&gt;

&lt;p&gt;So, here’s the trick:  Wait until your coworker goes to lunch or you know they’ll be out of the 
office for 10 minutes or so.  Then, let the mischief begin. &lt;/p&gt;

&lt;p&gt;The first thing we need to do is create our agent:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;
  &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
  &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&amp;quot;&amp;gt;
  &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
  &amp;lt;dict&amp;gt;
    &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
    &amp;lt;string&amp;gt;com.youtube.rickroll&amp;lt;/string&amp;gt;
    &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
    &amp;lt;array&amp;gt;
        &amp;lt;string&amp;gt;/usr/bin/open&amp;lt;/string&amp;gt;
        &amp;lt;string&amp;gt;-b&amp;lt;/string&amp;gt;
            &amp;lt;string&amp;gt;com.apple.Safari&amp;lt;/string&amp;gt;
            &amp;lt;string&amp;gt;http://www.youtube.com/watch?v=eBGIQ7ZuuiU&amp;lt;/string&amp;gt;
    &amp;lt;/array&amp;gt;
    &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
    &amp;lt;false/&amp;gt;
    &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;
    &amp;lt;integer&amp;gt;1800&amp;lt;/integer&amp;gt;
  &amp;lt;/dict&amp;gt;
  &amp;lt;/plist&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Everything should be pretty obvious in this plist.  The &lt;code&gt;StartInterval&lt;/code&gt; is in seconds.  I 
want to be an asshole every 30 minutes (1800) seconds.  If you want to be a bigger asshole 
(or &lt;a href=&quot;http://www.youtube.com/watch?v=9xhsKB0rvXg&quot;&gt;Son of a Bitch&lt;/a&gt;) you could set this to run in 
shorter intervals. &lt;/p&gt;

&lt;p&gt;Now, we need to save this and load it up on your coworkers computer.  Save this 
to &lt;code&gt;~/Library/USERNAME/LaunchAgents/com.youtube.rickroll&lt;/code&gt;.  And load it up:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
  launchctl load ~/Library/LaunchAgents/com.youtube.rickroll.plist
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you want to test and make sure everything is in working order, you can run:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;launchctl start com.youtube.rickroll&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Question:&lt;/strong&gt; Did you just Rick Roll yourself?&lt;/p&gt;

&lt;p&gt;Now, if your test ran successfully slip back to your desk and wait in anticipation for that 
awesome intro.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer:  If you destroy your coworkers computer or end up scrapping in the street, I’m not responsible.&lt;/strong&gt;&lt;/p&gt;
          &lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~f/encytemedia?a=MetDCH&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~f/encytemedia?i=MetDCH&quot; border=&quot;0&quot;&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~f/encytemedia?a=E5AZ9H&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~f/encytemedia?i=E5AZ9H&quot; border=&quot;0&quot;&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            
            <pubDate>Thu, 01 May 2008 16:07:01 -0700</pubDate>
        </item>
            
        <item>
            <title>TracOnOsxTracdAsLaunchdService</title>
            <link>http://swik.net/Trac/del.icio.us%2Ftag%2Ftrac/TracOnOsxTracdAsLaunchdService/b10ty</link>
            <description></description>
            
            <pubDate>Thu, 31 Jan 2008 15:01:44 -0800</pubDate>
        </item>
            
        <item>
            <title>Using launchd on Mac OS X at Notes from a messy desk</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Using+launchd+on+Mac+OS+X+at+Notes+from+a+messy+desk/byqe6</link>
            <description></description>
            
            <pubDate>Thu, 27 Dec 2007 07:59:56 -0800</pubDate>
        </item>
            
        <item>
            <title>Lingon by Peter Borg</title>
            <link>http://swik.net/XML/del.icio.us%2Ftag%2Fxml/Lingon+by+Peter+Borg/bwigf</link>
            <description></description>
            
            <pubDate>Fri, 07 Dec 2007 14:46:58 -0800</pubDate>
        </item>
            
        <item>
            <title>Running GlassFish on Mac OS X using launchd - Low Bit</title>
            <link>http://swik.net/GlassFish/del.icio.us%2Ftag%2Fglassfish/Running+GlassFish+on+Mac+OS+X+using+launchd+-+Low+Bit/btqt7</link>
            <description></description>
            
            <pubDate>Mon, 12 Nov 2007 13:17:42 -0800</pubDate>
        </item>
            
        <item>
            <title>GlassFish on MacOS X - Using Launchd</title>
            <link>http://swik.net/GlassFish/del.icio.us%2Ftag%2Fglassfish/GlassFish+on+MacOS+X+-+Using+Launchd/btmps</link>
            <description>Was on my TODO list. Yay procrastination</description>
            
            <pubDate>Sun, 11 Nov 2007 16:52:29 -0800</pubDate>
        </item>
            
        <item>
            <title>Running GlassFish on Mac OS X using launchd - Low Bit</title>
            <link>http://swik.net/GlassFish/del.icio.us%2Ftag%2Fglassfish/Running+GlassFish+on+Mac+OS+X+using+launchd+-+Low+Bit/btjj3</link>
            <description></description>
            
            <pubDate>Sat, 10 Nov 2007 19:51:48 -0800</pubDate>
        </item>
            
        <item>
            <title>Launchd</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Launchd/bnrti</link>
            <description></description>
            
            <pubDate>Tue, 18 Sep 2007 12:12:36 -0700</pubDate>
        </item>
            
        <item>
            <title>Lingon by Peter Borg</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Lingon+by+Peter+Borg/blb35</link>
            <description></description>
            
            <pubDate>Fri, 31 Aug 2007 19:23:33 -0700</pubDate>
        </item>
            
        <item>
            <title>Launchd HowTo ... + Fetchmail</title>
            <link>http://swik.net/fetchmail/del.icio.us%2Ftag%2Ffetchmail/Launchd+HowTo+...+%2B+Fetchmail/bhiki</link>
            <description></description>
            
            <pubDate>Sat, 04 Aug 2007 00:23:46 -0700</pubDate>
        </item>
            
        <item>
            <title>404 Blog Not Found:Taming Tiger -- postfix編</title>
            <link>http://swik.net/Postfix/del.icio.us%2Ftag%2Fpostfix/404+Blog+Not+Found%3ATaming+Tiger+--+postfix%E7%B7%A8/bgwsd</link>
            <description></description>
            
            <pubDate>Tue, 31 Jul 2007 02:21:49 -0700</pubDate>
        </item>
            
        <item>
            <title>[from bradleyjames] Launchd: One Program to Rule them All</title>
            <link>http://swik.net/User:jeyrb/jey%27s+network%27s+del.icio.us+bookmarks/%5Bfrom+bradleyjames%5D+Launchd%3A+One+Program+to+Rule+them+All/bgqa4</link>
            <description></description>
            
            <pubDate>Sun, 29 Jul 2007 21:44:46 -0700</pubDate>
        </item>
            
        <item>
            <title>Mac OS X Manual Page For launchd.plist(5)</title>
            <link>http://swik.net/XML/del.icio.us%2Ftag%2Fxml/Mac+OS+X+Manual+Page+For+launchd.plist%285%29/bco2x</link>
            <description></description>
            
            <pubDate>Sun, 24 Jun 2007 18:54:55 -0700</pubDate>
        </item>
            
        <item>
            <title>Launchd</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Launchd/bayss</link>
            <description></description>
            
            <pubDate>Tue, 12 Jun 2007 16:42:56 -0700</pubDate>
        </item>
            
        <item>
            <title>TracOnOsxTracdAsLaunchdService</title>
            <link>http://swik.net/Trac/del.icio.us%2Ftag%2Ftrac/TracOnOsxTracdAsLaunchdService/9y2c</link>
            <description></description>
            
            <pubDate>Wed, 06 Jun 2007 00:52:03 -0700</pubDate>
        </item>
            
        <item>
            <title>Lingon by Peter Borg</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Lingon+by+Peter+Borg/0c1n</link>
            <description></description>
            
            <pubDate>Sun, 11 Mar 2007 06:34:03 -0700</pubDate>
        </item>
            
        <item>
            <title>launchd - Wikipedia, the free encyclopedia</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/launchd+-+Wikipedia%2C+the+free+encyclopedia/z6yl</link>
            <description></description>
            
            <pubDate>Fri, 09 Mar 2007 01:30:20 -0800</pubDate>
        </item>
            
        <item>
            <title>Hivelogic - The Narrative - LightTPD Launchd Item for Tiger</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Hivelogic+-+The+Narrative+-+LightTPD+Launchd+Item+for+Tiger/z6yh</link>
            <description></description>
            
            <pubDate>Fri, 09 Mar 2007 01:30:19 -0800</pubDate>
        </item>
            
        <item>
            <title>Using launchd on Mac OS X at  Notes from a messy desk</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Using+launchd+on+Mac+OS+X+at++Notes+from+a+messy+desk/z6ye</link>
            <description></description>
            
            <pubDate>Fri, 09 Mar 2007 01:30:18 -0800</pubDate>
        </item>
            
        <item>
            <title>A revised launchd plist for fetchmail | adrinux, philodox.</title>
            <link>http://swik.net/fetchmail/del.icio.us%2Ftag%2Ffetchmail/A+revised+launchd+plist+for+fetchmail+%7C+adrinux%2C+philodox./xfj7</link>
            <description></description>
            
            <pubDate>Mon, 12 Feb 2007 07:16:52 -0800</pubDate>
        </item>
            
        <item>
            <title>Mac OS Forge</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Mac+OS+Forge/wk7m</link>
            <description></description>
            
            <pubDate>Mon, 05 Feb 2007 08:44:52 -0800</pubDate>
        </item>
            
        <item>
            <title>Mac OS Forge</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Mac+OS+Forge/wbql</link>
            <description></description>
            
            <pubDate>Fri, 02 Feb 2007 15:31:31 -0800</pubDate>
        </item>
            
        <item>
            <title>Apple Opens Up: Kernel, Mac OS Forge, iCal Server, Bonjour, Launchd</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Apple+Opens+Up%3A+Kernel%2C+Mac+OS+Forge%2C+iCal+Server%2C+Bonjour%2C+Launchd/i66y</link>
            <description>launchd under apache licence</description>
            
            <pubDate>Sat, 12 Aug 2006 16:03:46 -0700</pubDate>
        </item>
            
        <item>
            <title>Mac OS Forge</title>
            <link>http://swik.net/opensource/del.icio.us+tag%2Fopensource/Mac+OS+Forge/iwff</link>
            <description></description>
            
            <pubDate>Tue, 08 Aug 2006 11:02:47 -0700</pubDate>
        </item>
                </channel>
</rss>
