<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Al Hoang &#187; fixes</title>
	<atom:link href="http://blogs.law.harvard.edu/hoanga/category/tech/fixes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.law.harvard.edu/hoanga</link>
	<description>Just another weblog</description>
	<lastBuildDate>Wed, 09 Sep 2009 06:52:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
		<item>
		<title>Spamassassin SIGPIPE errors and the zero file mail message mystery</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/09/09/spamassassin-sigpipe-errors-and-the-zero-file-mail-message-mystery/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/09/09/spamassassin-sigpipe-errors-and-the-zero-file-mail-message-mystery/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 06:52:48 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=756</guid>
		<description><![CDATA[Awhile back I was noticing I was definitely losing emails.  As one can might imagine, this is a scary experience since this brings into doubt if the mail system under use is doing something funny to the mail.
My first place to look was in the mail logs for the SMTP server and other associated [...]]]></description>
			<content:encoded><![CDATA[<p>Awhile back I was noticing I was definitely losing emails.  As one can might imagine, this is a scary experience since this brings into doubt if the mail system under use is doing something funny to the mail.</p>
<p>My first place to look was in the mail logs for the SMTP server and other associated daemons.  However, I saw nothing in the maillogs which was not a very comforting thought.</p>
<p>After more investigation I would notice empty files like this every once in awhile&#8230;</p>
<blockquote>
<pre>
~/Maildir)  ls -la new/
total 4
drwx------   2 al  al   512 Jun  8 00:25 .
drwx------  69 al  al  2048 Jun  8 00:25 ..
-rw-------   1 al  al     0 Jun  8 00:22 1244388142.30600_.myserver.net
</pre>
</blockquote>
<p>This gave me more clues on where to look next.  So next I looked in my Procmail logs for this particular mail id and noticed the process handling this message was killed by SIGPIPE</p>
<blockquote>
<pre>
procmail: Executing "/usr/local/bin/spamassassin"
[84028] warn: spamassassin: killed by SIGPIPE
procmail: [84026] Tue Apr 14 21:45:26 2009
</pre>
</blockquote>
<p>Googling dug up the following links that explain it all:</p>
<p>&nbsp;<a href="http://www.nabble.com/Zero-exit-code-after-SIGPIPE-td21630266.html" title="http://www.nabble.com/Zero-exit-code-after-SIGPIPE-td21630266.html" target="_blank">http://www.nabble.com/Zero-exit-code-aft&#8230;</a><br />
&nbsp;<a href="https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6033" title="https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6033" target="_blank">https://issues.apache.org/SpamAssassin/s&#8230;</a></p>
<p>Verdict:<br />
Upgrade Spamassassin</p>
<p>Since I have upgraded Spamassassin, the zero byte email mystery has resolved itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/09/09/spamassassin-sigpipe-errors-and-the-zero-file-mail-message-mystery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Getting Ruby 1.9.1p243 to work on OS X 10.5.8 with Japanese input support on irb</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/09/08/getting-ruby-191p243-to-work-on-os-x-1058-with-japanese-input-support-on-irb/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/09/08/getting-ruby-191p243-to-work-on-os-x-1058-with-japanese-input-support-on-irb/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 08:47:13 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[japan]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=761</guid>
		<description><![CDATA[Awhile back I installed Ruby 1.9.1 in such a way as to co-exist with my current Ruby installation [1], [2] (I should use rvm [3] these days&#8230;)
However, one issue that cropped up during an IRB session was I could not copy and paste Japanese characters into the IRB repl.  This is very very painful [...]]]></description>
			<content:encoded><![CDATA[<p>Awhile back I installed Ruby 1.9.1 in such a way as to co-exist with my current Ruby installation [1], [2] (I should use rvm [3] these days&#8230;)</p>
<p>However, one issue that cropped up during an IRB session was I could not copy and paste Japanese characters into the IRB repl.  This is very very painful for my day to day use with Ruby (Imagine not being able to use the &#8216;|&#8217; character while writing UNIX pipelines). </p>
<p>Below is an example of me trying to enter the character あ into IRB and watching it fail.</p>
<blockquote>
<pre>
$ irb
irb(main):001:0&gt; ab = "?"    &lt;---- Tried entering the character あ
SyntaxError: (irb):1: invalid multibyte char (UTF-8)
(irb):1: unterminated string meets end of file
from /usr/local/bin/irb19:12:in `'
</pre>
</blockquote>
<p>After a lot of head scritching I was able to narrow it down to something with readline:</p>
<blockquote>
<pre>
$ irb --noreadline
irb(main):002:0&gt; ab = "あ"
=&gt; "あ"
irb(main):003:0&gt;
</pre>
</blockquote>
<p>After some more digging into the issue.  The root cause seems to be the lack of GNU readline.  By default, Ruby will link in the system installed readline library on OS X which is called <a href="http://thrysoee.dk/editline/">editline</a> [4].  Unfortunately, editline does not support UTF8 or multi-byte character sets which makes this a no-go for daily usage.</p>
<p>Most of the other references suggest downloading readline from source and installing into <em>/usr/local</em> however I believe this defeats the purpose of using something like <a href="http://www.macports.org">MacPorts</a>.  After a bit of finagling I found that this is the invocation to get things working.</p>
<blockquote>
<pre>
wget&nbsp;<a href="ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz" title="ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz" target="_blank">ftp://ftp.ruby-lang.org/pub/ruby/1.9/rub...</a>
tar xvzf ruby-1.9.1-p243.tar.gz
cd ruby-1.9.1-p243
# Don't trust MacPorts version of autoconf because it somehow nuked the
# --with-readline-dir option
/usr/bin/autoconf
./configure --with-readline-dir=/opt/local --enable-shared --program-suffix=19 --enable-pthread
make
sudo make install
</pre>
</blockquote>
<p>I have it wrapped up in a script which you can <a href="http://gist.github.com/180805">see here</a>.</p>
<p>References</p>
<p>[1]&nbsp;<a href="http://wonko.com/post/how-to-compile-ruby-191" title="http://wonko.com/post/how-to-compile-ruby-191" target="_blank">http://wonko.com/post/how-to-compile-rub&#8230;</a><br />
[2]&nbsp;<a href="http://frozenplague.net/2009/01/ruby-191-rubygems-rails/" title="http://frozenplague.net/2009/01/ruby-191-rubygems-rails/" target="_blank">http://frozenplague.net/2009/01/ruby-191&#8230;</a><br />
[3]&nbsp;<a href="http://rvm.beginrescueend.com/" title="http://rvm.beginrescueend.com/" target="_blank">http://rvm.beginrescueend.com/</a><br />
[4]&nbsp;<a href="http://thrysoee.dk/editline/" title="http://thrysoee.dk/editline/" target="_blank">http://thrysoee.dk/editline/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/09/08/getting-ruby-191p243-to-work-on-os-x-1058-with-japanese-input-support-on-irb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Using a non-standard port for Capistrano SSH gateways</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/06/02/using-a-non-standard-port-for-capistrano-ssh-gateways/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/06/02/using-a-non-standard-port-for-capistrano-ssh-gateways/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:10:13 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=731</guid>
		<description><![CDATA[I have a love-hate affair with Capistrano.   It is a great tool if you are a Ruby person and need to do something NOW on a bunch of machines.  But the docs are in a constant state of suck from my point of view.
The&#160;Capify.org website helps for remembering the &#8217;simple&#8217; details on [...]]]></description>
			<content:encoded><![CDATA[<p>I have a love-hate affair with Capistrano.   It is a great tool if you are a Ruby person and need to do something NOW on a bunch of machines.  But the docs are in a constant state of suck from my point of view.</p>
<p>The&nbsp;<a href="http://Capify.org" title="http://Capify. " target="_blank">Capify.org</a> website helps for remembering the &#8217;simple&#8217; details on what Capistrano can do.  But where I waste a lot of my time is asking questions like, &#8220;How do I set the Capistano SSH gateway to a non-standard port?&#8221;.   Luckily, Capistrano is written in Ruby so it is easy enough to glance through the code and finally find out where it is but this is why good tech docs exist.  To give enough context to answer those questions.</p>
<p>To answer my own question, below is a snippet you can add to your capfile to use a non-standard port if you need to deploy through a SSH gateway that lives on a non-standard port</p>
<blockquote><p>
# Add this to your Capfile<br />
# This sets the SSH gateway to a machine called&nbsp;<a href="http://mysshgateway.com" title="http://mysshgateway. " target="_blank">mysshgateway.com</a> on port 22222<br />
set :gateway, &#8216;mysshgateway.com:22222&#8242;
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/06/02/using-a-non-standard-port-for-capistrano-ssh-gateways/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Enabling ZeroConf / Bonjour DNS resolution in OpenSolaris</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/05/06/enabling-zeroconf-bonjour-dns-resolution-in-opensolaris/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/05/06/enabling-zeroconf-bonjour-dns-resolution-in-opensolaris/#comments</comments>
		<pubDate>Wed, 06 May 2009 07:20:09 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[fixes tech opensolaris sysadmin]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=724</guid>
		<description><![CDATA[On small LAN networks that do not have an internal DNS server.  There is a nice technology called ZeroConf that uses multicast to enable name lookup resolution.  It has been baked into OS X for quite some time now.  Linux and other UNIX flavors have been picking this up as well.  [...]]]></description>
			<content:encoded><![CDATA[<p>On small LAN networks that do not have an internal DNS server.  There is a nice technology called ZeroConf that uses multicast to enable name lookup resolution.  It has been baked into OS X for quite some time now.  Linux and other UNIX flavors have been picking this up as well.  OpenSolaris also includes this but enabling it is not on by default (At least with 2008.11).  Here is a quick howto.</p>
<p>Edit the file /etc/nsswitch.conf and make sure that the line that begins with</p>
<blockquote><p>
hosts:
</p></blockquote>
<p>contains the following</p>
<blockquote><p>
hosts:       files dns mdns
</p></blockquote>
<p>Then you should be able to ping any machine that uses Bonjour.  For example, if you have a Mac that is named mycoolmac then you should be able to ping mycoolmac.local</p>
<h4>References</h4>
<ul>
<li>
<a href="http://opensolaris.org/os/community/on/flag-days/pages/2007082001/">Heads-up Multicast DNS and discovery</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/05/06/enabling-zeroconf-bonjour-dns-resolution-in-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Insert the current filename into current edited file in vim</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/03/12/insert-the-current-filename-into-current-edited-file-in-vim/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/03/12/insert-the-current-filename-into-current-edited-file-in-vim/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 07:32:22 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=717</guid>
		<description><![CDATA[I had a need for inserting the name of the current file into a bunch of files I was editing.  I was pretty sure there was a function to do this in vim and after some searching I was right.
To insert the current filename.  In Insert Mode, type CTRL-r % and it will [...]]]></description>
			<content:encoded><![CDATA[<p>I had a need for inserting the name of the current file into a bunch of files I was editing.  I was pretty sure there was a function to do this in vim and after some searching I was right.</p>
<p>To insert the current filename.  In Insert Mode, type <em>CTRL-r</em> <em>%</em> and it will insert the current filename.</p>
<p>Thanks to <a href="http://mamchenkov.net/wordpress/2006/08/15/vim-tip-quickly-insert-current-filename/">blog post</a> for the tip!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/03/12/insert-the-current-filename-into-current-edited-file-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Getting X working again after swapping hardware on Open Solaris nv100</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/12/07/getting-x-working-again-after-swapping-hardware-on-open-solaris-nv100/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/12/07/getting-x-working-again-after-swapping-hardware-on-open-solaris-nv100/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 15:18:50 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=705</guid>
		<description><![CDATA[After having dain bramaged myself for years with Linux usage.  I had gotten spoiled into believing an OS should make it simple to do the following:
1. Shutdown computer
2. Swap around hardware components
3. Restart
4. Life is good
However any techie should tell you this is a pipe dream on Windows.  Mac users probably have no [...]]]></description>
			<content:encoded><![CDATA[<p>After having dain bramaged myself for years with Linux usage.  I had gotten spoiled into believing an OS should make it simple to do the following:</p>
<p>1. Shutdown computer<br />
2. Swap around hardware components<br />
3. Restart<br />
4. Life is good</p>
<p>However any techie should tell you this is a pipe dream on Windows.  Mac users probably have no clue since they never change hardware components and just buy new Macs to solve their problems.  Which leaves the lucky OSS *nix variants to try stunts like this.</p>
<p>Being the stubborn person I am,  I attempted this with OpenSolaris by swapping out my motherboard.  I wanted to do this in order to take advantage of the E7400 Core 2 Duo that I bought awhile back.  Things almost worked however on reboot I was given the dreaded console login screen with a useless keyboard.  The following as far as I know don´t work&#8230;</p>
<p>1. CTRL-ALT-BACKSPACE<br />
2. CTRL-ALT-Fn<br />
3. CTRL-ALT-DEL</p>
<p>Your best bet is to ssh somehow and try to look for clues.  Here is what I did&#8230;</p>
<p>1. Swap motherboard and stare at dark screen<br />
2. Find out how to <a href="http://mail.opensolaris.org/pipermail/opensolaris-discuss/2007-September/034748.html">boot into single user mode</a> and make sure the kernel isn&#8217;t PO-ed or something and find my IP address<br />
3. Move away the X11 configuration that I configured  (dual-display) and try rebooting<br />
4. Reboot and find out it isn&#8217;t working<br />
5. ssh in and realize it still isn&#8217;t working.   Move the old dual display X11 config back to /etc/X11/xorg.conf<br />
6. Try restarting gdm with svcadm restart gdm and watch it fail<br />
7. Scritch head some more<br />
8. Try starting X from the SSH session and whoah it works<br />
9. Restart gdm (svcadm restart gdm) and now I get a login screen<br />
10. Realize that I disconnected the left monitor (VGA) to help debug and want it back<br />
11. Logout and log back in.  I now have dual screens and a working Solaris install again!</p>
<p>References</p>
<ul>
<li><a href="http://mail.opensolaris.org/pipermail/opensolaris-discuss/2007-September/034748.html">How to boot into Single User Mode for OpenSolaris</a></li>
<li>
<li><a href="//opensolaris.org/jive/thread.jspa?messageID=234143¨">Finding device faults with Fault Manager</a></li>
<li><a href="//opensolaris.org/jive/thread.jspa?messageID=311678¨">Debugging problems with nvidia driver on bootup</a></li>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/12/07/getting-x-working-again-after-swapping-hardware-on-open-solaris-nv100/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Getting KDE 4.1.0 on a Fedora 8 machine when KDE 3 is already there</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/11/29/getting-kde-410-on-a-fedora-8-machine-when-kde-3-is-already-there/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/11/29/getting-kde-410-on-a-fedora-8-machine-when-kde-3-is-already-there/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 14:32:26 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=690</guid>
		<description><![CDATA[According to the Fedora FAQ one should be able to update with just this

sudo yum --enablerepo=updates-testing groupupdate "KDE (K Desktop Environment)"

However when I did, I ran into some icons from packages kdepim-3.5.9 and kdegraphics-4.1.0 conflicting with packages crystalsvg-icon-theme and libkipi.  Here is a log&#8230;

  file /usr/share/icons/crystalsvg/48x48/apps/kpalmdoc.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file [...]]]></description>
			<content:encoded><![CDATA[<p>According to the Fedora FAQ one should be able to update with just this</p>
<pre>
sudo yum --enablerepo=updates-testing groupupdate "KDE (K Desktop Environment)"
</pre>
<p>However when I did, I ran into some icons from packages kdepim-3.5.9 and kdegraphics-4.1.0 conflicting with packages crystalsvg-icon-theme and libkipi.  Here is a log&#8230;</p>
<pre>
  file /usr/share/icons/crystalsvg/48x48/apps/kpalmdoc.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_contacts.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_date.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_journal.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_mail.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_news.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_notes.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_summary.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_summary_green.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/kontact_todo.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/crystalsvg/64x64/actions/rss_tag.png from install of kdepim-3.5.9-10.fc9.i386 conflicts with file from package crystalsvg-icon-theme-4.0.4-1.fc9.i386
  file /usr/share/icons/hicolor/16x16/apps/kipi.png from install of kdegraphics-4.1.0-3.fc9.i386 conflicts with file from package libkipi-0.1.5-4.fc9.i386
  file /usr/share/icons/hicolor/22x22/apps/kipi.png from install of kdegraphics-4.1.0-3.fc9.i386 conflicts with file from package libkipi-0.1.5-4.fc9.i386
  file /usr/share/icons/hicolor/32x32/apps/kipi.png from install of kdegraphics-4.1.0-3.fc9.i386 conflicts with file from package libkipi-0.1.5-4.fc9.i386
  file /usr/share/icons/hicolor/48x48/apps/kipi.png from install of kdegraphics-4.1.0-3.fc9.i386 conflicts with file from package libkipi-0.1.5-4.fc9.i386

Error Summary
-------------
</pre>
<p>I tried deleting these packages manually but that led into an even deeper&#8217;s rats nest of dependency hell.  So one thing I tried was </p>
<pre>
$ sudo yum groupremove "KDE (K Desktop Environment)"
$ sudo yum --enablerepo=updates-testing groupinstall  "KDE (K Desktop Environment)"
</pre>
<p>However I still got conflcts so ran </p>
<pre>
$ sudo yum remove libkipi
$ sudo yum remove crystalsvg-icon-theme
$ sudo yum --enablerepo=updates-testing groupupdate  "KDE (K Desktop Environment)"
</pre>
<p>And finally I have got KDE 4.1.0 to install in way too many steps.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/11/29/getting-kde-410-on-a-fedora-8-machine-when-kde-3-is-already-there/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Fixing that svn: Unrecognized format for the relative external URL</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/09/18/fixing-that-svn-unrecognized-format-for-the-relative-external-url/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/09/18/fixing-that-svn-unrecognized-format-for-the-relative-external-url/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 11:22:51 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=692</guid>
		<description><![CDATA[So recently I saw this when doing a svn checkout of a project and ran into the following:

$ svn co&#160;http://svn.somewhere.com/svn/projects 
svn: Unrecognized format for the relative external URL &#8221;.

Wonderful.  This indicated to me there was a problem with the svn externals somewhere.  After noodling a little I decided to Google around and found [...]]]></description>
			<content:encoded><![CDATA[<p>So recently I saw this when doing a svn checkout of a project and ran into the following:</p>
<blockquote><p>
$ svn co&nbsp;<a href="http://svn.somewhere.com/svn/projects" title="http://svn.somewhere.com/svn/projects" target="_blank">http://svn.somewhere.com/svn/projects</a> <br />
svn: Unrecognized format for the relative external URL &#8221;.
</p></blockquote>
<p>Wonderful.  This indicated to me there was a problem with the svn externals somewhere.  After noodling a little I decided to Google around and found <a>this</a>.  Basically, duplicate listings in your svn:externals is a bad thing.</p>
<p><a href="http://hasno.info/2008/7/22/subversion-1-5-and-unexpected-format-errors-with-blank-info">Read more</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/09/18/fixing-that-svn-unrecognized-format-for-the-relative-external-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Multiple renaming utilities: mmv</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/07/16/multiple-renaming-utilities-mmv/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/07/16/multiple-renaming-utilities-mmv/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 07:58:05 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/07/16/multiple-renaming-utilities-mmv/</guid>
		<description><![CDATA[There are many multiple file rename utilities that you can dig up.
One that I am used to on Debian/Ubuntu-based distros is called  rename which is one that is derived from the Perl Cookbook.   However, note that this rename script does not seem to exist on other UNIX variants in a packaged format. [...]]]></description>
			<content:encoded><![CDATA[<p>There are many multiple file rename utilities that you can dig up.</p>
<p>One that I am used to on Debian/Ubuntu-based distros is called  <a href="http://www.perlmonks.org/?node_id=632437">rename</a> which is one that is derived from the Perl Cookbook.   However, note that this rename script does not seem to exist on other UNIX variants in a packaged format.  It definitely does not seem to exist on a Fedora Core 9 box I use nor does it exist on a FreeBSD machine.</p>
<p>While it would not be too hard to swipe the perl script and copy it in place onto a system.  I hate having to remember moving that script around and around with me from place to place so I looked around for other equivalents and found one called <a href="http://linux.maruhn.com/sec/mmv.html">mmv</a>.  One nice thing is that there are packages for at least FreeBSD, FC9, and Debian/Ubuntu variants so it should be quite lazy to install compared to rename.</p>
<p>Below I give an example of using it to do a multiple renaming where I want to append the value <em>1</em> to the end of a bunch of filenames.</p>
<pre>
$ ls
cat_100  cat_15  cat_200  cat_50  cat_500
</pre>
<pre>
$ mmv cat"*" cat#1_1
$ ls
cat_100_1  cat_15_1  cat_200_1  cat_500_1  cat_50_1
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/07/16/multiple-renaming-utilities-mmv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>svnbackup-restore.rb, svnbackup&#8217;s handy companion tool</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/07/03/svnbackup-restorerb-svnbackups-handy-companion-tool/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/07/03/svnbackup-restorerb-svnbackups-handy-companion-tool/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 03:48:21 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/07/03/svnbackup-restorerb-svnbackups-handy-companion-tool/</guid>
		<description><![CDATA[Doug Hellman&#8217;s svnbackup script tool is a really handy tool for setting up automated backups for a subversion repository.  
However, the non-fun time comes when one wants to restore a subversion repository that has way too many dumpfiles parts.  The instructions for restoration are basically &#8216;roll your own&#8217; if you want to try [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doughellmann.com/projects/svnbackup/">Doug Hellman&#8217;s svnbackup script</a> tool is a really handy tool for setting up automated backups for a subversion repository.  </p>
<p>However, the non-fun time comes when one wants to restore a subversion repository that has way too many dumpfiles parts.  The instructions for restoration are basically <a href="http://code.google.com/p/svnautobackup/wiki/RestoringFromTheBackup">&#8216;roll your own&#8217;</a> if you want to try to automate the restore procedure.  What would be nicer is if there was the converse tool that made it easier to not have to figure out how to re-order the backup files in the proper manner in order to perform the restore.</p>
<p>I spent a few minutes thinking about it and wrote a small Ruby script to help with this that I call svnbackup-restore.rb.   Here is the (hastily written) source code.  (<a href="http://samsara.bebear.net/~al/scripts/svnbackup-restore.rb">Download here</a>)</p>
<pre>
#!/usr/bin/ruby
# Program Name: Restore the restore
# Purpose:      Take all the svn dumpfiles generated from svnbackup
#               sort them and try loading them via svnadmin
# Usage:        1. Create the new repo path with svnadmin create
#               2. Set repo_name to the repo backup file names
#               3. Set restore_path to the new path to restore to
#               4. Run it ./svnbackup-restore.rb
# Assumptions:  svnrestore-backup.rb is in the same dir as the svn dump files

# CHANGE PARAMETERS HERE
repo_name = 'myrepo'
restore_path = '/path/to/myrepo'

# Print out debugging?
DEBUG = true

# DON'T CHANGE BELOW

# Filename format is 'dumpfile---.bzip2'
svn_dumpfiles = Dir["dumpfile-#{repo_name}*.bzip2"]
sorted_files = svn_dumpfiles.sort do |a, b|
  left_rev = a.split('-')[2].to_i
  right_rev = b.split('-')[2].to_i
  left_rev  right_rev
end
sorted_files.each do |dump_part|
  results = `bzcat #{dump_part} | svnadmin load #{restore_path}; echo $?`
  puts results if DEBUG
  res = results.split.last.to_i
  if res != 0
    puts "Error on trying to load up #{dump_part}!"
    exit 1
  end
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/07/03/svnbackup-restorerb-svnbackups-handy-companion-tool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Can&#8217;t install anymore extensions in Firefox 3?  Kill extensions.rdf</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/06/12/cant-install-anymore-extensions-in-firefox-3-kill-extensionsrdf/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/06/12/cant-install-anymore-extensions-in-firefox-3-kill-extensionsrdf/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 07:58:37 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[fixes]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/06/12/cant-install-anymore-extensions-in-fir</guid>
		<description><![CDATA[I&#8217;ve been trying out Firefox 3 and one strategy I do is to copy my Mozilla Firefox folder with me to whatever machine I go to so I don&#8217;t have to reinstall plugins, re-enter all my passwords, and configure everything about Firefox until I&#8217;m happy.
However, it seems due to some reason or another I lost [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying out Firefox 3 and one strategy I do is to copy my Mozilla Firefox folder with me to whatever machine I go to so I don&#8217;t have to reinstall plugins, re-enter all my passwords, and configure everything about Firefox until I&#8217;m happy.</p>
<p>However, it seems due to some reason or another I lost the ability to install extensions.  After Googling around I dug up a <a href="https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/65609">nice hint</a> on Ubuntu&#8217;s Launchpad site.</p>
<p>Basically delete the file named extensions.rdf in your Mozilla directory</p>
<ul>
<li>Windows: <em>C:\Documents And Settings\[Username]\Application Data\Mozilla Firefox\</em></li>
<li>Linux (Fedora 9 and Ubuntu 7.10): <em>$HOME/.mozilla/firefox/profile/MY_PROFILE/</em></li>
</ul>
<p><a href="https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/65609">Read the Ubuntu fix</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/06/12/cant-install-anymore-extensions-in-firefox-3-kill-extensionsrdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>One way to clean out a gazillion files in a directory without causing the server to hang on IO</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/04/30/one-way-to-clean-out-a-gazillion-files-in-a-directory-without-causi/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/04/30/one-way-to-clean-out-a-gazillion-files-in-a-directory-without-causi/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 10:37:53 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[stupid]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/04/30/one-way-to-clean-out-a-gazillion-files</guid>
		<description><![CDATA[Had a case where I had some rails app that was using files for its session store and had been running like that for months.  While it was a careless (and dumb) thing to run it that way, we had to do something about it since it was eating up close to 85% of [...]]]></description>
			<content:encoded><![CDATA[<p>Had a case where I had some rails app that was using files for its session store and had been running like that for months.  While it was a careless (and dumb) thing to run it that way, we had to do something about it since it was eating up close to 85% of the system partition.  The dumb way to try to do this is below:</p>
<pre>
nice find /tmp/ -name 'ruby_sess.*' | xargs -n 100 rm -fv
</pre>
<p>However, the problem is that this causes insanity on IO which is NOT good for a running service.  (Luckily this service was merely important instead of critical)  So, I present to you my quick and dirty script that will clean up all those nefarious ruby sessions files that have run amok for months.</p>
<pre>
while true; do
    nice find /tmp/ -name 'ruby_sess.*' | head -n 20 | xargs rm -fv; sleep 10
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/04/30/one-way-to-clean-out-a-gazillion-files-in-a-directory-without-causi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>OS X 10.4.11 update, you suck</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/04/14/os-x-10411-update-you-suck/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/04/14/os-x-10411-update-you-suck/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 15:10:33 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/04/14/os-x-10411-update-you-suck/</guid>
		<description><![CDATA[After a long time of not updating my trusty old iLamp iMac, I finally updated it to 10.4.11 over the weekend and let it lie.  Later on I hear a report that Safari won&#8217;t start up.
That&#8217;s odd, I&#8217;ve never heard of Safari having launch problems before.   I check the log and I [...]]]></description>
			<content:encoded><![CDATA[<p>After a long time of not updating my trusty old iLamp iMac, I finally updated it to 10.4.11 over the weekend and let it lie.  Later on I hear a report that Safari won&#8217;t start up.</p>
<p>That&#8217;s odd, I&#8217;ve never heard of Safari having launch problems before.   I check the log and I see something like the following:</p>
<pre>
Date/Time:      2008-04-14 22:06:45.474 +0900
OS Version:     10.4.11 (Build 8S165)
Report Version: 4

Command: Safari
Path:    /Applications/Safari.app/Contents/MacOS/Safari
Parent:  WindowServer [86]

Version: 3.1 (4525.13)

PID:    20987
Thread: Unknown

Link (dyld) error:

Symbol not found: _WebDatabaseDirectoryDefaultsKey
  Referenced from: /Applications/Safari.app/Contents/MacOS/Safari
  Expected in: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
</pre>
<p>Those type of messages go on and on in Console.app.   My first round of Googling brought me to a <a href="http://forums.macrumors.com/showthread.php?t=431762">Macrumors thread</a> that recommended deleting the history.plist and other parts from ~/Library/Safari.   I tried removing various files from that directory to no effect and finally just removing the directory altogether.  Nada.</p>
<p>Troubleshooting a PC WITHOUT a web browser really sucks.   I suggest everyone try it once in awhile to see just how much the nature of debugging IT problems has changed when you are deprived of a very powerful tool.  Luckily, this Mac had a very crufty version of IE lurking so the first thing I tried was a download of Firefox.  However, the disk image refused to be mounted!  Seems this is also tied in with <a href="http://discussions.apple.com/thread.jspa?messageID=6269838">the security update</a>.  So basically, I&#8217;m left with using IE as my main tool for debugging on this Mac.</p>
<p>After a bit of googling, it seems that the fix is tied requiring the latest OS X security update (Available at the <a href="http://www.apple.com/support/downloads">Support Download</a> page).  For OS X 10.4.x users you can find a link to the latest Universal <a href="http://www.apple.com/support/downloads/securityupdate2008002v10universal.html">here</a>.</p>
<p>However, there is a catch.  The security update is only available from that page as a Disk Image.  Guess what you can&#8217;t open it up under the affected Mac.  At this point you&#8217;re left with 2 options:</p>
<ol>
<li>Burn the Disk Image to a CD-R/DVD-R and use it that way</li>
<li>Transfer the disk image to another Mac and unarchive it then push it back</li>
</ol>
<p>I decided on the latter option since I hate wasting a CD-R if I don&#8217;t have to.  After applying the Security Update and rebooting, Safari boots up and things seem chipper again but that was a serious side trip on something I&#8217;ve rarely seen Apple ever mess up.   Anti-kudos to Apple for making this update on your &#8216;legacy&#8217; OS really sucky.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/04/14/os-x-10411-update-you-suck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Fixing that really irritating  perl: warning: Setting locale failed. on OS X leopard</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/04/10/fixing-that-really-irritating-perl-warning-setting-locale-failed-on/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/04/10/fixing-that-really-irritating-perl-warning-setting-locale-failed-on/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 14:19:16 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/04/10/fixing-that-really-irritating-perl-war</guid>
		<description><![CDATA[Anytime I&#8217;ve been running a perl based script on my leopard box I got this really irritating output with whatever else I was expecting:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
     LC_ALL = "En_US",
     LANG = (unset)
are supported and installed on your system.
perl: [...]]]></description>
			<content:encoded><![CDATA[<p>Anytime I&#8217;ve been running a perl based script on my leopard box I got this really irritating output with whatever else I was expecting:</p>
<pre>
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
     LC_ALL = "En_US",
     LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
</pre>
<p>With a quick Google search I found an answer in this <a href="http://www.rubify.com/2007/10/28/rails-and-leopard-a-smooth-upgrade">Rubify post</a>.  Basically the solution / fix is to make sure the following is set in either your ~/.profile or ~/.bashrc or ~/.cshrc</p>
<pre>
# This setting is for the new UTF-8 terminal support
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
</pre>
<p><a href="http://www.rubify.com/2007/10/28/rails-and-leopard-a-smooth-upgrade">Read more at Rubify!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/04/10/fixing-that-really-irritating-perl-warning-setting-locale-failed-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Data center used to heat swimming pool</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/04/07/data-center-used-to-heat-swimming-pool/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/04/07/data-center-used-to-heat-swimming-pool/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 13:18:34 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/04/07/data-center-used-to-heat-swimming-pool</guid>
		<description><![CDATA[I love reading about these smart uses of waste byproducts  I bet this might work well in Japan if it wasn&#8217;t for those pesky earthquakes.

 A new data center in Switzerland is being used to heat a nearby swimming pool. In what appears to be a first, the town pool in Uitikon, Switzerland will [...]]]></description>
			<content:encoded><![CDATA[<p>I love reading about these <a href="http://www.datacenterknowledge.com/archives/2008/Apr/02/_data_center_used_to_heat_swimming_pool.html">smart uses of waste byproducts</a>  I bet this might work well in Japan if it wasn&#8217;t for those pesky earthquakes.</p>
<blockquote><p>
 A new data center in Switzerland is being used to heat a nearby swimming pool. In what appears to be a first, the town pool in Uitikon, Switzerland will be heated by waste heat from a data center
</p></blockquote>
<p><a href="http://www.datacenterknowledge.com/archives/2008/Apr/02/_data_center_used_to_heat_swimming_pool.html">Read more at Datacenter Knowledge</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/04/07/data-center-used-to-heat-swimming-pool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Getting erlang to build on MacPorts with an installed iPhone Open SDK</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/03/21/getting-erlang-to-build-on-macports-with-an-installed-iphone-open-s/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/03/21/getting-erlang-to-build-on-macports-with-an-installed-iphone-open-s/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 14:48:35 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/03/21/getting-erlang-to-build-on-macports-wi</guid>
		<description><![CDATA[I had some serious unexpected fun trying to install erlang on my OS X box using MacPorts.  In general it&#8217;s usually a no brainer you usually type sudo port install &#60;foo&#62; and you have a new package installed without that much fuss.  However here is the partial log of trying to install erlang [...]]]></description>
			<content:encoded><![CDATA[<p>I had some serious unexpected fun trying to install erlang on my OS X box using MacPorts.  In general it&#8217;s usually a no brainer you usually type <b>sudo port install &lt;foo&gt;</b> and you have a new package installed without that much fuss.  However here is the partial log of trying to install erlang and it blowing up&#8230;</p>
<pre>
$ sudo port install icu erlang
... ICU installs without a problem ...
---&gt;  Fetching tcl
---&gt;  Attempting to fetch tcl8.5.1-src.tar.gz from&nbsp;<a href="http://downloads.sourceforge.net/tcl" title="http://downloads.sourceforge.net/tcl" target="_blank">http://downloads.sourceforge.net/tcl</a>
---&gt;  Verifying checksum(s) for tcl
---&gt;  Extracting tcl
---&gt;  Configuring tcl
---&gt;  Building tcl with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix" &amp;&amp; make all " returned error 2
Command output: /usr/bin/gcc-4.0 -c -Os -O2 -pipe    -Wall -Wno-implicit-int -fno-common -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../generic -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../libtommath -DPACKAGE_NAME=\"tcl\" -
...
...
...
_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:62:
/usr/local/include/mach-o/arch.h:35: error: nested redefinition of 'enum NXByteOrder'
/usr/local/include/mach-o/arch.h:35: error: redeclaration of 'enum NXByteOrder'
/usr/local/include/mach-o/arch.h:36: error: redeclaration of enumerator 'NX_UnknownByteOrder'
/usr/include/architecture/byte_order.h:137: error: previous definition of 'NX_UnknownByteOrder' was here
/usr/local/include/mach-o/arch.h:37: error: redeclaration of enumerator 'NX_LittleEndian'
/usr/include/architecture/byte_order.h:138: error: previous definition of 'NX_LittleEndian' was here
/usr/local/include/mach-o/arch.h:39: error: redeclaration of enumerator 'NX_BigEndian'
/usr/include/architecture/byte_order.h:140: error: previous definition of 'NX_BigEndian' was here
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function 'TclpFindSymbol':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:382: warning: 'NSLookupSymbolInImage' is deprecated (declared at /usr/include/mach-o/dyld.h:182)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:415: warning: 'NSLinkEditError' is deprecated (declared at /usr/include/mach-o/dyld.h:217)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:419: warning: 'NSLookupSymbolInModule' is deprecated (declared at /usr/include/mach-o/dyld.h:181)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:428: warning: 'NSAddressOfSymbol' is deprecated (declared at /usr/include/mach-o/dyld.h:188)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function 'TclpUnloadFile':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:493: warning: 'NSUnLinkModule' is deprecated (declared at /usr/include/mach-o/dyld.h:169)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function 'TclpLoadMemory':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:697: warning: 'NSCreateObjectFileImageFromMemory' is deprecated (declared at /usr/include/mach-o/dyld.h:146)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:730: warning: 'NSLinkModule' is deprecated (declared at /usr/include/mach-o/dyld.h:161)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:732: warning: 'NSDestroyObjectFileImage' is deprecated (declared at /usr/include/mach-o/dyld.h:147)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:740: warning: 'NSLinkEditError' is deprecated (declared at /usr/include/mach-o/dyld.h:217)
make: *** [tclLoadDyld.o] Error 1

Error: The following dependencies failed to build: tk tcl
Error: Status 1 encountered during processing.
</pre>
<p>Pretty sucky, huh?  My first lazy thought was, &#8220;I thought the point of a package manager was to avoid all these problems.&#8221;</p>
<p>After a little bit of thinking and staring at the error message, I did the workaround and moved the /usr/local/include directory away and tried rebuilding which made things much happier.  Check the log below&#8230;</p>
<pre>
$ cd /usr/local
l$ ls
arm-apple-darwin	include			man
bin			info			share
docs			lib
etc			libexec
$ sudo mv include include.ignore
l$ sudo port install icu erlang
Skipping org.macports.activate (icu ) since this port is already active
---&gt;  Cleaning icu
---&gt;  Building tcl with target all
---&gt;  Staging tcl into destroot
---&gt;  Installing tcl 8.5.1_0
---&gt;  Activating tcl 8.5.1_0
</pre>
<p>Voila.  A working erlang install.  Don&#8217;t forget to move back the include directory back to its old place.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/03/21/getting-erlang-to-build-on-macports-with-an-installed-iphone-open-s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Rereading a disk partition table in Linux without rebooting</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/03/10/rereading-a-disk-partition-table-in-linux-without-rebooting/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/03/10/rereading-a-disk-partition-table-in-linux-without-rebooting/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 14:25:30 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/03/10/rereading-a-disk-partition-table-in-li</guid>
		<description><![CDATA[Ran into a problem with trying to partition up a disk on a running system.  The idea is I wanted to create a new partition on a disk with partitions already mounted and use it without rebooting.
Here&#8217;s what you&#8217;ll mostly likely run into&#8230;

# sudo fdisk /dev/sda
... Steps for adding disk  elided ...

Command (m [...]]]></description>
			<content:encoded><![CDATA[<p>Ran into a problem with trying to partition up a disk on a running system.  The idea is I wanted to create a new partition on a disk with partitions already mounted and use it without rebooting.</p>
<p>Here&#8217;s what you&#8217;ll mostly likely run into&#8230;</p>
<pre>
# sudo fdisk /dev/sda
... Steps for adding disk  elided ...

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

ahoang@jp-db-3:~$ sudo mke2fs -m 0 -j /dev/sda3
mke2fs 1.40.2 (12-Jul-2007)
Could not stat /dev/sda3 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

# ls -la /dev/sda*
/dev/sda   /dev/sda1  /dev/sda2
</pre>
<p>The simplest thing to do is just reboot and Linux will redetect everything on restart.  However, sometimes you just can&#8217;t reboot.  After Googling around it seems that <a href="http://www.cyberciti.biz/tips/re-read-the-partition-table-without-rebooting-linux-system.html">partprobe does the job handily</a>.  Luckily this tool is already on an Ubuntu system so no need to apt-get install but it&#8217;s only a few keystrokes away.</p>
<p>Here&#8217;s the rest of the log once I ran partprobe and was humming along&#8230;</p>
<pre>
# sudo partprobe
# ls /dev/sda*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sda3
# sudo mke2fs -m 0 -j /dev/sda3
mke2fs 1.40.2 (12-Jul-2007)
... Creating a file system output elided ...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/03/10/rereading-a-disk-partition-table-in-linux-without-rebooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>How to play mplayer in the desktop fullscreen on Ubuntu</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/02/06/how-to-play-mplayer-in-the-desktop-fullscreen-on-ubuntu/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/02/06/how-to-play-mplayer-in-the-desktop-fullscreen-on-ubuntu/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 13:41:23 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2008/02/06/how-to-play-mplayer-in-the-desktop-ful</guid>
		<description><![CDATA[I was experimenting with trying to play videos in the desktop background so I can work on other things while passively watching videos that I really didn&#8217;t want to spend 100% of my concentration on.  However when I tried to use mplayers -rootwin option under Ubuntu it did not show anything.
After doing some Googling [...]]]></description>
			<content:encoded><![CDATA[<p>I was experimenting with trying to play videos in the desktop background so I can work on other things while passively watching videos that I really didn&#8217;t want to spend 100% of my concentration on.  However when I tried to use mplayers -rootwin option under Ubuntu it did not show anything.</p>
<p>After doing some Googling around, it seems that the problem is tied with how rich desktop environments like KDE and Gnome <a href="http://lists.mplayerhq.hu/pipermail/mplayer-users/2007-October/069418.html">manage the &#8216;desktop&#8217;</a>.  They normally override the traditional X11 root window with their own which means that sending output to rootwin won&#8217;t show anything.</p>
<p>However, luckily there are ways around this.  <a href="http://lists.mplayerhq.hu/pipermail/mplayer-users/2002-January/009477.html">One post</a> on the mplayer list mentioned ways to disable background handling by GNOME and KDE.  However I could not get this working under Gnome.  After some more Googling around I found that Lifehacker had a hint on <a href="http://lifehacker.com/software/linux-tip/use-a-screensaver-as-desktop-wallpaper-299410.php">how to enable screensavers in the background</a>.  So using that information it was rather simple.  The recipe for Ubuntu is:</p>
<blockquote><p>
# Tell GNOME to not handle the desktop<br />
$ gconftool-2 &#8211;type bool &#8211;set /apps/nautilus/preferences/show_desktop false<br />
# Play a video file in the rootwin as fullscreen<br />
$ mplayer -rootwin -fs my_cool_video.avi
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/02/06/how-to-play-mplayer-in-the-desktop-fullscreen-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Some long term thoughts on using a  Kohjinsha SA1F00V</title>
		<link>http://blogs.law.harvard.edu/hoanga/2007/11/30/some-long-term-thoughts-on-using-a-kohjinsha-sa1f00v/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2007/11/30/some-long-term-thoughts-on-using-a-kohjinsha-sa1f00v/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 23:38:25 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2007/11/30/some-long-term-thoughts-on-using-a-koh</guid>
		<description><![CDATA[Awhile back I bought a Kohjinsha SA1F00V to test it out as a lightweight Tablet PC.    After a few months of usage, I can say that I&#8217;ve not been that impressed with the device but neither have I been so frustrated with the device that I felt the need to toss the [...]]]></description>
			<content:encoded><![CDATA[<p>Awhile back I bought a <a href="http://gizmodo.com/gadgets/laptops/kohjinsha-sa1f00v-7-tablet-umpc-adds-touchscreen-still-as-slow-as-before-254409.php">Kohjinsha SA1F00V</a> to test it out as a lightweight Tablet PC.    After a few months of usage, I can say that I&#8217;ve not been that impressed with the device but neither have I been so frustrated with the device that I felt the need to toss the thing out the window.</p>
<h3>The Bad</h3>
<h4>Annoying default partitioning scheme</h4>
<p>I hate these laptops that advertise the hard drive size  (40Gigs) then you get some weird partitioned scheme that you didn&#8217;t ask for<br />
 (with of course a few more gigs knocked off for a recovery partition).  What this means is that you really only get 16GB or 19GB but not the full 40GB &#8211; (Win XP + Bundled Garbage) thanks to these partitions if you&#8217;re not willing to suck it up and reinstall the preinstalled OS</p>
<h4>Slow</h4>
<p>Yes it&#8217;s slow as a dog.  This is one of those things that I wish you could test drive at the store by being allowed to install a stack of apps that <em>you</em> like and play around with it for a couple of hours.  Once I loaded up an AntiVirus program, iTunes and Firefox life got pretty miserable trying to use iTunes and Firefox together.  Also, the virus scan just slows the machine down each time I boot up Windows since it feels compelled to download updates and run full disk scans when I&#8217;m planning on using it.  *sigh*</p>
<h4>Keyboard tactile is awful</h4>
<p>There have been other reviews on the keyboard not being that great and I&#8217;ve even came to the conclusion it wasn&#8217;t that great before I picked one up but decided to forge ahead anyways.   After using it for a longer period of time I realize a crappy keyboard makes it very annoying to do anything requiring serious input on it without readjusting your brain how to type well on it.</p>
<h4>Graphics drivers don&#8217;t support monitor mirroring</h4>
<p>This is really bizarre and disappointing.  I came up with a plan to try to use it as a cheap tablet by mirroring the output of the display to a larger monitor and drawing on the 7&#8243; screen however the drivers for some inexplicable reason don&#8217;t have mirroring support which sucks.  I spent some time trying to see if I could just use the touchscreen while outputting to an external monitor but it&#8217;s really disorienting.  Even some SLIGHT visual feedback on the 7&#8243; touchscreen itself would have been REALLY helpful.</p>
<h3>The Good</h3>
<p>Okay now that you&#8217;ve read some of my more outstanding gripes on the device.  Here are some things that I considered nice about the Kohjinsha</p>
<h4>Not a complete ripoff</h4>
<p>The price point wasn&#8217;t that bad considering you do get lightweight tablet functionality</p>
<h4>Standard components</h4>
<p>The parts that most people will fiddle with are mostly standard laptop components instead of weird proprietary junk.  The hard drive is a normal 2.5&#8243; PATA drive which you can swap out if you try instructions like <a href="http://www.umpcportal.com/modules/news/article.php?storyid=315">these</a> (I just did).  The memory is standard SO-DIMM instead of Micro DIMMs which saves a bit on price.</p>
<h4>Portability</h4>
<p>This thing is easy to toss into a bag and be mobile with it.   I&#8217;ve even held it one handed while traveling on the train from Yokohama to Tokyo and that didn&#8217;t kill my arm (try that in a crowded train you 17&#8243; notebook warriors)</p>
<h4>Decent battery life</h4>
<p>The battery life is around 3-4 hours with the usage that I do</p>
<h4>Standby when the lid closes doesn&#8217;t suck</h4>
<p>I&#8217;ve had so many variables with trying to get a Windows laptop to sleep when I close the lid compared to a Mac.  I&#8217;m happy to say the Kohjinsha does the job without requiring a lot of fiddling with anything.  Perhaps if I was a heavier power user on it I&#8217;d bork the drivers to prevent it but in my usage it worked which was a lifesaver when you&#8217;re trying to catch a train transfer.</p>
<h4>Better than the rest of the PDAs at reading PDFs</h4>
<p>The design of the Kohjinsha makes it a very good platform for reading stuff while on the move.  I&#8217;ve tried a Zaurus, Palm, and a couple of other PDAs and reading novel or long textbook type of stuff was very painful due to screen resolution and slowness of the platform.  I can say that the Kohjinsha makes a better eBook reader than these other solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2007/11/30/some-long-term-thoughts-on-using-a-kohjinsha-sa1f00v/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Fix the &#8216;missing key: categories: Cannot read the portsdb!&#8217; for portupgrade</title>
		<link>http://blogs.law.harvard.edu/hoanga/2007/11/09/fix-the-missing-key-categories-cannot-read-the-portsdb-for-portupgr/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2007/11/09/fix-the-missing-key-categories-cannot-read-the-portsdb-for-portupgr/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 04:06:08 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/2007/11/09/fix-the-missing-key-categories-cannot-</guid>
		<description><![CDATA[I ran into this exact problem when trying to upgrade a bunch of ports lying around on my FreeBSD system.
Luckily Well-Rounded documents the fix for this.  You&#8217;ll have to upgrade portupgrade manually to rebuild its database with an updated version.
]]></description>
			<content:encoded><![CDATA[<p>I ran into this <a href="http://wellrounded.wordpress.com/2007/02/08/ports-portupgrade-af-failing/">exact problem</a> when trying to upgrade a bunch of ports lying around on my <a href="http://www.freebsd.org">FreeBSD</a> system.</p>
<p>Luckily <a href="http://wellrounded.wordpress.com/">Well-Rounded</a> documents the fix for this.  You&#8217;ll have to <a href="http://wellrounded.wordpress.com/2007/02/08/ports-portupgrade-af-failing/">upgrade portupgrade</a> manually to rebuild its database with an updated version.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2007/11/09/fix-the-missing-key-categories-cannot-read-the-portsdb-for-portupgr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>
