<?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>ptone &#187; os x</title>
	<atom:link href="http://ptone.com/dablog/tag/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://ptone.com/dablog</link>
	<description>Hodgepodge of thoughts, technical notes, and random observations</description>
	<lastBuildDate>Sat, 04 Jun 2011 14:42:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Setting Default Apps, duti calls</title>
		<link>http://ptone.com/dablog/2008/10/setting-default-apps-duti-calls/</link>
		<comments>http://ptone.com/dablog/2008/10/setting-default-apps-duti-calls/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 22:34:26 +0000</pubDate>
		<dc:creator>ptone</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://ptone.com/dablog/?p=29</guid>
		<description><![CDATA[I had always intended this blog to have some technical tips in the mix, but haven&#8217;t written up many, so here is one. I manage an OS X environment at a school. We installed a new phone system that could email voicemail files as WAV files, and I wanted a way to set the default [...]]]></description>
			<content:encoded><![CDATA[<p>I had always intended this blog to have some technical tips in the mix, but haven&#8217;t written up many, so here is one.</p>

<p>I manage an OS X environment at a school. We installed a new phone system that could email voicemail files as WAV files, and I wanted a way to set the default application that launches when these were double clicked from iTunes to Quicktime. Â This sort of thing is handled by launch services and can&#8217;t be manipulated by the defaults command. Â <strong><span style="font-weight: normal;">Andrew Mortensen (of the Radmind crew) to the rescue with a command line tool he wrote: <a href="http://duti.sourceforge.net/">duti</a>.</span></strong></p>

<p>This can be called a number of way, but I wanted to run it from a login script. Â It has to be run as the user whose settings you want to change, but loginscripts run as root, so one needs to call the actual binary as sudo.</p>

<p>Â 
<p style="padding-left: 30px;">echo &#8216;com.apple.quicktimeplayer com.microsoft.waveform-audio all&#8217; | sudo -u $1 /usr/local/bin/duti</p>
Â </p>

<p>Another great tipÂ embeddedÂ in the man page for the utility is a way to get a list of all of the identifiers for launchservices:</p>

<p>Â 
<div>
<p style="padding-left: 30px;"><code>locate lsregister</code> -dump | grep &#8216;[[:space:]]uti:&#8217; | awk &#8216;{ print $2 }&#8217; | sort | uniq</p></p>

<p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://ptone.com/dablog/2008/10/setting-default-apps-duti-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

