<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zomo tech &#187; OS X</title>
	<atom:link href="http://www.zomo.co.uk/tag/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zomo.co.uk</link>
	<description>Is it done yet?</description>
	<lastBuildDate>Wed, 14 Sep 2011 07:56:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Moving Dictionary.app</title>
		<link>http://www.zomo.co.uk/2008/05/moving-dictionaryapp/</link>
		<comments>http://www.zomo.co.uk/2008/05/moving-dictionaryapp/#comments</comments>
		<pubDate>Fri, 02 May 2008 08:21:46 +0000</pubDate>
		<dc:creator>lemon</dc:creator>
				<category><![CDATA[all]]></category>
		<category><![CDATA[sw]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Yak shaving]]></category>

		<guid isPermaLink="false">http://tech.zomo.co.uk/?p=34</guid>
		<description><![CDATA[OS X does a good job of tracking what applications are where and what they do. I have little idea how this works, but if I move VLC.app into a new home then all the files that open in VLC still work. Great. I imagine it involves FSEvents and gobs of XML somewhere. However the [...]]]></description>
			<content:encoded><![CDATA[<p>OS X does a good job of tracking what applications are where and what they do. I have little idea how this works, but if I move VLC.app into a new home then all the files that open in VLC still work. Great. I imagine it involves FSEvents and gobs of XML somewhere.</p>
<p>However the magic doesn&#8217;t touch everything. I was so bold as to move Dictionary.app from its default home in<code> /Applications</code> into the <code>Utilities</code> subdirectory. This broke the Ctrl-Cmd-D system-wide (Cocoa-wide?) lookup box. I don&#8217;t use it <em>that</em> much but that irked me nonetheless.</p>
<p>Console logs included this:</p>
<blockquote><p><code>com.apple.launchd[335] (com.apple.DictionaryPanelAgent[490]): posix_spawn("/Applications/Dictionary.app/Contents/SharedSupport/DictionaryPanel.app/Contents/MacOS/DictionaryPanel", ...): No such file or directory</code></p></blockquote>
<p>Clearly something thinks it knows where the nested DictionaryPanel application should live. This thing is a <code>launchd</code>-managed process used by the keyboard shortcut, configured out of <code>/System/Library/LaunchAgents/com.apple.DictionaryPanelAgent.plist</code>.</p>
<p>The hoojah to tweak this does of course involve XML:</p>
<blockquote><p><code><br />
$ launchctl unload /System/Library/LaunchAgents/com.apple.DictionaryPanelAgent.plist</code></p>
<p><code>$ plutil  -convert xml1 -o - /System/Library/LaunchAgents/com.apple.DictionaryPanelAgent.plist  | perl -pe 's|/Applications/Dictionary.app/|/Applications/Utilities/Dictionary.app/|;' > /var/tmp/com.apple.DictionaryPanelAgent.plist</code></p>
<p><code>$ plutil -lint /var/tmp/com.apple.DictionaryPanelAgent.plist<br />
/var/tmp/com.apple.DictionaryPanelAgent.plist: OK</code><br />
<code><br />
$ plutil -convert binary1 /var/tmp/com.apple.DictionaryPanelAgent.plist</code></p>
<p><code>$ mkdir /Library/LaunchAgents-orig</code></p>
<p><code>$ sudo mv /System/Library/LaunchAgents/com.apple.DictionaryPanelAgent.plist /Library/LaunchAgents-orig &#038;&#038; sudo cp /var/tmp/com.apple.DictionaryPanelAgent.plist /System/Library/LaunchAgents/com.apple.DictionaryPanelAgent.plist</code></p>
<p><code>$ launchctl load /System/Library/LaunchAgents/com.apple.DictionaryPanelAgent.plist</code></p>
</blockquote>
<p>The last step was intended to make the change work this session, but it didn&#8217;t work. The DictionaryPanelAgent still loads but didn&#8217;t do anything until logged out and in again. I think this is something to do with <code>launchctl</code> domains / sessiontype. Blunder factor is high.</p>
<p>This violates the &#8220;don&#8217;t frig with stuff in <code>/System</code>&#8221; principle but I don&#8217;t know how else to solve it. The modified plist could go in <code>/Library/LaunchAgents</code> of course, but I&#8217;d still need to disable the system version (with <code>launchctl unload -w</code>) which is equally naughty. I think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zomo.co.uk/2008/05/moving-dictionaryapp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

