<?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>Jeff Kelley’s Blog &#187; Mac Tips</title>
	<atom:link href="http://blog.slaunchaman.com/category/mac-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.slaunchaman.com</link>
	<description>Mac tips, iPhone applications, and the like</description>
	<lastBuildDate>Fri, 02 Dec 2011 04:51:07 +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>Apple Surveying 32-Bit Third-Party Kernel Extensions</title>
		<link>http://blog.slaunchaman.com/2011/03/22/apple-surveying-32-bit-third-party-kernel-extensions/</link>
		<comments>http://blog.slaunchaman.com/2011/03/22/apple-surveying-32-bit-third-party-kernel-extensions/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 04:05:44 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Kernel Extensions]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=424</guid>
		<description><![CDATA[Today I noticed something new in my LaunchDaemons folder: /Library/LaunchDaemons/com.apple.third_party_32b_kext_logger.plist. It starts a Ruby script (/usr/libexec/third_party_32b_kext_logger.rb) when your Mac starts up that (and I could be totally wrong, as I don’t know Ruby) appears to use /usr/sbin/kextfind -system-extensions to identify third-party kernel extensions (e.g. kernel extensions for which the identifier does not begin with com.apple) [...]]]></description>
			<content:encoded><![CDATA[<p>Today I noticed something new in my LaunchDaemons folder: <code>/Library/LaunchDaemons/com.apple.third_party_32b_kext_logger.plist</code>. It starts a Ruby script (<code>/usr/libexec/third_party_32b_kext_logger.rb</code>) when your Mac starts up that (and I could be totally wrong, as I don’t know Ruby) appears to use <code>/usr/sbin/kextfind -system-extensions</code> to identify third-party kernel extensions (e.g. kernel extensions for which the identifier does not begin with com.apple) that exist only in i386 or PPC forms. It makes sense why Apple would do this, as a move to 64-bit only would be in keeping with their typical attitude on leaving old hardware platforms behind, but this particular file is odd in that it’s in <code>/Library/LaunchDaemons</code> and not <code>/System/Library/LaunchDaemons</code>, where most Apple-created jobs are. Maybe this was a task given to a programmer new at Apple who was unfamiliar with the typical folder hierarchy on a Mac, but this smells odd. The only result I found for it in Google was <a href="http://discussions.apple.com/thread.jspa?threadID=2791807">this Apple Support forum post</a>.<br />
So, I did some investigation, and found that it uses the domain &#8220;com.apple.kexts.32bitonly&#8221; with the <code>defaults</code> command, and in my system log is this line:</p>
<blockquote><p><code>/var/log/system.log:Mar 22 19:31:30 Jeff-Kelleys-MacBook defaults[3439]: \nThe domain/default pair of (com.apple.kexts.32bitonly, lastRan) does not exist</code></p></blockquote>
<p>That is reason enough for me to believe that it’s installed as a part of Mac OS X 10.6.7, as that message signifies its last run time (the script quits if it’s been less than a week since it last ran). So, being the diligent former sysadmin that I am, I looked at the 10.6.7 update’s files, and didn’t see anything (else) of note. I don’t see a point in the script that reports this to Apple, so I don’t know if this constitutes a breach of privacy on their part, but it’s interesting nonetheless that it would appear that Apple is gauging whether or not they can leave 32-bit kernel extensions behind with minimal customer fuss.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2011/03/22/apple-surveying-32-bit-third-party-kernel-extensions/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Using AppleScript to Automate Data Entry</title>
		<link>http://blog.slaunchaman.com/2011/02/02/using-applescript-to-automate-data-entry/</link>
		<comments>http://blog.slaunchaman.com/2011/02/02/using-applescript-to-automate-data-entry/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 23:58:30 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[convenience]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=364</guid>
		<description><![CDATA[I was working on an app today and ran into a problem: I had to transfer data from a table in a Microsoft Word document to a dictionary in a dictionary in a dictionary in a property list in Xcode. After copying and pasting several times—I had 243 total entries to copy—I figured there had [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on an app today and ran into a problem: I had to transfer data from a table in a Microsoft Word document to a dictionary in a dictionary in a dictionary in a property list in Xcode. After copying and pasting several times—I had 243 total entries to copy—I figured there had to be a better way. So, I fired up AppleScript Editor and wrote this quick script to do nine at a time:</p>
<blockquote><p><code>
<pre>repeat 9 times
	tell application "Xcode"
		activate
	end tell

	tell application "System Events"
		keystroke tab
		keystroke tab
	end tell

	tell application "Pages"
		activate
	end tell

	tell application "System Events"
		keystroke "c" using {command down}
		delay 0.5
		keystroke tab
	end tell

	tell application "Xcode"
		activate
	end tell

	tell application "System Events"
		keystroke "v" using {command down}
	end tell
end repeat</pre>
<p></code></p></blockquote>
<p>Nothing fancy, but it worked, and I was saved from carpal tunnel syndrome. So if you find yourself needing to do something tedious, repetitive, and (most of all) easily reproduced, you too can turn to AppleScript to get it done. I won’t spend too much time on explaining the code, but just know that you have to enable access for assistive devices in System Preferences before doing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2011/02/02/using-applescript-to-automate-data-entry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode 3.2: Using GDB as a Non-Admin User</title>
		<link>http://blog.slaunchaman.com/2010/07/20/xcode-3-2-using-gdb-as-a-non-admin-user/</link>
		<comments>http://blog.slaunchaman.com/2010/07/20/xcode-3-2-using-gdb-as-a-non-admin-user/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 18:30:35 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Programming Tips]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[dscl]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=310</guid>
		<description><![CDATA[New in Xcode 3.2 is an authorization setting that looks like this: &#60;dict&#62; &#60;key&#62;allow-root&#60;/key&#62; &#60;false/&#62; &#60;key&#62;class&#60;/key&#62; &#60;string&#62;rule&#60;/string&#62; &#60;key&#62;comment&#60;/key&#62; &#60;string&#62;For use by Apple. WARNING: administrators are advised not to modify this right.&#60;/string&#62; &#60;key&#62;k-of-n&#60;/key&#62; &#60;integer&#62;1&#60;/integer&#62; &#60;key&#62;rule&#60;/key&#62; &#60;array&#62; &#60;string&#62;is-admin&#60;/string&#62; &#60;string&#62;is-developer&#60;/string&#62; &#60;string&#62;authenticate-developer&#60;/string&#62; &#60;/array&#62; &#60;key&#62;shared&#60;/key&#62; &#60;true/&#62; &#60;/dict&#62; The upshot of this is that if you aren’t in the _developer group [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/iphone/library/releasenotes/DeveloperTools/RN-Xcode/#//apple_ref/doc/uid/TP40001051-DontLinkElementID_13">New in Xcode 3.2</a> is an authorization setting that looks like this:</p>
<blockquote><pre>&lt;dict&gt;
	&lt;key&gt;allow-root&lt;/key&gt;
	&lt;false/&gt;
	&lt;key&gt;class&lt;/key&gt;
	&lt;string&gt;rule&lt;/string&gt;
	&lt;key&gt;comment&lt;/key&gt;
	&lt;string&gt;For use by Apple.  WARNING: administrators are advised not to
	        modify this right.&lt;/string&gt;
	&lt;key&gt;k-of-n&lt;/key&gt;
	&lt;integer&gt;1&lt;/integer&gt;
	&lt;key&gt;rule&lt;/key&gt;
	&lt;array&gt;
		&lt;string&gt;is-admin&lt;/string&gt;
		&lt;string&gt;is-developer&lt;/string&gt;
		&lt;string&gt;authenticate-developer&lt;/string&gt;
	&lt;/array&gt;
	&lt;key&gt;shared&lt;/key&gt;
	&lt;true/&gt;
&lt;/dict&gt;</pre>
</blockquote>
<p>The upshot of this is that if you aren’t in the <code>_developer</code> group in the local directory, you’ll have to authenticate as an administrator to use <code>gdb</code> or some of the performance tools. For the vast majority of developers on Mac OS X, who run as an administrator, this is fine, but if you’re running as a regular user, either for security reasons or because you’re in something like a lab setting, this can be a problem. To add a user to the <code>_developer</code> group, use the <code>dscl</code> command:</p>
<blockquote><p><code>dscl . -append /Groups/_developer GroupMembership <strong>UserName</strong></code></p></blockquote>
<p>Replace <code><strong>UserName</strong></code> with the short name of your user account (or <code>$(whoami)</code>) and you should be all set.</p>
<p>If you’re administering Mac OS X in a lab setting, you can either create a LaunchAgent that handles this or a login hook. See the Apple tech note <a href="http://developer.apple.com/mac/library/technotes/tn2008/tn2228.html">“Running At Login”</a> for more information on login hooks. As an added touch, my login and logout scripts to handle this also remove all users from the group, like so:</p>
<blockquote><p><code>dscl . -delete /Groups/_developer GroupMembership</code></p></blockquote>
<p>If the <code>GroupMembership</code> key doesn’t exist, <code>dscl</code> will create it—and it doesn’t exist by default—so deleting it outright shouldn’t cause any problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/07/20/xcode-3-2-using-gdb-as-a-non-admin-user/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How-To: Run a LaunchDaemon That Requires Networking</title>
		<link>http://blog.slaunchaman.com/2010/07/01/how-to-run-a-launchdaemon-that-requires-networking/</link>
		<comments>http://blog.slaunchaman.com/2010/07/01/how-to-run-a-launchdaemon-that-requires-networking/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 17:28:37 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[launchd]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=300</guid>
		<description><![CDATA[I’m a big fan of using launchd to automate things in Mac OS X. That serves me well, as that’s how Apple wants things done moving forward. That said, one of launchd’s biggest shortcomings is a lack of a dependency system. There is currently no way, for instance, to specify in a LaunchDaemon’s property list [...]]]></description>
			<content:encoded><![CDATA[<p>I’m a big fan of using <a href="http://launchd.macosforge.org/">launchd</a> to automate things in Mac OS X. That serves me well, as that’s how Apple wants things done moving forward. That said, one of launchd’s biggest shortcomings is a lack of a dependency system. There is currently no way, for instance, to specify in a LaunchDaemon’s property list that the daemon requires the network to be active in order to run. This is problematic for some things, such as a script I wrote to automatically set the computer’s hostname based on the DNS server (more on that later). Luckily, Apple has already defined a function, <code>CheckForNetwork</code>, in <code>/private/etc/rc.common</code>. Here it is in all its glory:</p>
<blockquote><pre>##
# Determine if the network is up by looking for any non-loopback
# internet network interfaces.
##
CheckForNetwork()
{
	local test

	if [ -z "${NETWORKUP:=}" ]; then
		test=$(ifconfig -a inet 2>/dev/null | sed -n -e '/127.0.0.1/d' -e '/0.0.0.0/d' -e '/inet/p' | wc -l)
		if [ "${test}" -gt 0 ]; then
			NETWORKUP="-YES-"
		else
			NETWORKUP="-NO-"
		fi
	fi
}</pre>
</blockquote>
<p>In your code, simply include <code>rc.common</code>, then call <code>CheckForNetwork</code> as needed. An example:</p>
<blockquote><pre>#!/bin/bash

# Example Daemon Starter
. /etc/rc.common

CheckForNetwork

while [ "${NETWORKUP}" != "-YES-" ]
do
        sleep 5
        NETWORKUP=
        CheckForNetwork
done

# Now do what you need to do.</pre>
</blockquote>
<p>Note that this will keep the script running indefinitely until <code>CheckForNetwork</code> sets <code>NETWORKUP</code> to “<code>-YES-</code>,” so if there’s a networking problem your code may never execute.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/07/01/how-to-run-a-launchdaemon-that-requires-networking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Earth Now Available Without Automatic Updates</title>
		<link>http://blog.slaunchaman.com/2010/06/30/google-earth-now-available-without-automatic-updates/</link>
		<comments>http://blog.slaunchaman.com/2010/06/30/google-earth-now-available-without-automatic-updates/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 18:13:40 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=295</guid>
		<description><![CDATA[A while back I blogged about Google Earth’s stealthy, silent automatic update feature. That post continues to be pretty popular, so I wanted to share an update: Google has released a version of Google Earth, including the Web plug-in, that does not include the self-updater. On the download page, the EULA features this paragraph: (b) [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I <a href="http://blog.slaunchaman.com/2008/12/04/google-delivers-mac-google-earth-api-plugin-but-at-what-cost/">blogged</a> about Google Earth’s stealthy, silent automatic update feature. That post continues to be pretty popular, so I wanted to share an update: Google has released a version of Google Earth, including the Web plug-in, that does not include the self-updater. On the <a href="http://earth.google.com/intl/en/download-earth.html">download page</a>, the EULA features this paragraph:</p>
<blockquote><p>(b) Automatic Updates. The Google Earth software may communicate with Google servers from time to time to check for available updates to the software, such as bug fixes, patches, enhanced functions, missing plug-ins and new versions (collectively, &#8220;Updates&#8221;). By installing the Google Earth software, you agree to automatically request and receive Updates.</p></blockquote>
<p>However, if you navigate to the <a href="http://earth.google.com/intl/en/download-earth-advanced.html">advanced setup</a> page, there&#8217;s a box you can un-check labeled “Allow Google Earth to automatically install recommended updates.” This box directs you to a separate download that does not include the updater. The EULA, however, does not change when you deselect it. I don’t think that really matters as much in the grand scheme of things, so I’ve really got to give Google some kudos here for listening to systems administrators and concerned users on this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/06/30/google-earth-now-available-without-automatic-updates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Updating dyld Shared Caches with Radmind: Best Practices</title>
		<link>http://blog.slaunchaman.com/2010/06/15/updating-dyld-shared-caches-with-radmind-best-practices/</link>
		<comments>http://blog.slaunchaman.com/2010/06/15/updating-dyld-shared-caches-with-radmind-best-practices/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:41:56 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[dyld]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Radmind]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=280</guid>
		<description><![CDATA[Similar to my last post about updating kernel extensions, you can run into problems with Radmind due to the dyld shared cache. You may see messages like this in your system log: current cache invalid because /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit has changed Running the update_dyld_shared_cache command will fix this, but there&#8217;s a better way. Sure, there&#8217;s almost no [...]]]></description>
			<content:encoded><![CDATA[<p>Similar to my last post about <a href="http://blog.slaunchaman.com/2010/05/27/updating-kernel-extensions-with-radmind-best-practices/">updating kernel extensions</a>, you can run into problems with Radmind due to the dyld shared cache. You may see messages like this in your system log:</p>
<blockquote><p><code>current cache invalid because /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit has changed</code></p></blockquote>
<p>Running the <code>update_dyld_shared_cache</code> command will fix this, but there&#8217;s a better way. Sure, there&#8217;s almost no overhead to that command, but where&#8217;s the fun in that? Here&#8217;s a pre-apply script that will delete any shared caches that have changed, which will then be re-built at reboot.</p>
<blockquote><p><code>
<pre>#!/bin/sh

# update_dyld_caches: Inspects the applicable transcript for something that
#                     might cause a dyld cache to become outdated. If it exists,
#                     delete the cache so it's re-created at startup.

DYLD_CACHE_FOLDER="/private/var/db/dyld"
DYLD_PREFIX="dyld_shared_cache_"
ARCHITECTURES="i386 x86_64 rosetta ppc ppc64"

for arch in ${ARCHITECTURES}; do
	cache="${DYLD_CACHE_FOLDER}/${DYLD_PREFIX}${arch}"
	map="${DYLD_CACHE_FOLDER}/${DYLD_PREFIX}${arch}.map"

	if /bin/test -f "${cache}"; then
		if /bin/test -f "${map}"; then
			/bin/cat "${map}" | grep ^/ | sort --unique --ignore-case | while read line; do
				if /bin/test -n "$(grep ${line} ${1})"; then # found a match
					/bin/rm -f "${cache}"
					/bin/rm -f "${map}"
					break;
				fi
			done
		else
			# Cache exists, but there's no map.
			/bin/rm -f "${cache}"
		fi
	fi
done</pre>
<p></code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/06/15/updating-dyld-shared-caches-with-radmind-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating Kernel Extensions with Radmind: Best Practices</title>
		<link>http://blog.slaunchaman.com/2010/05/27/updating-kernel-extensions-with-radmind-best-practices/</link>
		<comments>http://blog.slaunchaman.com/2010/05/27/updating-kernel-extensions-with-radmind-best-practices/#comments</comments>
		<pubDate>Thu, 27 May 2010 17:28:36 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Kernel Extensions]]></category>
		<category><![CDATA[kextd]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Radmind]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=272</guid>
		<description><![CDATA[One of the problems that I&#8217;ve run into so far using Radmind to manage Mac OS X—specifically, the Leopard to Snow Leopard transition—is that kextd helpfully starts recreating your kernel extension cache as soon as you modify anything in /System/Library/Extensions. This can be problematic when you&#8217;re updating core system files; as you update the 10.5 [...]]]></description>
			<content:encoded><![CDATA[<p>One of the problems that I&#8217;ve run into so far using <a href="http://www.radmind.org">Radmind</a> to manage Mac OS X—specifically, the Leopard to Snow Leopard transition—is that <code>kextd</code> helpfully starts recreating your kernel extension cache as soon as you modify anything in <code>/System/Library/Extensions</code>. This can be problematic when you&#8217;re updating core system files; as you update the 10.5 kernel extensions to their 10.6 counterparts, you don&#8217;t want the 10.5 version of <code>kextd</code> creating a cache of 10.6 kernel extensions, especially as the kernel extension cache has moved (from <code>/System/Library/Extensions.mkext</code> to <code>/System/Library/Caches/com.apple.kext.caches/</code>). So, should you handle this? My solution is to stop <code>kextd</code> if I know that I&#8217;m updating kernel extensions; that way, they won&#8217;t be re-created until reboot. Here&#8217;s the script:</p>
<p><code>/private/var/radmind/preapply/update_kernel_extensions</code>:</p>
<blockquote><p><code>
<pre>#!/bin/sh

# update_kernel_extensions: Manage the replacement of old kernel extensions.
#                           If there are updates, kill kextd and destroy the
#                           caches.

KEXT_CACHE="/System/Library/Caches/com.apple.kext.caches"
KEXT_FOLDER="/System/Library/Extensions"
KEXTD_LAUNCHD="com.apple.kextd"
SYSTEM_LAUNCHD_FOLDER="/System/Library/LaunchDaemons"

transcript="${1}"
result="${transcript}.$$"

/usr/bin/grep "${KEXT_FOLDER}" "${transcript}" > "${result}"

if test -n "${result}"; then #result is non-empty
    # Disable kextd to prevent it from recreating kernel extension caches, which
    # will be re-created at startup.
    if test -n "$(/bin/launchctl list | /usr/bin/grep ${KEXTD_LAUNCHD})"; then
        #kextd is running
        /bin/launchctl unload "${SYSTEM_LAUNCHD_FOLDER}/${KEXTD_LAUNCHD}.plist"
    fi

    # Remove kernel extension cache.
    /bin/rm -rf "${KEXT_CACHE}"
fi

rm -f "${result}"</pre>
<p></code></p></blockquote>
<p>In its present form, it only works on Snow Leopard, but I&#8217;ll be updating it to work on Leopard as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/05/27/updating-kernel-extensions-with-radmind-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using AppleScript to Automate an iChat Video Chat</title>
		<link>http://blog.slaunchaman.com/2010/03/30/using-applescript-to-automate-an-ichat-video-chat/</link>
		<comments>http://blog.slaunchaman.com/2010/03/30/using-applescript-to-automate-an-ichat-video-chat/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 16:53:09 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[iChat]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=256</guid>
		<description><![CDATA[I had to write a script to automatically start iChat at login and start a video chat with a specified screenname. I wanted to only start the chat if the user was online and available, and quit iChat on an error or if the chat ended.]]></description>
			<content:encoded><![CDATA[<p>I had to write a script to automatically start iChat at login and start a video chat with a specified screenname. I wanted to only start the chat if the user was online and available, and quit iChat on an error or if the chat ended. So here’s the script I have:</p>
<pre style="overflow:auto;"><strong>using terms from</strong> <em><span style="color: #0000ff;">application</span></em> "iChat"
	<strong>tell</strong> <em><span style="color: #0000ff;">application</span></em> "iChat"
		<strong><span style="color: #0000ff;">activate</span></strong>
		<span style="color: #0000ff;"><strong>log in</strong></span>
		<span style="color: #333399;"><strong>delay</strong></span> 5
		<strong>set</strong> <span style="color: #008000;">theBuddy</span> <strong>to</strong> <em><span style="color: #0000ff;">buddy</span></em> "ScreennameGoesHere" <strong>of</strong> <em><span style="color: #0000ff;">service</span></em> "AIM"
		<strong>try</strong>
			<strong>set</strong> <span style="color: #008000;">theStatus</span> <strong>to</strong> <span style="color: #333399;">status</span> <strong>of</strong> <span style="color: #008000;">theBuddy</span>
		<strong>on error</strong> <span style="color: #008000;">errmesg</span> <span style="color: #0000ff;">number</span> <span style="color: #008000;">errno</span>
			<strong>set</strong> <span style="color: #008000;">message</span> <strong>to</strong> <span style="color: #333399;"><strong>display dialog</strong></span> "The user is currently unavailable." <span style="color: #333399;">buttons</span> {"OK"}
			<strong><span style="color: #0000ff;">quit</span></strong>
			<strong>return</strong>
		<strong>end try</strong>
		<strong>if</strong> <span style="color: #008000;">theStatus</span> <strong>is</strong> <span style="color: #333399;">available</span> <strong>then</strong>
			<strong>set</strong> <span style="color: #008000;">theCapabilities</span> <strong>to get</strong> <span style="color: #0000ff;">capabilities</span> <strong>of</strong> <span style="color: #008000;">theBuddy</span>
			<strong>if</strong> (<span style="color: #008000;">theCapabilities</span> <strong>contains</strong> <span style="color: #333399;">multiperson video</span>) <strong>then</strong>
				<span style="color: #0000ff;"><strong>send</strong></span> "A user is attempting to contact you." <span style="color: #0000ff;">to</span> <span style="color: #008000;">theBuddy</span>
				<span style="color: #333399;"><strong>delay</strong></span> 2
				<strong>tell</strong> <span style="color: #0000ff;"><em>service</em></span> "AIM" <strong>to</strong> <span style="color: #0000ff;"><strong>make</strong></span> <span style="color: #0000ff;"><em>video chat</em></span> <span style="color: #0000ff;">with properties</span> {participants:<span style="color: #008000;">theBuddy</span>}
				<strong>set</strong> <span style="color: #008000;">theChat</span> <strong>to</strong> <span style="color: #333399;">result</span>
				<span style="color: #333399;"><strong>delay</strong></span> 30
				<strong>try</strong>
					<strong>set</strong> <span style="color: #008000;">theStatus</span> <strong>to the</strong> <span style="color: #333399;">av connection status</span> <strong>of</strong> <span style="color: #008000;">theChat</span>
				<strong>on error</strong> <span style="color: #008000;">errmesg</span> <span style="color: #0000ff;">number</span> <span style="color: #008000;">errno</span>
					<strong><span style="color: #0000ff;">quit</span></strong>
					<strong>return</strong>
				<strong>end try</strong>
				<strong>repeat while</strong> <span style="color: #008000;">theStatus</span> <strong>is not</strong> <span style="color: #333399;">ended</span>
					<span style="color: #333399;"><strong>delay</strong></span> 5
					<strong>try</strong>
						<strong>set</strong> <span style="color: #008000;">theStatus</span> <strong>to the</strong> <span style="color: #333399;">av connection status</span> <strong>of</strong> <span style="color: #008000;">theChat</span>
					<strong>on error</strong> <span style="color: #008000;">errmesg</span> <span style="color: #0000ff;">number</span> <span style="color: #008000;">errno</span>
						<strong><span style="color: #0000ff;">quit</span></strong>
						<strong>return</strong>
					<strong>end try</strong>
				<strong>end repeat</strong>
				<strong><span style="color: #0000ff;">quit</span></strong>
				<strong>return</strong>
			<strong>else</strong>
				<strong>set</strong> <span style="color: #008000;">message</span> <strong>to</strong> <span style="color: #333399;"><strong>display dialog</strong></span> "The user cannot video chat at this time. Please try again later." <span style="color: #333399;">buttons</span> {"OK"}
				<span style="color: #0000ff;"><strong>quit</strong></span>
				<strong>return</strong>
			<strong>end if</strong>
		<strong>else</strong>
			<strong>set</strong> <span style="color: #008000;">message</span> <strong>to</strong> <span style="color: #333399;"><strong>display dialog</strong></span> "The user is currently unavailable." <span style="color: #333399;">buttons</span> {"OK"}
			<strong><span style="color: #0000ff;">quit</span></strong>
			<strong>return</strong>
		<strong>end if</strong>
	<strong>end tell</strong>
<strong>end using terms from</strong></pre>
<p>A couple of gotchas:</p>
<ul>
<li>I tried using <span style="color: #333399;"><code>video chat</code></span> instead of <span style="color: #333399;"><code>multiperson video</code></span>, but that always returned false. I don’t know why.</li>
<li>Once the video chat has ended, you can’t poll its status (hence the <strong><code>try</code></strong> block).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/03/30/using-applescript-to-automate-an-ichat-video-chat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Delivers Mac Google Earth API Plugin, But at What Cost?</title>
		<link>http://blog.slaunchaman.com/2008/12/04/google-delivers-mac-google-earth-api-plugin-but-at-what-cost/</link>
		<comments>http://blog.slaunchaman.com/2008/12/04/google-delivers-mac-google-earth-api-plugin-but-at-what-cost/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 19:30:56 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Earth]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[spyware]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=100</guid>
		<description><![CDATA[UPDATE: Google has released a version of Google Earth (including the plugin) without the self-updating feature. The Mac blogs around the ‘net are all abuzz today about Google’s release of a Mac version of the Google Maps API, but I noticed something funny when I installed it.  The plug-in is a standard Mac Internet Plug-In, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:</strong> Google has <a href="http://blog.slaunchaman.com/2010/06/30/google-earth-now-available-without-automatic-updates/">released</a> a version of Google Earth (including the plugin) without the self-updating feature.</p>
<p>The Mac blogs around the ‘net are all abuzz today about Google’s release of a Mac version of the Google Maps API, but I noticed something funny when I installed it.  The plug-in is a standard Mac Internet Plug-In, meaning you can install it at either <code>/Library/Internet Plug-Ins</code> or <code>~/Library/Internet Plug-Ins</code>.  So why does the install package prompt you for administrator credentials when you choose to install it into your home folder?  The answer lives at <code>/Library/Google</code>.</p>
<p>It turns out that when you install the plugin, the installer also installs a software update component, code-named “keystone.”  It installs the following components:</p>
<ul>
<li>An application bundle at <code>/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle</code></li>
<li>A “Ticket Store” at <code>/Library/Google/GoogleSoftwareUpdate/TicketStore/</code> — does anyone know what this does?  I sure don’t.</li>
<li>A LaunchDaemon that runs <strong>as root</strong> on demand, at <code>/Library/LaunchDaemons/com.google.keystone.daemon.plist</code></li>
<li>A LaunchAgent (<code>/Library/LaunchAgents/com.google.keystone.agent.plist</code>) that runs when you’re logged in, presumably to fire up the daemon so you can receive updates without administrative privileges.</li>
</ul>
<p>Interestingly enough, this software component is never mentioned by Google.  It isn&#8217;t an option you can deselect in the installer.  Even worse, the plugin’s <a title="Google Earth API FAQ - Google Earth API - Google Code" href="http://code.google.com/apis/earth/faq.html#macuninstall" target="_blank">uninstall instructions</a> don’t say a thing about it.  This means that after you follow the plugin uninstall instructions, your computer is still checking in with Google’s servers to make sure that it’s up-to-date.  I’m reluctant to call this malware, but it sure seems like spyware, doesn’t it?  At the very least the installer ought to mention something.</p>
<p>Be cautious when installing this plugin onto any computer where security is essential.  Any software component that runs as root, such as the updater this installer installs, is another attack vector for intruders trying to get at your data.</p>
<p>For what it’s worth, the API plugin does work if you only copy the stuff in /Library/Internet Plug-Ins to a computer or to your user account, so it appears that you can still use the plugin in a secure environment, you’ll just have to update it yourself and not have Google do it for you.</p>
<p>I’ve also mentioned this on the <a title="Mac Plugin Installer Installs Software Update - Google Earth Browser Plugin | Google Groups" href="http://groups.google.com/group/google-earth-browser-plugin/browse_thread/thread/146882feca2788c3" target="_blank">official Google Group</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/12/04/google-delivers-mac-google-earth-api-plugin-but-at-what-cost/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>New Safari 3.2 Feature: Secure Website Identification</title>
		<link>http://blog.slaunchaman.com/2008/11/17/new-safari-32-feature-secure-website-identification/</link>
		<comments>http://blog.slaunchaman.com/2008/11/17/new-safari-32-feature-secure-website-identification/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 15:06:01 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Mac Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=96</guid>
		<description><![CDATA[Here’s a quick tip that slipped through the blogosphere (at least none of the Mac blogs I subscribe to featured it): in Safari 3.2, released last week, Apple’s added a feature from Firefox 3’s “awesome bar”: when you’re on a secure website, such as a bank’s, that has identification information, it’s displayed in green (though [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s a quick tip that slipped through the blogosphere (at least none of the Mac blogs I subscribe to featured it): in Safari 3.2, released last week, Apple’s added a feature from Firefox 3’s “awesome bar”: when you’re on a secure website, such as a bank’s, that has identification information, it’s displayed in green (though in Safari it’s at the top-right of the title bar).  A screenshot:</p>
<p> </p>
<div id="attachment_97" class="wp-caption aligncenter" style="width: 298px"><img class="size-full wp-image-97" title="Safari 3.2 Title Bar Security" src="http://blog.slaunchaman.com/wp-content/uploads/2008/11/picture-1.png" alt="Safari 3.2 adds secure website information to the title bar." width="288" height="80" /><p class="wp-caption-text">Safari 3.2 adds secure website information to the title bar.</p></div>
<p>Along with <a href="http://www.tuaw.com/2008/11/13/apple-releases-safari-3-2-including-security-updates/">a phishing filter</a>, it looks like Safari is stepping up to the plate as a secure browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2008/11/17/new-safari-32-feature-secure-website-identification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

