<?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>Something better to do &#187; Free software</title>
	<atom:link href="http://blog.kamens.us/category/computers/free-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kamens.us</link>
	<description>Musings of an indignant mind</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:49:05 +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>Free Linux cloud backups for cheap bastards</title>
		<link>http://blog.kamens.us/2011/11/19/free-linux-cloud-backups-for-cheap-bastards/</link>
		<comments>http://blog.kamens.us/2011/11/19/free-linux-cloud-backups-for-cheap-bastards/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 23:27:41 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.kamens.us/?p=2504</guid>
		<description><![CDATA[The last time I looked, there were no options I was happy with for backing up my Linux PC in the cloud for a reasonable price. That may have changed, and perhaps if I were less stubborn I&#8217;d pay CrashPlan a few bucks per month to back up my system,  but I feel compelled to [...]]]></description>
			<content:encoded><![CDATA[<p>The last time I looked, there were no options I was happy with for backing up my Linux PC in the cloud for a reasonable price. That <a href="http://www.onlinebackupdeals.com/linux/best-linux-online-backup-options/" target="_blank">may have changed</a>, and perhaps if I were less stubborn I&#8217;d pay <a href="http://www.crashplan.com/" target="_blank">CrashPlan</a> a few bucks per month to back up my system,  but I feel compelled to build my own backup infrastructure for three reasons: (1) I want complete control over it; (2) I worry about a company backing up my data going belly-up and leaving me high and dry; and (3) I&#8217;m a cheap bastard.</p>
<p>Until recently I was backing up my data into a ReiserFS filesystem being stored in the Amazon S3 cloud via <a href="http://code.google.com/p/s3backer/" target="_blank">s3backer</a>. That was costing me on average a little under $5 per month in storage and transaction costs.</p>
<p>Then I got an offer from <a href="http://www.appsumo.com/" target="_blank">AppSumo</a> for 10GB of storage for life from <a href="http://www.letscrate.com/" target="_blank">LetsCrate</a> for only $25. That got me wondering&#8230; There are a bunch of cloud storage / file sharing services on the Internet right now, and just about every one of them offers some amount of storage for free. Could I find away to take advantage of all that free storage to reduce my backup costs almost to nothing?</p>
<h3><span id="more-2504"></span>What&#8217;s out there</h3>
<p>Here are the cloud storage services that offer free Linux-accessible storage that I know about (if you know of others, please post a comment or <a href="mailto:jik@kamens.us" target="_blank">email me</a>!):</p>
<table border="1">
<tbody>
<tr>
<th>Service</th>
<th>Free space</th>
<th>Referral link</th>
</tr>
<tr>
<td><a href="http://www.adrive.com/" target="_blank">ADrive</a></td>
<td>50GB</td>
<td>n/a</td>
</tr>
<tr>
<td><a href="http://skydrive.live.com/" target="_blank">SkyDrive</a></td>
<td>25GB</td>
<td>n/a</td>
</tr>
<tr>
<td><a name="SugarSync" href="http://www.sugarsync.com/" target="_blank"></a>SugarSync <a href="#n1">[1]</a></td>
<td>5GB, plus bonuses for doing various things like installing clients, plus 500MB per referral</td>
<td><a href="https://www.sugarsync.com/referral?rf=e3rip478tyc6a&amp;utm_source=txemail&amp;utm_medium=email&amp;utm_campaign=referral" target="_blank">Thanks!</a></td>
</tr>
<tr>
<td><a name="IDrive" href="http://www.idrive.com/" target="_blank"></a>IDrive <a href="#n2">[2]</a></td>
<td>5GB, plus 10GB if you let IDrive send a promotional email to <em>all</em> of your contacts, plus 1GB per referral up to a limit of 50GB</td>
<td><a href="http://www.idrive.com/?uid=X7T7P3R9G8" target="_blank">Thanks!</a></td>
</tr>
<tr>
<td><a href="http://www.opendrive.com/" target="_blank">OpenDrive</a></td>
<td>5GB</td>
<td>n/a</td>
</tr>
<tr>
<td><a name="Dropbox" href="http://www.dropbox.com/" target="_blank"></a>Dropbox</td>
<td>2GB, plus 250MB just for setting up the client successfully, plus up to 8GB more in 250MB increments for referrals <a href="#n3">[3]</a></td>
<td><a href="http://db.tt/rwauD66u" target="_blank">Thanks!</a></td>
</tr>
<tr>
<td><a name="Syncplicity" href="http://www.syncplicity.com/" target="_blank"></a>Syncplicity <a href="#n4">[4]</a></td>
<td>2GB plus referrals (1GB each up to 3GB)</td>
<td><a href="https://my.syncplicity.com/Signup/UserSignup.aspx?plan=free&amp;token=UJEDCT23" target="_blank">Thanks!</a></td>
</tr>
<tr>
<td><a style="text-decoration: line-through;" name="ZumoDrive" href="http://www.zumodrive.com/" target="_blank"></a>ZumoDrive <a href="#n5">[5]</a></td>
<td>2GB</td>
<td>n/a</td>
</tr>
<tr>
<td><a href="http://www.teamdrive.com/" target="_blank">TeamDrive</a></td>
<td>2GB, plus 250MB per referral up to 8GB</td>
<td><a href="http://www.teamdrive.com/en/ref/dkse93ae" target="_blank">Thanks!</a></td>
</tr>
<tr>
<td><a name="SpiderOak" href="http://www.spideroak.com/" target="_blank"></a>SpiderOak <a href="#n6">[6]</a></td>
<td>2GB, plus 1GB per referral up to 50GB</td>
<td><a href="https://spideroak.com/download/referral/f88ee845d9542c43736171e7a2edb70d" target="_blank">Thanks!</a></td>
</tr>
<tr>
<td><a name="LetsCrate" href="http://www.letscrate.com/" target="_blank"></a>LetsCrate <a href="#n7">[7]</a></td>
<td>1GB</td>
<td>n/a</td>
</tr>
<tr>
<td><a href="http://docs.google.com/">Google Docs</a></td>
<td>1GB</td>
<td>n/a</td>
</tr>
</tbody>
</table>
<div style="font-size: 75%;">
<p style="padding-left: 30px;">Notes:</p>
<p style="padding-left: 30px;"><a name="n1" href="#SugarSync"></a>[1] SugarSync isn&#8217;t directly accessible from Linux, but you can run it easily under WINE.</p>
<p style="padding-left: 30px;"><a name="n2" href="#IDrive"></a>[2] IDrive isn&#8217;t directly accessible from Linux, and it doesn&#8217;t seem to play well with WINE, at least as of WINE 1.3.29, so you&#8217;ll have to run Windows inside of VirtualBox or something if you want to use it. Also, under Windows, you have to use msconfig to prevent it from starting up when you log in.</p>
<p style="padding-left: 30px;"><a name="n3" href="#Dropbox"></a>[3] If you use an email address ending in &#8220;.edu&#8221; and use that to register for your Dropbox account, and then validate it at <a href="http://dropbox.com/edu" target="_blank">http://dropbox.com/edu</a>, you get 500MB per referral instead of 250MB. You can even change your Dropbox email address to a &#8220;.edu&#8221; one and then use the link above to get the extra referral space retroactively!</p>
<p style="padding-left: 30px;"><a name="n4" href="#Syncplicity"></a>[4] Syncplicity isn&#8217;t directly accessible from Linux, and I can&#8217;t confirm whether it runs under WINE because winetricks won&#8217;t install .NET 3.0 properly on an x86_64 system like mine. Under Windows, you have to use msconfig to prevent it from starting up when you log in.</p>
<p style="padding-left: 30px;"><a name="n5" href="#ZumoDrive"></a>[5] The Linux client provided by ZumoDrive doesn&#8217;t work on Fedora 16 Linux, and I couldn&#8217;t figure out how to get it to work. The Windows client installs, but I couldn&#8217;t find anywhere in the client or on the ZumoDrive Web site where I could actually sign up for a new account! Maybe they&#8217;re not accepting new users anymore or something?</p>
<p style="padding-left: 30px;"><a name="n6" href="#SpiderOak"></a>[6] SpiderOak&#8217;s web site doesn&#8217;t work in Google Chrome on Linux; it hangs when you try to visit it.</p>
<p style="padding-left: 30px;"><a name="n7" href="#LetsCrate"></a>[7] So far, I am unimpressed with LetsCrate. Once you actually get a file into their system, it seems to be safe, but getting files in can be a challenge, since the web app is flaky and unreliable. Perhaps they will improve over time. (I wrote this in October 2011)</p>
</div>
<p>That&#8217;s 50GB of free space in the cloud (43GB if you don&#8217;t have a Windows VM), if you can figure out how to use it effectively. So, how do you use it effectively?</p>
<h3>The backup script: crateify.pl</h3>
<p>My answer is <a href="http://stuff.mit.edu/~jik/software/crateify.pl.txt" target="_blank">crateify.pl</a>, a simple Perl script I wrote for this purpose.</p>
<p>Without further ado, here is its embedded Perl &#8220;POD&#8221; documentation:</p>
<hr />
<h2><a name="name"></a>NAME</h2>
<p>crateify.pl &#8211; Package up files for backing up in the cloud</p>
<p>&nbsp;</p>
<h2><a name="description"></a>DESCRIPTION</h2>
<p>This script packages files within a directory tree into compressed, encrypted tar &#8220;crates&#8221; that can be easily uploaded to free cloud storage accounts, providing a sort of poor-man&#8217;s cloud backup solution.</p>
<p>The files are packaged in chronological order, i.e., oldest files first, to minimize the frequency with which you have to rebuild crates. Files that are updated between runs of the script are repackaged in new crates.</p>
<p>&nbsp;</p>
<h2><a name="configuration_settings"></a>CONFIGURATION SETTINGS</h2>
<p>The following variables can and should be edited in the script before you use it:</p>
<dl>
<dt><strong><a name="_backup_dir"></a>$backup_dir</strong></dt>
<dd>The directory whose contents should be crated.</p>
<p>Note that files with newlines in their names will not be crated.</p>
</dd>
<dt><strong><a name="_data_dir"></a>$data_dir</strong></dt>
<dd>The directory in which crates and associated metadata files should be stored.</p>
</dd>
<dt><strong><a name="_gpg_dir"></a>$gpg_dir</strong></dt>
<dd>The directory in which the keyring containing your GPG key (used to encrypt the crates for safe storage online) is stored.</p>
</dd>
<dt><strong><a name="_gpg_key"></a>$gpg_key</strong></dt>
<dd>The identifier of the GPG key that should be used to encrypt the crates.</p>
<p><strong>NOTE:</strong> Make sure you have copies of your public and private GPG keys backed up somewhere safe <em>not</em> inside a crate. If your computer crashes and you need to restore from your backup, it won&#8217;t do any good if you can&#8217;t decrypt it!</p>
</dd>
<dt><strong><a name="_archive_size"></a>$archive_size</strong></dt>
<dd>The (pre-compression, pre-encryption) size of each crate, in bytes. A crates can end up being much bigger than this if the last file inserted into it is large.</p>
</dd>
<dt><strong><a name="_exclude"></a>@exclude</strong></dt>
<dd>Regular expressions (relative to the root of <em>$backup_dir</em>) of directories and files to be excluded from crating.</p>
<p>Here&#8217;s a trick I use to find out what&#8217;s taking up space in my crates:</p>
<pre> cd $backup_dir
 sed -e 's/ [0-9]*$//' $data_dir/crate-##### | xargs -d '\n' ls -lSr</pre>
<p>This lists the files in the specific crate, in size order, so you an see what&#8217;s taking up a lot of space. I do this whenever my nightly backup report email tells me that a larger than expected crate was built.</p>
<p>Note that I personally do not back up my &#8220;live&#8221; hard drive, but rather a mirror hard drive maintained with rdiff-backup. Therefore, most of the files I would not want/need to crate are already excluded from my <em>$backup_dir</em>, which is why my @exclude list is so short.</p>
<p>If you <em>do</em> backup of your live hard drive, then make sure you exclude cloud storage directories, e.g., ~/Dropbox, especially if you store crates in them! Otherwise, you&#8217;ll create a loop where each time you create new crates in a backup, your old crates will be included in them, which would obviously be Very Bad.</p>
<p>If you specify both @exclude and @include, then @include is applied first and @exclude is applied to what&#8217;s left.</p>
</dd>
<dt><strong><a name="_include"></a>@include</strong></dt>
<dd>Regular expressions (relative to the root of <em>$backup_dir</em>) of directories and files to be included from crating.</p>
<p>If you specify both @exclude and @include, then @include is applied first and @exclude is applied to what&#8217;s left.</p>
</dd>
</dl>
<p>&nbsp;</p>
<h2><a name="options"></a>OPTIONS</h2>
<dl>
<dt><strong><a name="crates"></a>&#8211;crates=<em>#</em></strong></dt>
<dd>Produce (at most) te specified number of crates, rather than just one new crate, which is the default.</p>
<p>This is faster when you want to produce multiple crates, since it won&#8217;t have to rescan the entire backup directory for each one.</p>
</dd>
<dt><strong><a name="full"></a>&#8211;full</strong></dt>
<dd>Create enough crates to hold everything that currently needs to be crated.</p>
</dd>
<dt><strong><a name="scan"></a>&#8211;scan</strong></dt>
<dd>Update meta-data files (see below) without building any new crates.</p>
</dd>
<dt><strong><a name="quiet"></a>&#8211;quiet</strong></dt>
<dd>Don&#8217;t print warnings about updated or deleted files in existing crates.</p>
</dd>
</dl>
<p>&nbsp;</p>
<h2><a name="compacting_crates"></a>COMPACTING CRATES</h2>
<p>The early crates you build will probably be relatively static, assuming that you have a lot of old data that isn&#8217;t likely to change anymore.</p>
<p>However, over time your crates will accumulate files that are obsolete because they&#8217;ve been deleted or updated versions have been packed into newer crates. Each time you run it, the script prints warnings about such files.</p>
<p>You will probably want to occasionally &#8220;compact&#8221; your crates to remove such obsolete files. To do this, simply remove the corresponding crate-<em>#####</em> files from <em>$data_dir</em>, and the corresponding compressed, encrypted tar files from wherever you put them, and the script will repack the files that were in those crates the next time you run it.</p>
<p>&nbsp;</p>
<h2><a name="meta_data_files"></a>META-DATA FILES</h2>
<p>The script creates the following meta-data files:</p>
<dl>
<dt><strong><a name="crate"></a>crate-<em>#####</em></strong></dt>
<dd>Listings of the files in each crate. The script needs these to work, so you should leave them in <em>$data_dir</em> even if you move the crates themselves into the cloud.</p>
</dd>
<dt><strong><a name="deleted"></a>deleted</strong></dt>
<dd>A list of the crated files that have been deleted since they were crated.</p>
</dd>
<dt><strong><a name="updated"></a>updated</strong></dt>
<dd>A list of the crated files that have been updated since they were crated, i.e., files that have obsolete versions in one or more crates, and will also, if your crates are up-to-date, have a <em>current</em> version in one crate.</p>
</dd>
<dt><strong><a name="packing_list"></a>packing_list</strong></dt>
<dd>Temporary file created and used while packing crates. It should not exist between successful runs of the script, but you shouldn&#8217;t create a file with this name in <em>$data_dir</em> or it&#8217;ll get overwritten.</p>
</dd>
<dt><strong><a name="excludes"></a>excludes</strong></dt>
<dd>A list of all te files in all of the crates, intended to be used to exclude those files from some <em>other</em> backup system.</p>
<p>Suppose you want to use this script to back up your old, static files that never change, but you&#8217;d rather use some other backup system to back up frequently changing files. To do that, you would tell the other backup system to exclude the files listed in <em>$data_dir</em>/excludes.</p>
<p>For example, if you use rsync to backup frequently changing files to a remote filesystem, then you can tell it to &#8220;&#8211;exclude-from <em>$data_dir</em>/excludes&#8221;.</p>
</dd>
</dl>
<p>&nbsp;</p>
<h2><a name="where_to_put_the_crates"></a>WHERE TO PUT THE CRATES</h2>
<p>The crates you build with this script obviously don&#8217;t do much good as a backup if they sit on the same drive as the files being backed up. Here are some examples of what you can do with them to turn them into a real backup.</p>
<ul>
<li>Stick an extra hard drive (internal or external) into your system and put your crates on it. This won&#8217;t do you much good if your house burns down or somebody steals your computer, but it&#8217;ll at least protect you against drive failure.</li>
<li>Make a deal with a friend &#8212; he lets you use unused space on his hard disk to scp your crates to every night when you back up, and vice versa.</li>
<li>Free cloud storage! See <a href="../?p=2504">http://blog.kamens.us/</a> for a list of cloud storage platform which will give you a total of 50GB of free storage just for asking. You can store a lot of crates in 50GB!</li>
<li>Upload them to Amazon S3 or some other commercial cloud storage service.</li>
</ul>
<p>Personally, I have uploaded most of my crates, the ones containing older files that change rarely if ever, by hand to free accounts on SkyDrive and LetScrate. Then, my nightly backup puts new crates in my Dropbox folder, so they get synchronized to the cloud automatically. Occasionally, I compact the Dropbox crates as described above and move some of the compacted crates SkyDrive or LetsCrate as needed.</p>
<p>&nbsp;</p>
<h3><a name="what_if_a_crate_is_too_big"></a>What if a crate is too big?</h3>
<p>You probably have some really huge files (home videos, anyone?) that you want to back up. Since this script doesn&#8217;t split files between crates, any crate containing a really huge file is going to be really huge itself.</p>
<p>Depending on where you store your crates, this may present a problem, since some cloud storage services limit the size of uploaded files.</p>
<p>The easiest solution is to split big crates before uploading it. For example:</p>
<pre>  split -b 50000000 -d crate-#####.tar.bz2.gnupg crate-#####.tar.bz2.gnupg. &amp;&amp; \
  rm crate-#####.tar.bz2.gnupg</pre>
<p>The name of the crate is specified to the &#8220;split&#8221; command a second time with a period at the end of it as the file-name prefix for the split files that are produced.</p>
<p>If you ever need to restore from a split crate, you can cat all of the split files directly into gpg, something like this:</p>
<pre>  cat crate-#####.tar.bz2.gnupg.* | gpg | tar xj</pre>
<p>&nbsp;</p>
<h2><a name="doing_a_restore"></a>DOING A RESTORE</h2>
<p>If you can&#8217;t figure out on your own how to restore from the crates produced by this script, then you probably shouldn&#8217;t use it. CrashPlan is a pretty nice service, and it&#8217;s very inexpensive. <img src='http://blog.kamens.us/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Having said that&#8230;</p>
<p>To restore from a set of crates, you decrypt and untar all the crates in order (preferably as root, so that read-only, updated files can be overwritten) and then remove the ones listed in the &#8220;deleted&#8221; file.</p>
<p>Alternatively, if you just need to restore a specific file, you can look through the crate-<em>#####</em> files in reverse order to find the file you want, and then extract it from the corresponding crate.</p>
<p>&nbsp;</p>
<h2><a name="what_this_script_isn_t"></a>WHAT THIS SCRIPT ISN&#8217;T</h2>
<p>This script isn&#8217;t really intended to preserve historical versions of files or to allow you to recover files that were deleted long ago. It sort of does that if you never compact your crates, but that&#8217;ll eat up a lot of extra storage space for files that change regularly.</p>
<p>Therefore, if you want access to a historical record of your files, as opposed to an emergency recovery snapshot of what you&#8217;ve got on disk right now, this probably isn&#8217;t the right tool for you.</p>
<p>&nbsp;</p>
<h2><a name="author"></a>AUTHOR</h2>
<p>This script was written and is maintained by Jonathan Kamens &lt;<a href="mailto:jik@kamens.us">jik@kamens.us</a>&gt;.</p>
<p>Please let me know if you have questions, comments or suggestions!</p>
<p>&nbsp;</p>
<h2><a name="other_free_backup_solutions"></a>OTHER FREE BACKUP SOLUTIONS</h2>
<p>I won&#8217;t lie to you&#8230; It takes work to set up and use this script for backups. If you&#8217;re the kind of do-it-yourselfer who likes stuff like this, great, but if not, you might be asking yourself, &#8220;Are there other options for backing up my Linux box for free?&#8221;</p>
<p>There are probably quite a few of them, but if you have one that&#8217;s you&#8217;re favorite please free to email me email me and I&#8217;ll add it here, but here&#8217;s the one I like&#8230;</p>
<p>&nbsp;</p>
<h3><a name="crashplan"></a>CrashPlan</h3>
<p>CrashPlan (<a href="http://crashplan.com/">http://crashplan.com/</a>), which I&#8217;ve mentioned elsewhere in this document, will let you back up an unlimited amount of data to their servers for $3.00 per month. This is neat, but they&#8217;ll also let use their easy-to-use software for free to back up your data to your own server instead of theirs.</p>
<p>&#8220;How is that free?&#8221; you&#8217;re asking? Well, if you can find a friend with an Internet connection (who doesn&#8217;t?) and some extra hard drive space (hard drives are <em>really</em> cheap nowadays!), you can back up your system on his hard drive, and <em>vice versa</em>. Both of you need to install the CrashPlan software on your systems and open up your firewalls to allow access to it, and that&#8217;s it. You can configure CrashPlan to limit the amount of bandwidth it uses so it won&#8217;t max out your Internet connection (in fact, it comes configured that way by default). The one caveat is that if you ever do need to do a restore, it&#8217;ll probably take longer from your friend&#8217;s computer than it would from something in the cloud, since most home Internet connections have a slower uplink speed than downlink.</p>
<p>&nbsp;</p>
<h2><a name="donations"></a>DONATIONS</h2>
<p>This script is and always will be free for you to use or modify as you see fit. Having said that, it took me time to write the script, and it takes me time to support the people using it. So if you do use it and save yourself some money, please consider showing your appreciation by sending me a donation at <a href="../support-my-blog/">http://blog.kamens.us/support-my-blog/</a>. Any donation, large or small, is appreciated!</p>
<p>&nbsp;</p>
<h2><a name="copyright"></a>COPYRIGHT</h2>
<p>Copyright (c) 2011 Jonathan Kamens.</p>
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>&nbsp;</p>
<h2><a name="version"></a>VERSION</h2>
<p>$Id: crateify.pl,v 1.35 2012/01/04 13:07:30 jik Exp $</p>
<p>The current version of this script should always be available from <a href="http://stuff.mit.edu/%7Ejik/software/crateify.pl.txt">http://stuff.mit.edu/~jik/software/crateify.pl.txt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2011/11/19/free-linux-cloud-backups-for-cheap-bastards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
			<item>
		<title>Fedora 14 -&gt; Fedora 15 upgrade notes</title>
		<link>http://blog.kamens.us/2011/07/07/fedora-14-fedora-15-upgrade-notes/</link>
		<comments>http://blog.kamens.us/2011/07/07/fedora-14-fedora-15-upgrade-notes/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 03:34:30 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Fedora 15]]></category>
		<category><![CDATA[GNOME 3]]></category>

		<guid isPermaLink="false">http://blog.kamens.us/?p=2270</guid>
		<description><![CDATA[For some reason lost in the mists of time, I decided at about 7am yesterday that I just had to upgrade my Fedora 14 desktop to Fedora 15. Sometimes I get these weird ideas&#8230; I followed the instructions on the Fedora Web site for upgrading using yum, and 2,978 downloaded packages and several hours later, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin-right: 5px; margin-bottom: 5px;" title="Fedora 15 release banner" src="http://fedoraproject.org/static/images/banners/f15release.png" alt="" width="200" height="100" />For some reason lost in the mists of time, I decided at about 7am yesterday that I just <em>had</em> to upgrade my Fedora 14 desktop to Fedora 15. Sometimes I get these weird ideas&#8230;</p>
<p>I followed the <a href="http://fedoraproject.org/wiki/Upgrading_Fedora_using_yum" target="_blank">instructions on the Fedora Web site</a> for upgrading using yum, and 2,978 downloaded packages and several hours later, I had a Fedora 15 system. But the fun was only beginning. Here, for the benefit of others who follow me, are the problems I encountered after the upgrade and what I did to fix them. Much of this I learned from other helpful people on the web, but some of it I had to figure out for myself.</p>
<ul>
<li>First and foremost, my network performance went totally to hell immediately after the upgrade. With the F14 kernel, I was getting about 7 megabit/s on my cable-modem connection, while after the upgrade, I was getting around 500 <strong>kilobit</strong>/s, i.e., 1/14th of the pre-upgrade speed. It appears to be a problem with kernel support for my network adapter, a Realtek RTL8168c/8111c NIC that uses the r8169 kernel driver. I <a href="https://bugzilla.redhat.com/show_bug.cgi?id=719449" target="_blank">filed a bug about it</a>, and then went out today and bought a Netgear GA311 PCI network adapter (RTL8110s using the same r8169 kernel driver), which so far appears to be working just fine.<br />
Note that before I replaced the network adapter, I was able to improve network performance a bit by reducing the MTU on the ethernet device to 1000 (&#8220;sudo ifconfig eth0 mtu 1000&#8243;).</li>
<li>Grub no longer lets me hit ESC or any other key while it&#8217;s doing its boot countdown to bring up a menu of kernels to choose from. If I want to boot a different kernel, I have to edit /boot/grub/grub.conf and reboot. I still haven&#8217;t figured out how to fix this, but I did <a href="https://bugzilla.redhat.com/show_bug.cgi?id=719718" target="_blank">file a bug about it</a>.</li>
<li>The files in my desktop folder weren&#8217;t showing up on my desktop. To address this I had to run gnome-tweak-tool (you may need to &#8220;yum install gnome-tweak-tool&#8221; if you don&#8217;t have it) and enable &#8220;Have file manager handle the desktop&#8221; in the &#8220;File Manager&#8221; settings panel. While I was at it, I made some other settings changes in gnome-tweak-tool:</li>
<ul>
<li>I reduced the default fonts from 10pt to 11pt, since things got a little bigger after the upgrade and I wanted to fit more text on the screen.</li>
<li>I enabled &#8220;Show date in clock&#8221; in the &#8220;Shell&#8221; panel.</li>
<li>I changed &#8220;Arrangement of buttons on the titlebar on the &#8220;Shell&#8221; panel to &#8220;All&#8221; because I wanted maximize and minimize buttons in addition to the default close button.</li>
</ul>
<li>I wanted the Delete key to delete files, but alas, the default Nautilus binding for deleting files changed from Delete to Ctrl-Delete in F15. I found <a href="http://alexsleat.co.uk/tag/fedora-15/" target="_blank">these instructions</a> for fixing this, but I had to tweak them slightly. In particular:</li>
<ul>
<li>Run gconf-editor, not dconf-editor as the other web page suggests.</li>
<li>Find org &gt; gnome &gt; desktop &gt; interface &gt; can-change-accels and check the checkbox next to it.</li>
<li>Open a Nautilus window, e.g., double-click the &#8220;home&#8221; icon on your desktop. Note that it took me a while to figure out that <em>you must do this in a window, i.e., you can&#8217;t do it by right-clicking on a file on the desktop.</em> Yes, this is counter-intuitive.</li>
<li>Select a file in the Nautilus window.</li>
<li>Open on the File menu and move your mouse down to &#8220;Move to Trash&#8221;.</li>
<li>Hit the Delete key to remove the old Ctrl-Delete key binding. Hit it again to create a new key binding, just for Delete.</li>
<li>Uncheck the check-change-accels checkbox and close gconf-editor.</li>
</ul>
<li>For some reason I&#8217;m not sure of, I had nfs-utils and ypbind, neither of which I need or use, installed, and after the upgrade, systemd was trying to start ypbind and idmapd from nfs-utils. I removed both packages with &#8220;yum remove&#8221;.</li>
<li>For some bizarre reason, a bunch of my contacts in Pidgin moved from the groups they were in before to &#8220;Orphans&#8221; at some point during the upgrade. I had to move them all back into their correct groups one by one. Ugh.</li>
<li>No weather applet! Must have weather applet! A little googling led me to:</li>
<ul>
<li>run &#8220;git clone https://github.com/simon04/gnome-shell-extension-weather.git&#8221;;</li>
<li>follow the instructions in README.md for building and installing the extension;</li>
<li>run &#8220;python weather-extension-configurator.py&#8221; to configure the extension settings described in README.md, which is easier than using the gsettings commands there; and</li>
<li>type Alt-F2, &#8220;r&#8221;, Enter to restart the GNOME shell and activate the extension. Thanks very much to the authors of this wonderful extension!</li>
</ul>
<li>I had a launcher file (i.e., a &#8220;*.desktop&#8221; file) created in GNOME 2 that I wanted to add to my GNOME 3 favorites. Unfortunately, it appears that to add a launcher to your favorites it has to be in /usr/share/applications (well, actually, I probably could have put it in ~/.local/share/applications, but I didn&#8217;t think of that at the time). So I copied it into /usr/share/applications, launched it by moving my cursor to the &#8220;hot spot&#8221; in the upper left corner of the screen and typing the name of the launcher; and then when it was running, right-clicked on it in the favorites bar and selected &#8220;Add to Favorites&#8221;.</li>
<li>I wanted to be able to easily clear my desktop, like the &#8220;Show Desktop&#8221; button I had in my GNOME 2 panel. I found <a href="http://blog.ergatides.com/2011/06/26/fedora-gnome-3-show-desktop-keyboard-shortcut/" target="_blank">these instructions</a> for fixing this.</li>
<li>The MySQL daemon wasn&#8217;t starting up properly after the upgrade. Apparently one of the ib_logfile* files in /var/lib/mysql was truncated or something. I did &#8220;sudo rm /var/lib/mysql/ib_logfile*&#8221; and then &#8220;systemctl start mysqld.service&#8221; worked just fine.</li>
<li>The ddclient program which I use to update my dynamic DNS record with OpenDNS.com and DynDNS.org was generating an error on shutdown because it was failing to create its PID file properly on startup. I fixed its init script to address this and submitted a patch <a href="https://bugzilla.redhat.com/show_bug.cgi?id=656572" target="_blank">here</a>.</li>
<li>I desperately wanted an old-style dock visible all the time with my running applications in it. Fortunately I&#8217;m not the only one&#8230; I did &#8220;sudo yum install gnome-shell-extensions-dock&#8221; and then logged out and logged back in, and presto, I&#8217;ve got a dock.</li>
<li>In F14, I used the mail-notification program to generate notifications about new email. It stopped working after the upgrade so I thought it wasn&#8217;t supported in F15. Turns out I just had to weak it a bit.</li>
<ul>
<li>launch gnome-session-properties;</li>
<li>select &#8220;Mail Notification&#8221; and click &#8220;Edit&#8221;; and</li>
<li>remove &#8220;&#8211;sm-disable&#8221; from the command field.</li>
</ul>
<li>The cron daemon wasn&#8217;t starting properly after the upgrade. I&#8217;m not sure why, but I fixed it by doing &#8220;sudo systemctl enable crond.service&#8221; and &#8220;sudo systemctl start crond.service&#8221;.</li>
<li>I had an old-style init script in /etc/init/foo.conf that looked like this:<br />
<tt>start on runlevel 5<br />
stop on runlevel [!5]<br />
exec /home/jik/scripts/foo.pl<br />
respawn</tt><br />
I had to replace it with /lib/systemd/system/foo.service which looks like this:</p>
<pre>[Unit]
Description=Foo server
After=network.target

[Service]
ExecStart=/home/jik/scripts/foo.pl
Restart=always

[Install]
WantedBy=multi-user.target</pre>
<p>Then I did &#8220;sudo systemctl enable foo.service&#8221; and &#8220;sudo systemctl start foo.service&#8221;.</li>
<li>In F14, you could rely on the GNOME session launching script to execute the contents of your .bash_profile file, so that environment variables you set in .bash_profile would be inherited by all child processes. This doesn&#8217;t work in F15, so you have to set environment variables in .bashrc.</li>
</ul>
<p>I&#8217;ll continue to update this list as new things come up.</p>
<p>It took a day or so to get used to, but I think the GNOME 3 UI is growing on me.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2011/07/07/fedora-14-fedora-15-upgrade-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
			<item>
		<title>I guess I&#8217;m now a Mozilla core developer, too</title>
		<link>http://blog.kamens.us/2010/07/23/i-guess-im-now-a-mozilla-core-developer-too/</link>
		<comments>http://blog.kamens.us/2010/07/23/i-guess-im-now-a-mozilla-core-developer-too/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 13:06:19 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[Seamonkey]]></category>
		<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://blog.kamens.us/?p=1653</guid>
		<description><![CDATA[About a month ago, I dived into the world of Mozilla add-on development by adopting the abandoned Thunderbird &#8220;Send Later&#8221; add-on and porting it to Thunderbird 3.1. The learning curve was pretty steep, and it took a lot more work than I expected to stabilize the add-on, but I think it was worth it, considering [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" style="margin-left: 5px; margin-right: 5px;" src="http://www.mozilla.org/images/template/screen/logo_footer.png" alt="" width="109" height="98" />About a month ago, I <a href="http://blog.kamens.us/2010/07/11/i-guess-im-a-mozilla-add-on-developer-now/">dived into the world of Mozilla add-on development</a> by adopting the abandoned <a href="https://addons.mozilla.org/en-US/thunderbird/addon/195275/" target="_blank">Thunderbird &#8220;Send Later&#8221; add-on</a> and porting it to Thunderbird 3.1. The learning curve was pretty steep, and it took a lot more work than I expected to stabilize the add-on, but I think it was worth it, considering that in the two weeks since I released it, <a href="https://addons.mozilla.org/en-US/statistics/addon/195275" target="_blank">almost 2,000 people have downloaded it and at least 444 of them are using it</a>.</p>
<p>Emboldened by that, I decided to take a stab at fixing two bugs in the core Thunderbird code that have been driving me crazy. That, too, required a steep learning curve, but in the end, I was able to submit fixes for two bugs, one quite old and one new in Thunderbird 3.1, affecting a whole bunch of people:</p>
<ul>
<li>It was impossible to remove attachments from some MIME messages, including MIME messages generated by the Mac Mail client (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=351224#c16" target="_blank">Mozilla bug #351224</a>). This bug has been reported by at least 30 different people and was first reported almost four years ago. Fixing it required rewriting pretty much an entire module within C++ source code for Thunderbird.</li>
<li>Thunderbird was incorrectly inserting a couple extra spaces at the beginning of some sent email messages (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=564737#c51" target="_blank">Mozilla bug #564737</a>). This bug was first reported just a few months ago and has already been reported by at least 56 different people. This bug is in the core code that is shared between all Mozilla applications, which means that the fix will impact Firefox, Seamonkey, etc. as well as Thunderbird.</li>
</ul>
<p>Needless to say, there are other things I should have been working on when I got distracted by fixing these bugs. But I&#8217;d almost forgotten how rewarding it is to be able to contribute to open-source software in ways that benefit a lot of people.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2010/07/23/i-guess-im-now-a-mozilla-core-developer-too/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
			<item>
		<title>I guess I&#8217;m a Mozilla add-on developer now</title>
		<link>http://blog.kamens.us/2010/07/11/i-guess-im-a-mozilla-add-on-developer-now/</link>
		<comments>http://blog.kamens.us/2010/07/11/i-guess-im-a-mozilla-add-on-developer-now/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 13:49:27 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[send later]]></category>
		<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://blog.kamens.us/?p=1629</guid>
		<description><![CDATA[I just released a port of the &#8220;Send Later&#8221; Mozilla Thunderbird add-on for Thunderbird 3.1+. The old version is not compatible with Thunderbird 3, and its author and maintainer appears to have abandoned it. I&#8217;d love for him to integrate my changes into his version and resume maintaining it, but in the meantime, for the [...]]]></description>
			<content:encoded><![CDATA[<p>I just released a <a href="https://addons.mozilla.org/en-US/thunderbird/addon/195275/" target="_blank">port of the &#8220;Send Later&#8221; Mozilla Thunderbird add-on</a> for Thunderbird 3.1+.</p>
<p>The <a href="https://addons.mozilla.org/en-US/thunderbird/addon/4791/" target="_blank">old version</a> is not compatible with Thunderbird 3, and its author and maintainer appears to have abandoned it.</p>
<p>I&#8217;d love for him to integrate my changes into his version and resume maintaining it, but in the meantime, for the sake of making it available to people, I&#8217;ve released the new version myself.</p>
<p>Here&#8217;s a picture:</p>
<p><img class="aligncenter size-full wp-image-1630" title="send_later" src="http://blog.kamens.us/wp-content/uploads/2010/07/send_later.gif" alt="" width="431" height="195" /></p>
<p>Interestingly, it&#8217;s been less than two days since I released it, and it&#8217;s already been downloaded by 71 people. Sweet!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2010/07/11/i-guess-im-a-mozilla-add-on-developer-now/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
			<item>
		<title>Solving the GNU Mailman MIME message footer problem</title>
		<link>http://blog.kamens.us/2010/05/25/solving-the-gnu-mailman-mime-message-footer-problem/</link>
		<comments>http://blog.kamens.us/2010/05/25/solving-the-gnu-mailman-mime-message-footer-problem/#comments</comments>
		<pubDate>Tue, 25 May 2010 13:03:44 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[GNU Mailman]]></category>
		<category><![CDATA[mimedefang]]></category>

		<guid isPermaLink="false">http://blog.kamens.brookline.ma.us/~jik/wordpress/?p=1373</guid>
		<description><![CDATA[If you administer a GNU Mailman installation, you are probably aware that message footers don&#8217;t always work quite right: if a message submitted to a list is entirely plain text with no attachments, then the footer is fine, but if it&#8217;s formatted in HTML or has attachments, then the footer is added to the message [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://list.org/"><img class="alignleft" title="GNU Mailman logo" src="http://list.org/images/logo-70.jpg" alt="" width="179" height="66" /></a>If you administer a <a href="http://list.org/" target="_blank">GNU Mailman</a> installation, you are probably aware that message footers don&#8217;t always work quite right: if a message submitted to a list is entirely plain text with no attachments, then the footer is fine, but if it&#8217;s formatted in HTML or has attachments, then the footer is added to the message as a separate message part, and some email clients display it as an attachment which must be clicked on to view, rather than displaying it as part of the message text.</p>
<p>This is a significant problem, since Microsoft Outlook, which has by far the <a href="http://fingerprintapp.com/email-client-stats" target="_blank">biggest market share of any email client</a>, is one of the clients that displays Mailman footers incorrectly.</p>
<p>Many people have complained about this problem to the maintainers of GNU Mailman, but they have declined to address it.  I don&#8217;t agree with <a href="http://wiki.list.org/pages/viewpage.action?pageId=4030707" target="_blank">their reasoning</a>, but it is of course their prerogative as the volunteer maintainers of free software to decide that they&#8217;d rather maintain some sort of vision of purity in their code rather than actually make the it do what their users want it to.  <a href="http://plosquare.blogspot.com/2009/03/workaround-for-mailman-list-footer-sent.html" target="_blank">Jan Ploski</a> also has some interesting thoughts about this.</p>
<p><a href="http://mimedefang.org/"><img class="alignright" style="margin-left: 5px; margin-right: 5px;" title="mimedefang logo" src="http://mimedefang.org/sites/all/images/MIMEDefang-penglurk-trans.png" alt="" width="200" height="126" /></a>Fortunately, it&#8217;s our prerogative as users to fix it ourselves if they don&#8217;t <img src='http://blog.kamens.us/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  <a href="http://mail.python.org/pipermail/mailman-developers/2005-February/017850.html" target="_blank">Adrian Bye did this</a> with a patch to Mailman way back in 2005, but the maintainers rejected his patch and it&#8217;s now out-of-date and incompatible with the current stable Mailman release.  Others have hacked together site-specific solutions using <a href="http://mimedefang.org/" target="_blank">mimedefang</a>, but no one has implemented a generic solution that can be deployed on top of a standard Mailman installation.  Until now, that is.</p>
<p>I&#8217;ve just <a href="http://stuff.mit.edu/~jik/software/mailman_mimedefang/" target="_blank">released a script</a> that can be deployed easily into a mimedefang installation to automatically reformat outbound Mailman messages to insert the footer into the text and/or HTML bodies of the message rather than as a separate attachment.  All you need to do to use it is install it into your mimedefang installation using the provided instructions, then modify the msg_footer setting inside Mailman to add a couple of special tokens which tell the script to reformat your footers.</p>
<p>Share and enjoy!  And hey, if you find this useful, maybe you can <a href="/support-my-blog" target="_blank">show your appreciation</a>. <img src='http://blog.kamens.us/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2010/05/25/solving-the-gnu-mailman-mime-message-footer-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
			<item>
		<title>My new favorite open-source software: mairix by Richard Curnow</title>
		<link>http://blog.kamens.us/2010/01/08/my-new-favorite-open-source-software-mairix-by-richard-curnow/</link>
		<comments>http://blog.kamens.us/2010/01/08/my-new-favorite-open-source-software-mairix-by-richard-curnow/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 15:58:48 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[email searching]]></category>
		<category><![CDATA[freeWAIS]]></category>
		<category><![CDATA[mairix]]></category>
		<category><![CDATA[mbox]]></category>
		<category><![CDATA[Richard Curnow]]></category>

		<guid isPermaLink="false">http://blog.kamens.brookline.ma.us/~jik/wordpress/?p=1208</guid>
		<description><![CDATA[I am an email pack-rat.  I have saved just about every email message I&#8217;ve sent or received at work or at home in the past twenty years (excluding messages sent to public mailing lists).  That&#8217;s a lot of email, over 400,000 messages. I don&#8217;t just do this for the heck of it.  I look for [...]]]></description>
			<content:encoded><![CDATA[<p>I am an email pack-rat.  I have saved just about every email message I&#8217;ve sent or received at work or at home in the past twenty years (excluding messages sent to public mailing lists).  That&#8217;s a <em>lot</em> of email, over 400,000 messages.</p>
<p>I don&#8217;t just do this for the heck of it.  I look for things in my archived email on a regular basis.  Most of the time I&#8217;m only looking back a few months or perhaps a couple of years, but I do occasionally find it necessary for one reason or another to go digging through the really old stuff.  To make that feasible,  I need to be able to quickly search hundreds of thousands of messages.</p>
<p>Over the years I have imposed a lot of requirements on acceptable solutions for this problem:</p>
<ul>
<li>I want to be able to store the email in a compressed form, so the search engine needs to understand how to decompress the email archives when indexing or retrieving messages from them.</li>
<li>To achieve decent compression, the email has to be stored in files that hold multiple messages, rather than storing each message in its own file.  Therefore, the search engine needs to understand how to break up the mailbox files into separate messages, index them separately, and retrieve them separately during searches.</li>
<li>I don&#8217;t want to use a proprietary or binary mailbox format &#8212; I want to be able to look at the mailboxes in a text editor and manipulate them easily with tools such as Perl.  I used to store my email in <a href="http://quimby.gnus.org/notes/BABYL" target="_blank">BABYL Files</a>, but now I use <a href="http://en.wikipedia.org/wiki/Mbox" target="_blank">mbox format</a> (which <a href="http://www.mozillamessaging.com/en-US/thunderbird/" target="_blank">Thunderbird</a> and <a href="http://www.eudora.com/" target="_blank">Eudora</a> also use for local folders).</li>
<li>I don&#8217;t want to be locked into a GUI &#8212; I need to be able to update the index, do searches, and retrieve results through the command line.</li>
</ul>
<p>For many years, I was unable to find any actively maintained open-source software package that satisfied all of these requirements.  I was therefore stuck using freeWAIS 0.5, one of the very first Internet search engines, which was developed and released by Thinking Machines Corporation over 20 years ago.  I was an active developer on the project; my efforts were focused on making the indexing code faster and less of a disk-hog and fixing a myriad of bugs and memory leaks (freeWAIS was written in C; its primary authors, all of them Lisp programmers, were so used to automatic garbage collection that they were very bad about cleaning up after themselves).  Every since the freeWAIS project went defunct, I&#8217;ve maintained my own personal version of the code, layering hack on top of hack to keep it compiling and running on new versions of Linux.  It was gross, but it was good enough.</p>
<p>That is, it was good enough until I upgraded my Linux box at home about a month ago and went from 32-bit Linux to 64-bit Linux.  The freeWAIS code is <em>very</em> dependent on things like the size of an integer, the size of &#8220;time_t&#8221; and &#8220;off_t&#8221;, etc.  Furthermore, to say that the code is not particularly clean or portable would be a gross understatement.  When I rebuilt it for 64-bit, it stopped working.  After spending several hours trying unsuccessfully to yet again nurse it back to health, I decided to take another look around to see if any new search engines that would do what I need had come onto the scene.</p>
<p>I was delighted to discover <a href="http://www.rpcurnow.force9.co.uk/mairix/" target="_blank">mairix</a>, a package written and maintained by <a href="http://www.rc0.org.uk/" target="_blank">Richard Curnow</a> which bills itself as &#8220;a program for indexing and searching email messages stored in maildir, MH or mbox folders.&#8221;  Wow, someone went and wrote exactly the tool I needed.  w00t!</p>
<p>Well, actually, it&#8217;s not <em>exactly</em> the tool I needed, because when I set it up last night I discovered some minor issues with its parsing of mbox files.  But I fixed those issues and sent Richard my patches, and I hope they&#8217;ll be incorporated into the next release so I don&#8217;t have to go down the maintain-my-own-software road again <img src='http://blog.kamens.us/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .  (If you&#8217;re trying to use version 0.21 of mairix to index mbox files, <a href="mailto:jik@kamens.brookline.ma.us" target="_blank">email me</a> and I&#8217;ll send you my patches.)</p>
<p>Mairix indexed my &gt;400,000 email messages in 12 minutes (3.5GHz CPU, 7,200 RPM SATA hard drive).  The mairix index consumes only 144MB of space, despite the fact that my email archives take up 1.1GB <em>compressed.</em> It takes mairix <em>less than 0.2 seconds</em> to do an AND search for two search terms and save the 8 matching messages into an mbox.  That is simply incredible.</p>
<p>One of the ways Richard made mairix so fast is by using another tool he wrote, <a href="http://www.rpcurnow.force9.co.uk/dfasyn/index.html" target="_blank">dfasyn</a>, which he describes as &#8220;a tool for building general deterministic finite automata (DFAs) given a description as a non-deterministic finite automaton.&#8221;  You use a high-level syntax to describe the various legal state transitions, and dfasyn compiles that into some big numeric arrays and a very trivial function which transitions between machine states using nothing but pointer and integer arithmetic.  The nerd in me thinks this is <em>très </em>cool.</p>
<p>I&#8217;m posting about mairix both to let other people know about this great tool, and to give Richard the kudos he deserves for implementing it.</p>
<p>Share and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2010/01/08/my-new-favorite-open-source-software-mairix-by-richard-curnow/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
			<item>
		<title>Hack of the day: auto-filing IMAP &#8220;Sent Items&#8221; folder</title>
		<link>http://blog.kamens.us/2009/12/30/hack-of-the-day-auto-filing-imap-sent-items-folder/</link>
		<comments>http://blog.kamens.us/2009/12/30/hack-of-the-day-auto-filing-imap-sent-items-folder/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 19:51:21 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Sent Items]]></category>

		<guid isPermaLink="false">http://blog.kamens.brookline.ma.us/~jik/wordpress/?p=1188</guid>
		<description><![CDATA[I file my email in different IMAP folders, grouped by topic rather than the &#8220;received messages in one folder, sent in another&#8221; model imposed nowadays by most mail clients.  It&#8217;s easy to keep the messages I receive organized by topic &#8212; when I&#8217;m done handling a message, I simply move it into the appropriate folder. [...]]]></description>
			<content:encoded><![CDATA[<p>I file my email in different IMAP folders, grouped by topic rather than the &#8220;received messages in one folder, sent in another&#8221; model imposed nowadays by most mail clients.  It&#8217;s easy to keep the messages I receive organized by topic &#8212; when I&#8217;m done handling a message, I simply move it into the appropriate folder.</p>
<p>On the other hand, organizing the copies of message I&#8217;ve sent is less straightforward.  Visiting my &#8220;Sent Items&#8221; folder every time I send a message and filing the message I&#8217;ve just sent is gross.  What I&#8217;ve done in the past is to leave all the copies in &#8220;Sent Items&#8221; and periodically file all of them one at a time.  This is time-consuming and error-prone, and what&#8217;s more, it could be at least partially automated &#8212; if I file a message I received in a particular folder, then something ought to be smart enough to figure out that the response I sent should go into the same folder.</p>
<p>After spending over an hour this morning filing &#8220;Sent Items&#8221; messages, my annoyance threshold was finally exceeded and I decided to automate the process as much as I could.  The result is <a href="http://stuff.mit.edu/~jik/software/file-sent-items.pl.txt" target="_blank">file-sent-items.pl</a>.  In a nutshell, this script reads each message in your &#8220;Sent Items&#8221; folder (or whatever it&#8217;s called), grabs the message IDs in the &#8220;Message-ID&#8221;, &#8220;Resent-Message-ID&#8221;, &#8220;In-Reply-To&#8221; and/or &#8220;References&#8221; headers, looks for a message with one of those IDs in your other folders, and if one is found, moves the sent message into its folder.  There&#8217;s a bit more too it than that, of course, which you can find out by reading the comment at the top of the script and running it with the &#8220;&#8211;help&#8221; option to get a usage message.</p>
<p>Of course, this script won&#8217;t be able to file messages that aren&#8217;t part of conversations already filed into other folders, but it still reduces by a lot the amount of filing you have to do by hand.</p>
<p>Share and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2009/12/30/hack-of-the-day-auto-filing-imap-sent-items-folder/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
			<item>
		<title>Gross hack of the day: adding names to Vonage voicemail email notifications</title>
		<link>http://blog.kamens.us/2009/12/29/gross-hack-of-the-day-adding-names-to-vonage-voicemail-email-notifications/</link>
		<comments>http://blog.kamens.us/2009/12/29/gross-hack-of-the-day-adding-names-to-vonage-voicemail-email-notifications/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 19:10:44 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[caller ID]]></category>
		<category><![CDATA[Vonage]]></category>

		<guid isPermaLink="false">http://blog.kamens.brookline.ma.us/~jik/wordpress/?p=1185</guid>
		<description><![CDATA[I&#8217;ve been using Vonage for telephone service for a couple of months, and I&#8217;m quite happy with it.  Their feature set is quite competitive, and I&#8217;m paying them significantly less than I&#8217;d be paying Verizon, Comcast or RCN for equivalent service.  (Shameless plug: if you&#8217;d like to give Vonage a try, send me email and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Vonage for telephone service for a couple of months, and I&#8217;m quite happy with it.  Their feature set is quite competitive, and I&#8217;m paying them significantly less than I&#8217;d be paying Verizon, Comcast or RCN for equivalent service.  (Shameless plug: if you&#8217;d like to give Vonage a try, <a href="mailto:jik@kamens.us">send me email</a> and I&#8217;ll send you a referral.  Both you and I will get a free month of service.)</p>
<p>You can configure Vonage to email you about voicemail messages.  The email contains the actual voicemail message as an audio attachment, but what it <em>doesn&#8217;t</em> have, inexplicably, is the name of the caller pulled from caller ID.  This has annoyed me ever since we switched to Vonage, and I recently finally got annoyed enough to finally do something about it.  I&#8217;m posting my solution here on the off chance that it&#8217;ll be useful to others.</p>
<p>To take advantage of this hack, you have to have the ability to filter the contents of your incoming email, e.g., with <a href="http://www.procmail.org/" target="_blank">procmail</a>.  If you don&#8217;t know what that means, then you should probably stop reading now. :-/</p>
<p>My solution consists of two scripts and two configuration changes.  First, the scripts:</p>
<ol>
<li>The script vmail-cid.pl fetches the caller ID information for recent calls from <a href="http://www.vonage.com/" target="_blank">www.vonage.com</a> and saves it in a CSV file.</li>
<li>The script vonage-vmail-filter.pl reads the aforementioned caller ID CSV file, as well as a CSV file you&#8217;ve exported from your Outlook contacts, and uses the information in those files to filter a voicemail notification email message on stdin and send the (possibly modified) notification to stdout.  You can configure the script which of the two CSV files to read, i.e., you can take advantage of either the caller ID information from vmail-cid.pl, or the Outlook export CSV, or both.</li>
</ol>
<p>Now, the configuration changes:</p>
<ol>
<li>You need to set up a scheduled task, cron job, or whatever to run vmail-cid.pl periodically to keep the caller ID CSV file up-to-date.</li>
<li>You need to tie vonage-vmail-filter.pl into your email delivery, e.g., by editing your .procmailrc file (for which there is an example in a comment at the top of the script), <a href="http://www.fastmail.fm/docs/sieve/" target="_blank">sieve</a> configuration, or whatever.</li>
</ol>
<p>When all of this is done properly, then every voicemail notification you receive will be updated with the caller ID or Outlook Contacts name for the calling phone number, if it&#8217;s available, before it lands in your mailbox.</p>
<p><a href="/wp-content/uploads/2009/12/vonage-vmail-names.zip">Click here</a> to download a zip file containing the scripts.  See the comments at the top of the scripts for additional details.  As always, please feel free to <a href="mailto:jik@kamens.us">send me</a> any questions, comments and suggestions you might have.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2009/12/29/gross-hack-of-the-day-adding-names-to-vonage-voicemail-email-notifications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
			<item>
		<title>Neat little Cygwin / Windows interoperability hack</title>
		<link>http://blog.kamens.us/2009/09/22/neat-little-cygwin-windows-interoperability-hack/</link>
		<comments>http://blog.kamens.us/2009/09/22/neat-little-cygwin-windows-interoperability-hack/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 15:07:49 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Explorer]]></category>

		<guid isPermaLink="false">http://blog.kamens.brookline.ma.us/~jik/wordpress/?p=855</guid>
		<description><![CDATA[For those of you who use Cygwin to make Windows slightly more bearable&#8230; Suppose you&#8217;re happily working in a Cygwin window, and you need to load one of the files you&#8217;re working on into a Windows app. You could select File &#62; Open… in the app and then browse to the ten-levels-deep Cygwin folder to [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who use Cygwin to make Windows slightly more bearable&#8230;</p>
<p>Suppose you&#8217;re happily working in a Cygwin window, and you need to load one of the files you&#8217;re working on into a Windows app. You could select File &gt; Open… in the app and then browse to the ten-levels-deep Cygwin folder to find the file you need, or instead you could put this in your .bashrc:</p>
<pre style="padding-left: 30px;">e() { explorer $(cygpath -w $(pwd)) &amp; }</pre>
<p>Then, in the Cygwin window, just type &#8220;e &lt;ENTER&gt;&#8221;, and an Explorer window will pop up, opened to the current directory. You can now double-click on the file, open it from the right-click menu, or drag and drop into a running app.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2009/09/22/neat-little-cygwin-windows-interoperability-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
			<item>
		<title>Script for using ffmpeg to crop, pan and scale WMV to MOV</title>
		<link>http://blog.kamens.us/2009/09/21/script-for-using-ffmpeg-to-crop-pan-and-scale-wmv-to-mov/</link>
		<comments>http://blog.kamens.us/2009/09/21/script-for-using-ffmpeg-to-crop-pan-and-scale-wmv-to-mov/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 17:40:54 +0000</pubDate>
		<dc:creator>jik</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Free software]]></category>
		<category><![CDATA[Video editing]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[MOV]]></category>
		<category><![CDATA[QuickTime]]></category>
		<category><![CDATA[WMV]]></category>

		<guid isPermaLink="false">http://blog.kamens.brookline.ma.us/~jik/wordpress/?p=853</guid>
		<description><![CDATA[I&#8217;m responsible for coordinating weekly new-functionality demos for my company&#8217;s R&#38;D organization.  Each week, a developer or product manager presents a half-hour demo of some new functionality to a local audience in one of our offices, using a big 1920&#215;1080 digital TV as the local display, with a GoToMeeting session set up so that people [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m responsible for coordinating weekly new-functionality demos for my company&#8217;s R&amp;D organization.  Each week, a developer or product manager presents a half-hour demo of some new functionality to a local audience in one of our offices, using a big 1920&#215;1080 digital TV as the local display, with a GoToMeeting session set up so that people in other offices can watch the demos.  We record the GoToMeeting session, and then after the demo we publish it internally for people who weren&#8217;t able to watch it live or who want to watch it again.</p>
<p>A 30-minute 1920&#215;1080 WMV is very large, like around 50MB.  We want it to be smaller before we publish it.  One way to make it smaller is to simply scale it down, but when the entire 1920&#215;1080 canvas is shrunk down to a reasonable size, text which was perfectly legible before becomes unreadable.  Since the text is usually a crucial part of the demo, that&#8217;s unacceptable.</p>
<p>Usually, the presenter isn&#8217;t using the whole screen at any given time.  Rather, he&#8217;ll be focused on the content in one particular window for an extended period of time, and that window often takes up only around half of the screen.  Therefore, cropping the WMV to the active area is a possible way to the video file smaller without sacrificing legibility.  There&#8217;s just one problem &#8212; what happens when the presenter jumps around from window to window during the demo?</p>
<p>There are various expensive commercial video editors which will let you crop different segments of the video differently and then glom them all together into one video at the end.  However, I don&#8217;t like using commercial software when I can do it for free (this is probably about half on principle and half out of stubbornness).  Therefore, I set out to figure out how to do this with free tools.  The result is a script called <a href="http://stuff.mit.edu/~jik/software/wmv-to-panned-mov.pl.txt" target="_blank">wmv-to-panned-mov.pl</a>.</p>
<p>This script uses the excellent free tool <a href="http://ffmpeg.org/" target="_blank">ffmpeg</a> to slice and dice the input video with the appropriate cropping and produces a much smaller MOV file (i.e., QuickTime video) as its output.  You feed the script a CSV file indicating the start times, end times, and cropping areas of the various slices, and it does the rest.  There&#8217;s more information in the comment at the top of the script about how to use it.</p>
<p>Please comment here to let me know if you find this useful.  If the time I spent writing this script saves you some time or money, please consider sending a little something to my tip jar (but if you don&#8217;t, that&#8217;s OK too).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamens.us/2009/09/21/script-for-using-ffmpeg-to-crop-pan-and-scale-wmv-to-mov/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

