<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>gyttja</title>
	<atom:link href="http://gyttja.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gyttja.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Mon, 05 Dec 2011 08:27:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gyttja.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>gyttja</title>
		<link>http://gyttja.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gyttja.wordpress.com/osd.xml" title="gyttja" />
	<atom:link rel='hub' href='http://gyttja.wordpress.com/?pushpress=hub'/>
		<item>
		<title>CrashPlan on QNAP</title>
		<link>http://gyttja.wordpress.com/2011/10/09/crashplan-on-qnap/</link>
		<comments>http://gyttja.wordpress.com/2011/10/09/crashplan-on-qnap/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 20:09:41 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[QNAP]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[CrashPlan]]></category>

		<guid isPermaLink="false">http://gyttja.wordpress.com/?p=111</guid>
		<description><![CDATA[First up on my QNAP: offsite backup of my data in &#8220;the cloud&#8221;. QNAP&#8217;s recommended and integrated cloud backup provider was a bit too expensive for my taste, especially since I plan to backup nearly 1TB of data. After some serious googling I found the perfect candidate: CrashPlan. CrashPlan&#8217;s software–written in Java–has two components, a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=111&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First up on my <a href="http://gyttja.wordpress.com/2011/10/08/auf-wiedersehen-frankenstein-hello-qnap/" title="Auf Wiedersehen Frankenstein, hello QNAP">QNAP</a>: offsite backup of my data in &#8220;the cloud&#8221;. QNAP&#8217;s recommended and integrated cloud backup provider was a bit too expensive for my taste, especially since I plan to backup nearly 1TB of data. After some serious googling I found the perfect candidate: <a title="CrashPlan" href="http://www.crashplan.com/" target="_blank">CrashPlan</a>.</p>
<p>CrashPlan&#8217;s software–written in Java–has two components, a server and a GUI client. This makes it a perfect candidate for QNAP. Get the server running in headless mode on my QNAP, then connect to it via the GUI client from my desktop machine.</p>
<ul>
<li>First up with the QNAP, install <a title="Install Optware IPKG" href="http://wiki.qnap.com/wiki/Install_Optware_IPKG" target="_blank">Optware IPKG</a>.</li>
<li>Then follow Cokeman&#8217;s excellent guide for <a title="CrashPlan QPKG" href="http://cokeman.dk/qnap/crashplan" target="_blank">CrashPlan on a QNAP</a>.</li>
<li>Installed <a href="http://www.crashplan.com/consumer/download.html?os=Mac" title="CrashPlan OSX" target="_blank">CrashPlan for OSX</a> and modded the <code>ui.properties</code> file to <code>servicePort=4200</code> as in <a href="http://support.crashplan.com/doku.php/how_to/configure_a_headless_client" title="Connect to headless engine" target="_blank">CrashPlan&#8217;s docs</a> (to edit I used TextMate with custom command-line alias &#8220;mate&#8221;):<br />
<code>$ mate /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties</code></li>
<li>Added a tunnel to my QNAP in <a href="http://sshkeychain.sourceforge.net/" title="SSHKeyChain" target="_blank">SSHKeyChain</a> (an excellent program to manage SSH connections and tunnels):<br />
<div id="attachment_117" class="wp-caption alignnone" style="width: 310px"><a href="http://gyttja.files.wordpress.com/2011/10/crashplan-tunnel.png"><img src="http://gyttja.files.wordpress.com/2011/10/crashplan-tunnel.png?w=300&#038;h=292" alt="SSHKeyChain CrashPlan tunnel configuration" title="SSHKeyChain CrashPlan tunnel configuration" width="300" height="292" class="size-medium wp-image-117" /></a><p class="wp-caption-text">SSHKeyChain CrashPlan tunnel configuration</p></div>
</li>
<li>Open CrashPlan on Mac. Because of the <code>ui.properties</code> configuration change, you will now be connecting from CrashPlan&#8217;s Mac GUI to the CrashPlan engine on QNAP. Go through the CrashPlan setup, configure backup options, done!<br />
<div id="attachment_130" class="wp-caption alignnone" style="width: 310px"><a href="http://gyttja.files.wordpress.com/2011/10/crashplan-remote.png"><img src="http://gyttja.files.wordpress.com/2011/10/crashplan-remote.png?w=300&#038;h=235" alt="Connecting to headless CrashPlan engine via OSX GUI" title="Connecting to headless CrashPlan engine via OSX GUI" width="300" height="235" class="size-medium wp-image-130" /></a><p class="wp-caption-text">Connecting to headless CrashPlan engine via OSX GUI</p></div></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gyttja.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gyttja.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gyttja.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gyttja.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gyttja.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gyttja.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gyttja.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gyttja.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gyttja.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gyttja.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gyttja.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gyttja.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gyttja.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gyttja.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=111&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gyttja.wordpress.com/2011/10/09/crashplan-on-qnap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cf40f614e21e43a836249a9293fdce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dfuchslin</media:title>
		</media:content>

		<media:content url="http://gyttja.files.wordpress.com/2011/10/crashplan-tunnel.png?w=300" medium="image">
			<media:title type="html">SSHKeyChain CrashPlan tunnel configuration</media:title>
		</media:content>

		<media:content url="http://gyttja.files.wordpress.com/2011/10/crashplan-remote.png?w=300" medium="image">
			<media:title type="html">Connecting to headless CrashPlan engine via OSX GUI</media:title>
		</media:content>
	</item>
		<item>
		<title>Auf Wiedersehen Frankenstein, hello QNAP</title>
		<link>http://gyttja.wordpress.com/2011/10/08/auf-wiedersehen-frankenstein-hello-qnap/</link>
		<comments>http://gyttja.wordpress.com/2011/10/08/auf-wiedersehen-frankenstein-hello-qnap/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 21:36:58 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[QNAP]]></category>

		<guid isPermaLink="false">http://gyttja.wordpress.com/?p=97</guid>
		<description><![CDATA[My homemade server running Ubuntu started to experience strange hardware issues (random crashing, etc). Over the course of a year I replaced and fiddled with memory, motherboard, and hard drives yet still I had random crashes (would even randomly crash running memtest, so I ruled out a software issue). Since the server was my home [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=97&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My homemade server running Ubuntu started to experience strange hardware issues (random crashing, etc). Over the course of a year I replaced and fiddled with memory, motherboard, and hard drives yet still I had random crashes (would even randomly crash running memtest, so I ruled out a software issue). Since the server was my home NAS, I began to rethink the idea of maintaining unreliable hardware (and throwing money away left and right).</p>
<p>Out with Frankenstein, enter the <a title="QNAP TS-459 Pro II Turbo NAS" href="http://www.qnap.com/pro_detail_feature.asp?p_id=165" target="_blank">QNAP TS-459 Pro II Turbo NAS</a>. Fitted with four WD 2TB drives in RAID-5 my new QNAP has been extremely reliable, quiet, energy efficient (measured 39W at load!) and space-saving! Frankenstein was a huge server tower, the new QNAP is a tiny 18x18x24cm block that rests nicely under a cabinet. And quiet enough to be unenclosed: fan noise is unperceptible, yet faint hard drive noise can sometimes be heard if the room is totally silent. The QNAP is connected to a CyberPower UPS (as are my internet modem and router). The UPS and NAS fit nicely under a cabinet in the living room:</p>
<div id="attachment_105" class="wp-caption alignnone" style="width: 310px"><a href="http://gyttja.files.wordpress.com/2011/10/qnap-ups.jpg"><img class="size-medium wp-image-105" title="QNAP TS-459 Pro II Turbo NAS" src="http://gyttja.files.wordpress.com/2011/10/qnap-ups.jpg?w=300&#038;h=200" alt="QNAP TS-459 Pro II Turbo NAS" width="300" height="200" /></a><p class="wp-caption-text">QNAP TS-459 Pro II Turbo NAS and CyberPower DX 600E UPS Green Power</p></div>
<p>The QNAP&#8217;s web GUI is less than perfect (I find it slow, illogical, and limiting) and as I subsequently found out, the command-line configuration is also less than perfect. But the reliability, quietness, and &#8220;it just works&#8221;-feel of the QNAP so far has me quite happy. That said, going from a completely configurable linux server to a more closed system like the QNAP was going to take some getting used to. I plan on writing a series of posts documenting the changes I make to my new QNAP to customize it to be my perfect little AFP NAS.</p>
<p>Stay tuned, more to come!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gyttja.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gyttja.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gyttja.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gyttja.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gyttja.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gyttja.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gyttja.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gyttja.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gyttja.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gyttja.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gyttja.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gyttja.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gyttja.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gyttja.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=97&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gyttja.wordpress.com/2011/10/08/auf-wiedersehen-frankenstein-hello-qnap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cf40f614e21e43a836249a9293fdce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dfuchslin</media:title>
		</media:content>

		<media:content url="http://gyttja.files.wordpress.com/2011/10/qnap-ups.jpg?w=300" medium="image">
			<media:title type="html">QNAP TS-459 Pro II Turbo NAS</media:title>
		</media:content>
	</item>
		<item>
		<title>Reduce the size of MySQL ibdata1 on OSX</title>
		<link>http://gyttja.wordpress.com/2010/11/18/reduce-the-size-of-mysql-ibdata1-on-osx/</link>
		<comments>http://gyttja.wordpress.com/2010/11/18/reduce-the-size-of-mysql-ibdata1-on-osx/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 16:59:35 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gyttja.wordpress.com/?p=50</guid>
		<description><![CDATA[So I finally figured out why my TimeMachine backups were becoming bigger and bigger, 3-4GB backing up every day when I come home from work&#8230; It seems that my MySQL database file (/usr/local/mysql/data/ibdata1) keeps getting larger and larger, unnecessarily, even if I deleted databases, tables, etc. It seems even if I only update a few [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=50&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I finally figured out why my TimeMachine backups were becoming bigger and bigger, 3-4GB backing up every day when I come home from work&#8230; It seems that my MySQL database file (<span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;">/usr/local/mysql/data/ibdata1</span>) keeps getting larger and larger, unnecessarily, even if I deleted databases, tables, etc. It seems even if I only update a few rows in a table in a small database, the ginormous <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;">idbdata1</span> file grows and then get marks as a candidate for backup into TimeMachine. Ugh.</p>
<p>I did some digging and found this interesting tutorial on <a title="Howto: Clean a mysql InnoDB storage engine?" href="http://stackoverflow.com/questions/3927690/howto-clean-a-mysql-innodb-storage-engine" target="_blank">how to clean up InnoDB storage files</a>.  Here I&#8217;ll explain what I specifically did on my OSX 10.6.5 machine with MySQL v5.1.38.</p>
<ol>
<li>If you&#8217;re not a cowboy, stop MySQL, backup all files, then start MySQL again (I used the System pref to stop/start MySQL, feel free to use the command-line instead):<br />
<img src="http://gyttja.files.wordpress.com/2010/11/mysql-stop-pref.png?w=630&#038;h=150" alt="" title="mysql-stop-pref" width="630" height="150" class="alignnone size-full wp-image-85" /><br />
<pre class="brush: plain; gutter: false; highlight: [1]; light: true; wrap-lines: false;">
$ sudo cp -R /usr/local/mysql/data /usr/local/mysql/data.bak
</pre><br />
<img src="http://gyttja.files.wordpress.com/2010/11/mysql-start-pref.png?w=630&#038;h=150" alt="" title="mysql-start-pref" width="630" height="150" class="alignnone size-full wp-image-84" />
	</li>
<li>Export all data from MySQL:<br />
<pre class="brush: plain; gutter: false; highlight: [1]; light: true; wrap-lines: false;">
$ mysqldump -u root -p --all-databases &gt; alldatabases.sql
</pre>
	</li>
<li>Drop databases in MySQL (except &#8220;mysql&#8221; and &#8220;information_schema&#8221;):<br />
<pre class="brush: plain; gutter: false; highlight: [1,2,3]; light: true; wrap-lines: false;">
$ mysql -u root -p
mysql&gt; show databases;
mysql&gt; drop database XXXX;
</pre><br />
or use <a title="Drop All Databases in MySQL" href="http://rootedlabs.wordpress.com/2009/10/03/drop-all-databases-in-mysql/" target="_blank">this great one-liner to delete all databases</a>, modded a bit so it would work for me:<br />
<pre class="brush: plain; gutter: false; highlight: [1,2,3,4]; light: true; wrap-lines: false;">
# measure twice, cut once... make sure we are deleting what we should be deleting
$ mysql -u root -p  -e &quot;show databases&quot; | grep -v Database | grep -v mysql | grep -v information_schema | awk '{print &quot;drop database &quot; $1 &quot;;select sleep(0.1);&quot;}'
# now delete them
$ mysql -u root -p  -e &quot;show databases&quot; | grep -v Database | grep -v mysql | grep -v information_schema | awk '{print &quot;drop database &quot; $1 &quot;;select sleep(0.1);&quot;}' | mysql -uroot -ppassword
</pre>
	</li>
<li>Stop MySQL again</li>
<li>Add the following to the <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;">[mysqld]</span> section in <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;">/etc/my.cnf</span>:<br />
<pre class="brush: plain; gutter: false; highlight: [1,2]; light: true; wrap-lines: false;">
[mysqld]
innodb_file_per_table
</pre>
	</li>
<li>Remove the files:<br />
<pre class="brush: plain; gutter: false; highlight: [1,2,3]; light: true; wrap-lines: false;">
$ sudo rm /usr/local/mysql/data/ibdata1
$ sudo rm /usr/local/mysql/data/ib_logfile0
$ sudo rm /usr/local/mysql/data/ib_logfile1
</pre>
	</li>
<li>Start MySQL again</li>
<li>Reload the databases from the sql dump-file:<br />
<pre class="brush: plain; gutter: false; highlight: [1,2]; light: true; wrap-lines: false;">
$ mysql -u root -p &lt; alldatabases.sql
</pre>
	</li>
<li>Verify that your database(s) are working properly</li>
<li>Delete the backup<br />
<pre class="brush: plain; gutter: false; highlight: [1]; light: true; wrap-lines: false;">
$ sudo rm -rf /usr/local/mysql/data.bak
</pre>
	</li>
<li>Done!</li>
</ol>
<p>After this modification my TimeMachine backups are much more reasonably-sized. Very nice!</p>
<p>Furthermore, I noticed the same infamously large <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;">ibdata1</span> file on our continuous-integration build server at work: it was 40GB! I applied the same modifications as above. That server runs Ubuntu 10.10, the MySQL files are located in <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;">/var/lib/mysql/data</span>, but otherwise the steps are pretty much the same. Even build-server bongo seems snappier now, and the total size of the MySQL data folder is 1GB (insane that there was 39GB of &#8220;dead&#8221; data in the ibdata1-file&#8230;)</p>
<p>Very happy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gyttja.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gyttja.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gyttja.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gyttja.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gyttja.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gyttja.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gyttja.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gyttja.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gyttja.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gyttja.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gyttja.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gyttja.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gyttja.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gyttja.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=50&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gyttja.wordpress.com/2010/11/18/reduce-the-size-of-mysql-ibdata1-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cf40f614e21e43a836249a9293fdce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dfuchslin</media:title>
		</media:content>

		<media:content url="http://gyttja.files.wordpress.com/2010/11/mysql-stop-pref.png" medium="image">
			<media:title type="html">mysql-stop-pref</media:title>
		</media:content>

		<media:content url="http://gyttja.files.wordpress.com/2010/11/mysql-start-pref.png" medium="image">
			<media:title type="html">mysql-start-pref</media:title>
		</media:content>
	</item>
		<item>
		<title>AirPrint on Ubuntu</title>
		<link>http://gyttja.wordpress.com/2010/11/11/airprint-on-ubuntu/</link>
		<comments>http://gyttja.wordpress.com/2010/11/11/airprint-on-ubuntu/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 22:12:49 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[AirPrint]]></category>

		<guid isPermaLink="false">http://gyttja.wordpress.com/?p=3</guid>
		<description><![CDATA[How to print from iPhone/iPad (iOS 4.2) via Ubuntu I just noticed that with the latest 10.6.5 update, Apple at the last minute disabled support for printing from iOS 4.2 devices to shared printers in OSX. Instead of trying to overwrite new drivers with prerelease versions, I thought that there must be someone, somewhere out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=3&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>How to print from iPhone/iPad (iOS 4.2) via Ubuntu</h2>
<p>I just noticed that with the latest 10.6.5 update, Apple at the last minute <a href="http://www.macrumors.com/2010/11/10/steve-jobs-replies-regarding-rumors-of-airprint-issues/" target="_blank">disabled support for printing from iOS 4.2 devices to shared printers in OSX</a>. Instead of trying to <a href="http://blog.steventroughtonsmith.com/2010/11/return-airprint-sharing-to-mac-os-x.html" target="_blank">overwrite new drivers with prerelease versions</a>, I thought that there must be someone, somewhere out there who has figured out how to do this using the fine, free tools available to us. I like open standards, open tools, open source.</p>
<p>From what I understand AirPrint supports printing two ways:</p>
<ul>
<li>Via officially-supported HP ePrint printers that advertise themselves on your subnet</li>
<li>Via shared printers from Mac/Windows (this is the part that apparently got axed, at least in the latest 10.6.5 update&#8230; don&#8217;t know how Windows will fare)</li>
</ul>
<p>I don&#8217;t have a new HP ePrint printer, but I do have a wonderful Ubuntu 10.04 server running avahi (open source Bonjour/mDNS responder)&#8230; I wonder if there&#8217;s a way to have my server act as an AirPrint device and then send the print job to my networked printer?</p>
<p>Enter <a href="http://www.rho.cc/index.php/linux2/48-misc/104-printing-from-ipad-airprint-via-cups" target="_blank">this post</a>. Excellent! Set up a Bonjour service, point it to a shared printer, done!</p>
<p>Here&#8217;s what I had to do in Ubuntu  to get printing to work, YMMV:</p>
<ul>
<li>Install my printer (networked HP Color LaserJet 1515n) using the graphical configuration utility (System-&gt;Administration-&gt;Printing). Make sure the printer is shared.</li>
<li>Updated my /etc/cups/cupsd.conf configuration to allow network access (default Ubuntu configuration is for localhost only):<br />
<pre class="brush: plain; gutter: false; highlight: [1,2,3,4,5]; light: true; wrap-lines: false;">
# Only listen for connections from the local machine.
#Listen localhost:631
#Listen /var/run/cups/cups.sock
Port 631
ServerAlias *
</pre></p>
<p>and</p>
<p><pre class="brush: plain; gutter: false; highlight: [1,2,3,4,5]; light: true; wrap-lines: false;">
# Restrict access to the server...
&lt;Location /&gt;
Order allow,deny
Allow @LOCAL
&lt;/Location&gt;
</pre></li>
<li>Tested remote access to Ubuntu&#8217;s cups web GUI from my laptop (to make sure machines other than the Ubuntu server had access to cups): http://172.16.0.50:631/printers/</li>
<li>Tested that I could print remotely from my laptop to the new shared printer on Ubuntu (simple &#8220;Add Printer&#8221; in OSX and then print test page)</li>
<li>Configured avahi with a new printer service /etc/avahi/services/printer.service. As mentioned in the original link, rp and adminurl are the most important configuration bits.<br />
<pre class="brush: plain; gutter: false; highlight: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]; light: true; wrap-lines: false;">
&lt;?xml version=&quot;1.0&quot; standalone='no'?&gt;&lt;!--*-nxml-*--&gt;
&lt;!DOCTYPE service-group SYSTEM &quot;avahi-service.dtd&quot;&gt;
&lt;service-group&gt;
  &lt;name&gt;HP 1515n&lt;/name&gt;
  &lt;service&gt;
    &lt;type&gt;_ipp._tcp&lt;/type&gt;
    &lt;subtype&gt;_universal._sub._ipp._tcp&lt;/subtype&gt;
    &lt;port&gt;631&lt;/port&gt;
    &lt;txt-record&gt;txtver=1&lt;/txt-record&gt;
    &lt;txt-record&gt;qtotal=1&lt;/txt-record&gt;
    &lt;txt-record&gt;rp=printers/hp-cp1515n&lt;/txt-record&gt;
    &lt;txt-record&gt;ty=HP 1515n&lt;/txt-record&gt;
    &lt;txt-record&gt;adminurl=http://172.16.0.50:631/printers/hp-cp1515n&lt;/txt-record&gt;
    &lt;txt-record&gt;note=HP Color LaserJet cp1515n&lt;/txt-record&gt;
    &lt;txt-record&gt;priority=0&lt;/txt-record&gt;
    &lt;txt-record&gt;product=virtual Printer&lt;/txt-record&gt;
    &lt;txt-record&gt;printer-state=3&lt;/txt-record&gt;
    &lt;txt-record&gt;printer-type=0x801046&lt;/txt-record&gt;
    &lt;txt-record&gt;Transparent=T&lt;/txt-record&gt;
    &lt;txt-record&gt;Binary=T&lt;/txt-record&gt;
    &lt;txt-record&gt;Fax=F&lt;/txt-record&gt;
    &lt;txt-record&gt;Color=T&lt;/txt-record&gt;
    &lt;txt-record&gt;Duplex=T&lt;/txt-record&gt;
    &lt;txt-record&gt;Staple=F&lt;/txt-record&gt;
    &lt;txt-record&gt;Copies=T&lt;/txt-record&gt;
    &lt;txt-record&gt;Collate=F&lt;/txt-record&gt;
    &lt;txt-record&gt;Punch=F&lt;/txt-record&gt;
    &lt;txt-record&gt;Bind=F&lt;/txt-record&gt;
    &lt;txt-record&gt;Sort=F&lt;/txt-record&gt;
    &lt;txt-record&gt;Scan=F&lt;/txt-record&gt;
    &lt;txt-record&gt;pdl=application/octet-stream,application/pdf,application/postscript,image/jpeg,image/png,image/urf&lt;/txt-record&gt;
    &lt;txt-record&gt;URF=W8,SRGB24,CP1,RS600&lt;/txt-record&gt;
  &lt;/service&gt;
&lt;/service-group&gt;
</pre></li>
<li>Printed a page from iOS simulator<br />
<a href="http://gyttja.files.wordpress.com/2010/11/print-dn.png"><img class="alignnone size-full wp-image-9" title="AirPrinting DN från iOS simulator" src="http://gyttja.files.wordpress.com/2010/11/print-dn.png?w=630&#038;h=816" alt="" width="630" height="816" /></a></li>
<li>Printed a page from iPhone 3GS with iOS 4.2.1:<br />
<img class="alignnone size-medium wp-image-93" title="iphone-airprint" src="http://gyttja.files.wordpress.com/2010/11/iphone-airprint.png?w=200&#038;h=300" alt="" width="200" height="300" /></li>
<li>Done!</li>
</ul>
<p>I&#8217;m not sure if all printers will work out of the box with this configuration, but since my printer supports PostScript I assume it can rasterize pretty much anything iOS will send it. In any case, I didn&#8217;t have to configure any filters or print settings. It just worked. Hopefully Apple won&#8217;t further cripple AirPrinting by also &#8220;patching&#8221; iOS so that only HP ePrint devices are supported and it no longer recognizes Bonjour services with subtype <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">_universal._sub._ipp._tcp</span>. We&#8217;ll see what happens!</p>
<p>Now all I need is an iPad. And a reason to print.</p>
<p><em>Updated 2010-11-21: repaired some mangled XML due to WordPress&#8217;s less-than-nice HTML-parsing</em></p>
<p><em>Updated 2010-11-23: added post subtitle, added screenshot from iPhone</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gyttja.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gyttja.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gyttja.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gyttja.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gyttja.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gyttja.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gyttja.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gyttja.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gyttja.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gyttja.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gyttja.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gyttja.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gyttja.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gyttja.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gyttja.wordpress.com&amp;blog=17597025&amp;post=3&amp;subd=gyttja&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gyttja.wordpress.com/2010/11/11/airprint-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cf40f614e21e43a836249a9293fdce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dfuchslin</media:title>
		</media:content>

		<media:content url="http://gyttja.files.wordpress.com/2010/11/print-dn.png" medium="image">
			<media:title type="html">AirPrinting DN från iOS simulator</media:title>
		</media:content>

		<media:content url="http://gyttja.files.wordpress.com/2010/11/iphone-airprint.png?w=200" medium="image">
			<media:title type="html">iphone-airprint</media:title>
		</media:content>
	</item>
	</channel>
</rss>
