<?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>tenshu.net &#187; Ubuntu</title>
	<atom:link href="http://www.tenshu.net/archives/category/techie/foss/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tenshu.net</link>
	<description>Pondering the mystery...</description>
	<lastBuildDate>Tue, 24 Aug 2010 21:14:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Terminator 0.95 released!</title>
		<link>https://launchpad.net/terminator/+announcement/6594</link>
		<comments>https://launchpad.net/terminator/+announcement/6594#comments</comments>
		<pubDate>Tue, 24 Aug 2010 21:14:39 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">tag:launchpad.net,2010-08-24:/+announcement/6594</guid>
		<description><![CDATA[This release is mostly to bring a couple of important compatibility fixes with the newest pre-release of VTE, but we also have some updated translations, improved error handling and two new features for you. The features are a URL handler plugin for Ma...]]></description>
			<content:encoded><![CDATA[<p>This release is mostly to bring a couple of important compatibility fixes with the newest pre-release of VTE, but we also have some updated translations, improved error handling and two new features for you. The features are a URL handler plugin for Maven by Julien Nicolaud and a DBus server that was the result of some work with Andrea Corbellini - for now the only thing this is useful for is opening additional Terminator windows without spawning a new process, but we'll be exploring options in the future to allow more control and interaction with Terminator processes.</p>]]></content:encoded>
			<wfw:commentRss>https://launchpad.net/terminator/+announcement/6594/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TangledStrings 1.0 released!</title>
		<link>https://edge.launchpad.net/tangledstrings/+announcement/6449</link>
		<comments>https://edge.launchpad.net/tangledstrings/+announcement/6449#comments</comments>
		<pubDate>Wed, 04 Aug 2010 21:33:24 +0000</pubDate>
		<dc:creator>Chris Jones</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Puppet]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">tag:launchpad.net,2010-08-04:/+announcement/6449</guid>
		<description><![CDATA[I'm very pleased to announce the release of 1.0 of TangledStrings, a VIM plugin to help Puppet users avoid the confusion and frustration of editing a file that Puppet is managing and subsequently losing ones changes as it is replaced by Puppet's version.]]></description>
			<content:encoded><![CDATA[<p>I'm very pleased to announce the release of 1.0 of TangledStrings, a VIM plugin to help Puppet users avoid the confusion and frustration of editing a file that Puppet is managing and subsequently losing ones changes as it is replaced by Puppet's version.</p>]]></content:encoded>
			<wfw:commentRss>https://edge.launchpad.net/tangledstrings/+announcement/6449/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adventures in Puppet: Tangled Strings</title>
		<link>http://www.tenshu.net/archives/2010/08/04/adventures-in-puppet-tangled-strings/</link>
		<comments>http://www.tenshu.net/archives/2010/08/04/adventures-in-puppet-tangled-strings/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 18:51:46 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Puppet]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=11553</guid>
		<description><![CDATA[I am trying to do as much management on my new VM servers as possible with Puppet, but these are machines I still frequently log on to, and not everything is managed by Puppet, so it&#8217;s entirely possible that in a fit of forgetfulness I will start editing a file that Puppet is managing and [...]]]></description>
			<content:encoded><![CDATA[<p>I am trying to do as much management on my new VM servers as possible with Puppet, but these are machines I still frequently log on to, and not everything is managed by Puppet, so it&#8217;s entirely possible that in a fit of forgetfulness I will start editing a file that Puppet is managing and then be annoyed when my changes are lost next time Puppet runs.<br />
Since prior preparation and planning prevents pitifully poor performance, I decided to do something about this.</p>
<p>Thus, I present a VIM plugin called TangledStrings, which I&#8217;m distributing as a Vimball (.vba) you can download from its <a title="TangledStrings" href="http://launchpad.net/tangledstrings">project page</a> on Launchpad. For more information on Vimball formatted plugins, see <a title="Vimball Documentation" href="http://vimdoc.sourceforge.net/htmldoc/pi_vimball.html">this page</a>. To install the plugin, simply:</p>
<ul>
<li>vim tangledstrings.vba</li>
<li>Follow the instructions from Vimball to type: :so %</li>
</ul>
<p>By default, TangledStrings will show a (configurable) warning message when you load a Puppet-owned file:</p>
<p><a href="/wp-content/uploads/2010/08/puppetstrings_alert.png"><img class="aligncenter size-full wp-image-11573" title="tangledstrings_alert" src="/wp-content/uploads/2010/08/puppetstrings_alert.png" alt="" width="403" height="127" /></a></p>
<p>This message can be disabled, and you can choose to enable a persistent message in the VIM status line instead:</p>
<p><a href="/wp-content/uploads/2010/08/tangledstrings_statusline.png"><img class="aligncenter size-full wp-image-11574" title="tangledstrings_statusline" src="/wp-content/uploads/2010/08/tangledstrings_statusline.png" alt="" width="403" height="127" /></a></p>
<p>(or you could choose to enable both of these methods).</p>
<p>For more information, see the documentation included in the Vimball which you can display with the VIM command:</p>
<pre style="padding-left: 30px;">:help TangledStrings
</pre>
<p>Suggestions, improvements, patches, etc. are most welcome! Email me or use Launchpad to file bugs and propose merges.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/08/04/adventures-in-puppet-tangled-strings/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adventures in Puppet: concat module</title>
		<link>http://www.tenshu.net/archives/2010/08/03/adventures-in-puppet-concat-module/</link>
		<comments>http://www.tenshu.net/archives/2010/08/03/adventures-in-puppet-concat-module/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 22:35:08 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Puppet]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=11476</guid>
		<description><![CDATA[R.I. Pienaar has a Puppet module on github called &#8220;concat&#8221;. Its premise is very simple, it just concatenates fragments of text together into a particular file.
I&#8217;m sure that a more seasoned Puppet veteran would have had this running in no time, but since it introduced some new concepts for me, I thought I&#8217;d throw up [...]]]></description>
			<content:encoded><![CDATA[<p>R.I. Pienaar has a Puppet module on github called &#8220;concat&#8221;. Its premise is very simple, it just concatenates fragments of text together into a particular file.</p>
<p>I&#8217;m sure that a more seasoned Puppet veteran would have had this running in no time, but since it introduced some new concepts for me, I thought I&#8217;d throw up some notes of how I&#8217;m using it. I was particularly interested in an example usage I saw which lists the puppet modules a system is using in its /etc/motd, but because of the way Ubuntu handles constructing the motd, I needed to slightly rework the example. In Ubuntu, the /etc/motd file is constructed dynamically when you log in &#8211; this is done by pam_motd which executes the scripts in /etc/update-motd.d/. One of those scripts (99-footer) will simply append the contents of /etc/motd.tail to /etc/motd after everything else &#8211; my example will take advantage of this. If you are already using motd.tail, you could just have this puppet system write to a different file and then drop another script into /etc/update-motd.d/ to append the contents of that different file.</p>
<p>This is what I did:</p>
<ul>
<li>git clone http://github.com/ripienaar/puppet-concat.git</li>
<li>Move the resulting git branch to /etc/puppet/modules/concat and add it to my top-level site manifest that includes modules</li>
<li>Create a class to manage /etc/motd.tail. In my setup this ends up being /etc/puppet/manifests/classes/motd.pp, which is included by my default node, but your setup is probably different. This is what my class looks like:</li>
</ul>
<pre>class motd {
       include concat::setup
       $motdfile = "/etc/motd.tail"

       concat{$motdfile:
               owner => root,
               group => root,
               mode => 644
       }

       concat::fragment{"motd_header":
               target => $motdfile,
               content => "\nPuppet modules: ",
               order => 10,
       }

       concat::fragment{"motd_footer":
               target => $motdfile,
               content => "\n\n",
               order => 90,
       }
}

# used by other modules to register themselves in the motd
define motd::register($content="", $order=20) {
   if $content == "" {
      $body = $name
   } else {
      $body = $content
   }

   concat::fragment{"motd_fragment_$name":
      target  => "/etc/motd.tail",
      content => "$body ",
      order => $order
   }
}
</pre>
<p>So that&#8217;s quite a mouthful. Let&#8217;s break it down:</p>
<ul>
<li>We have to include concat::setup so the concat module can&#8230;set&#8230; up :)</li>
<li>We then set a variable pointing at the location of the file we want to manage</li>
<li>We then instantiate the concat module for the file we want to manage and set properties like the ownership/mode</li>
<li>We then call the concat::fragment function for two specific fragments we want in the output &#8211; a header and a footer (although I do this on a single line, so it&#8217;s the phrase &#8220;Puppet modules&#8221; and &#8220;\n\n&#8221; respectively). They&#8217;re forced to be header/footer by the &#8220;order&#8221; parameter &#8211; by making sure we use a low number for the header and a high number for the footer, we get the layout we expect.</li>
<li>Outsite this class we define a function motd::register which other modules will call and the content they supply will be handed to concat::fragment with a default order parameter of 20 (which is higher than the value we used for the header and lower than the footer one).</li>
</ul>
<p>Finally, in each of my modules I include the line:</p>
<pre>motd::register{"someawesomemodule":}</pre>
<p>and now when I ssh to a node, I see a line like:</p>
<pre>Puppet modules: web ssh
</pre>
<p>It&#8217;s a fairly simple little thing, but quite pleasing and from here out it&#8217;s almost zero effort &#8211; just adding the motd::register calls to each module.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/08/03/adventures-in-puppet-concat-module/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adventures in Puppet</title>
		<link>http://www.tenshu.net/archives/2010/08/03/adventures-in-puppet/</link>
		<comments>http://www.tenshu.net/archives/2010/08/03/adventures-in-puppet/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 22:04:17 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Puppet]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=11473</guid>
		<description><![CDATA[I&#8217;m very slowly learning and exploring the fascinating world of Puppet for configuration management. As I go I&#8217;m going to try and blog about random things I discover. Partially for my own future reference, partially to help me crystalise my knowledge and partially to help you.
The first post is coming up immediately, I&#8217;m just writing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m very slowly learning and exploring the fascinating world of Puppet for configuration management. As I go I&#8217;m going to try and blog about random things I discover. Partially for my own future reference, partially to help me crystalise my knowledge and partially to help you.</p>
<p>The first post is coming up immediately, I&#8217;m just writing this post as an opening bookend :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/08/03/adventures-in-puppet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Random puppetry</title>
		<link>http://www.tenshu.net/archives/2010/07/14/random-puppetry/</link>
		<comments>http://www.tenshu.net/archives/2010/07/14/random-puppetry/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 19:36:48 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=10626</guid>
		<description><![CDATA[I was talking to a colleague earlier about Puppet and its ability to install packages. I&#8217;d not really given it much thought beyond using it to install packages on classes of machines, but he mentioned one particular package which gets updated quite frequently, but is extremely low risk to update &#8211; tzdata. By setting this [...]]]></description>
			<content:encoded><![CDATA[<p>I was talking to a colleague earlier about Puppet and its ability to install packages. I&#8217;d not really given it much thought beyond using it to install packages on classes of machines, but he mentioned one particular package which gets updated quite frequently, but is extremely low risk to update &#8211; tzdata. By setting this to &#8220;ensure =&gt; latest&#8221; rather than &#8220;ensure =&gt; present&#8221; I can forget about ever having to upgrade that package again \o/</p>
<p>Simple really, but it hadn&#8217;t occurred to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/07/14/random-puppetry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who wants to see something really ugly?</title>
		<link>http://www.tenshu.net/archives/2010/07/06/who-wants-to-see-something-really-ugly/</link>
		<comments>http://www.tenshu.net/archives/2010/07/06/who-wants-to-see-something-really-ugly/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 11:33:42 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=10123</guid>
		<description><![CDATA[I think it should be abundantly clear from my postings here that I&#8217;m not a very good programmer, and this means I give myself a lot of free rope to do some very stupid things.
I&#8217;m in constant need of debugging information and in Terminator particularly where we have lots of objects all interacting and reparenting [...]]]></description>
			<content:encoded><![CDATA[<p>I think it should be abundantly clear from my postings here that I&#8217;m not a very good programmer, and this means I give myself a lot of free rope to do some very stupid things.</p>
<p>I&#8217;m in constant need of debugging information and in Terminator particularly where we have lots of objects all interacting and reparenting all the time. We&#8217;ve had a simple dbg() method for a long time, but I was getting very bored of typing out dbg(&#8216;Class::method:: Some message about %d&#8217; % foo), so I decided to see what could be done about inferring the Class and method parts of the message.</p>
<p>It turns out that python is very good at introspecting its own runtime, so back in January, armed with my own stupidity and some help from various folks on the Internet, I came up with the following:</p>
<pre># set this to true to enable debugging output
DEBUG = False
# set this to true to additionally list filenames in debugging
DEBUGFILES = False
# list of classes to show debugging for. empty list means show all classes
DEBUGCLASSES = []
# list of methods to show debugging for. empty list means show all methods
DEBUGMETHODS = []

def dbg(log = ""):
    """Print a message if debugging is enabled"""
    if DEBUG:
        stackitem = inspect.stack()[1]
        parent_frame = stackitem[0]
        method = parent_frame.f_code.co_name
        names, varargs, keywords, local_vars = inspect.getargvalues(parent_frame)
        try:
            self_name = names[0]
            classname = local_vars[self_name].__class__.__name__
        except IndexError:
            classname = "noclass"
        if DEBUGFILES:
            line = stackitem[2]
            filename = parent_frame.f_code.co_filename
            extra = " (%s:%s)" % (filename, line)
        else:
            extra = ""
        if DEBUGCLASSES != [] and classname not in DEBUGCLASSES:
            return
        if DEBUGMETHODS != [] and method not in DEBUGMETHODS:
            return
        try:
            print >> sys.stderr, "%s::%s: %s%s" % (classname, method, log, extra)
        except IOError:
            pass
</pre>
<p>How&#8217;s about that for shockingly bad? ;)<br />
It also adds a really impressive amount of overhead to the execution time.<br />
I added the DEBUGCLASSES and DEBUGMETHODS lists so I could cut down on the huge amount of output &#8211; these are hooked up to command line options, so you can do something like &#8220;terminator -d &#8211;debug-classes=Terminal&#8221; and only receive debugging messages from the Terminal module.</p>
<p>I&#8217;m not exactly sure what I hope to gain from this post, other than ridicule on the Internet, but maybe, just maybe, someone will pop up and point out how stupid I am in a way that turns this into a 2 line, low-overhead function :D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/07/06/who-wants-to-see-something-really-ugly/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Terminator 0.94 released!</title>
		<link>https://launchpad.net/terminator/+announcement/6261</link>
		<comments>https://launchpad.net/terminator/+announcement/6261#comments</comments>
		<pubDate>Sun, 04 Jul 2010 18:15:47 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">tag:launchpad.net,2010-07-04:/+announcement/6261</guid>
		<description><![CDATA[Lots of bug fixes and some improvements to the preferences are in this release, as well as a couple of new plugins for watching terminals for activity, or taking screenshots of individual terminals.
See the changelog for full details.]]></description>
			<content:encoded><![CDATA[<p>Lots of bug fixes and some improvements to the preferences are in this release, as well as a couple of new plugins for watching terminals for activity, or taking screenshots of individual terminals.<br />
See the changelog for full details.</p>]]></content:encoded>
			<wfw:commentRss>https://launchpad.net/terminator/+announcement/6261/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A good day</title>
		<link>http://www.tenshu.net/archives/2010/07/04/a-good-day-2/</link>
		<comments>http://www.tenshu.net/archives/2010/07/04/a-good-day-2/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 23:40:08 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Friends]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/archives/2010/07/04/a-good-day-2/</guid>
		<description><![CDATA[Today has been about creating, not consuming. Apart from half-watching Primal Fear with Rike, I have spent the day fixing bugs in Terminator and playing with the Akai Synthstation app on my iPad. I suspect I&#8217;m not going to be ruling the clubs anytime soon, and the UI is pretty dreadful for composing music, but [...]]]></description>
			<content:encoded><![CDATA[<p>Today has been about creating, not consuming. Apart from half-watching Primal Fear with Rike, I have spent the day fixing bugs in Terminator and playing with the Akai Synthstation app on my iPad. I suspect I&#8217;m not going to be ruling the clubs anytime soon, and the UI is pretty dreadful for composing music, but it has a good library of sounds and synth mangling knobs :)<br />
I even filmed myself playing some of the parts and edited them together into a little music video, but it&#8217;s really very poor ;)<br />
Rike&#8217;s going to be out for most of tomorrow, so I have to decide between doing more of what I&#8217;ve been doing today, playing PS3 games or going out myself. Tricky!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/07/04/a-good-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Lawnmower Man</title>
		<link>http://www.tenshu.net/archives/2010/06/08/the-lawnmower-man/</link>
		<comments>http://www.tenshu.net/archives/2010/06/08/the-lawnmower-man/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 17:24:01 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=8682</guid>
		<description><![CDATA[Introduction
This website shares a server with various other network services that form the foundation of my online life (i.e. IRC and Email) and I&#8217;ve been running into capacity issues in the last few months, so I&#8217;m running an experiment whereby I upgrade to brand new hardware (Quad Core i7, 8GB of RAM) and partition the [...]]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>This website shares a server with various other network services that form the foundation of my online life (i.e. IRC and Email) and I&#8217;ve been running into capacity issues in the last few months, so I&#8217;m running an experiment whereby I upgrade to brand new hardware (Quad Core i7, 8GB of RAM) and partition the available resources across virtual machines so the various network services are isolated into logical security zones.</p>
<h1>Whining</h1>
<p>I have plenty of experience using Xen for this sort of thing, but that&#8217;s becoming more and more irrelevant in newer kernels/distributions. As much as I think that&#8217;s a shame and a stupid upstream decision, I can&#8217;t change it, so I need to move on to KVM and libvirt.</p>
<h1>Resolution</h1>
<p>So, with the beefy new server booted up in a -server kernel and a big, empty LVM Volume Group I got to work creating some virtual machines. This post is mainly a reminder to myself of the things I need to do for each VM :)</p>
<h1>Action</h1>
<p>These are the steps I used to make a VM with 1GB of RAM, 10GB / and 1GB of swap:</p>
<h3>Create an LVM Logical Volume</h3>
<pre style="padding-left: 30px;">lvcreate -L11G -n somehostname VolumeGroup</pre>
<h3>Create a VM image and libvirt XML definition</h3>
<pre style="padding-left: 30px;">ubuntu-vm-builder kvm lucid --arch amd64 --mem=1024 --cpus=1</pre>
<pre style="padding-left: 30px;">--raw=/dev/VolumeGroup/somehostname --rootsize=10240 --swapsize=1024</pre>
<pre style="padding-left: 30px;">--kernel-flavour=server --hostname=somehostname</pre>
<pre style="padding-left: 30px;">--mirror=http://archive.ubuntu.com/ubuntu/ --components=main,universe</pre>
<pre style="padding-left: 30px;">--name 'Chris Jones' --user cmsj --pass 'ubuntu' --bridge virbr0</pre>
<pre style="padding-left: 30px;">--libvirt qemu:///system --addpkg vim --addpkg ssh --addpkg ubuntu-minimal</pre>
<p>Catchy command, huh? ;)</p>
<h3>Wait</h3>
<p>(building the VM will take a few minutes)</p>
<h3>Modify the libvirt XML definition for performance</h3>
<p>The best driver for disk/networking is the paravirtualised &#8220;virtio&#8221; driver. I found that ubuntu-vm-builder had already configured the networking to use this, but not the disk, so I modified the disk section to look like this:</p>
<pre style="padding-left: 30px;">&lt;disk type='block' device='disk'&gt;</pre>
<pre style="padding-left: 30px;">  &lt;source dev='/dev/VolumeGroup/somehostname'/&gt;</pre>
<pre style="padding-left: 30px;">  &lt;target dev='vda' bus='virtio'/&gt;</pre>
<pre style="padding-left: 30px;">&lt;/disk&gt;</pre>
<h3>Modify the libvirt XML definition for emulated serial console</h3>
<div>I don&#8217;t really want to use VNC to talk to the console of my VMs, so I add the following to the &lt;devices&gt; section of the XML definition to make a virtualised serial port and consider it a console:</div>
<pre>
<div style="padding-left: 30px;">&lt;serial type='pty'&gt;</div>
<div style="padding-left: 30px;">  &lt;target port='0'/&gt;</div>
<div style="padding-left: 30px;">&lt;/serial&gt;</div>
<div style="padding-left: 30px;">&lt;console type='pty'&gt;</div>
<div style="padding-left: 30px;">  &lt;target port='0'/&gt;</div>
<div style="padding-left: 30px;">&lt;/console&gt;</div>
</pre>
<h3>Modify the libvirt XML definition for a better CPU</h3>
<p>I&#8217;m running this on an Intel Core i7 (Nehalem), but libvirt&#8217;s newest defined CPU type is a Core2Duo, so we&#8217;ll go with that in the root of the &lt;domain&gt; section:</p>
<pre style="padding-left: 30px;">&lt;cpu match='minimum'&gt;</pre>
<pre style="padding-left: 30px;">  &lt;model&gt;core2duo&lt;/model&gt;</pre>
<pre style="padding-left: 30px;">&lt;/cpu&gt;</pre>
<p><strong>Import the XML definition into the running libvirt daemon</strong></p>
<pre style="padding-left: 30px;">virsh define /etc/libvirt/qemu/somehostname.xml</pre>
<h3>Mount the VM&#8217;s root filesystem</h3>
<div>The Logical Volume we created should be considered as a whole disk, not a mountable partition, but dmsetup can present the partitions within it, and these should still be present after running ubuntu-vm-builder:</div>
<pre style="padding-left: 30px;">mkdir /mnt/tmpvmroot</pre>
<pre style="padding-left: 30px;">mount /dev/mapper/VolumeGroup-somehostnamep1 /mnt/tmpvmroot</pre>
<h3>Fix fstab in the VM</h3>
<div>Edit /mnt/tmpvmroot/etc/fstab and s/hda/vda/</div>
<h3>Configure serial console in the VM</h3>
<div>Edit ﻿/etc/init/ttyS0.conf and place the following in it:</div>
<pre>
<div style="padding-left: 30px;"># ttyS0 - getty</div>
<div style="padding-left: 30px;">#</div>
<div style="padding-left: 30px;"># This service maintains a getty on ttyS0 from the point the system is</div>
<div style="padding-left: 30px;"># started until it is shut down again.</div>
<div style="padding-left: 30px;">start on stopped rc RUNLEVEL=[2345]</div>
<div style="padding-left: 30px;">stop on runlevel [!2345]</div>
<div style="padding-left: 30px;">respawn</div>
<div style="padding-left: 30px;">exec /sbin/getty -L 115200 ttyS0 xterm</div>
</pre>
<div>Edit /boot/grub/menu.lst and look for the commented &#8220;defoptions&#8221; line. Change it to:</div>
<pre>
<div style="padding-left: 30px;"># defoptions=console=ttyS0 console=tty0</div>
</pre>
<div>(the default &#8220;quiet splash&#8221; is not useful for servers IMHO)</div>
<h3>Unmount the VM&#8217;s root filesystem</h3>
<pre style="padding-left: 30px;">umount /mnt/tmpvmroot</pre>
<pre style="padding-left: 30px;">rmdir /mnt/tmpvmroot</pre>
<h3>Start the VM</h3>
<pre style="padding-left: 30px;">virsh start somehostname</pre>
<h3>SSH into the VM</h3>
<p>I didn&#8217;t specify any networking details to ubuntu-vm-builder, so the machine will boot and try to get an address from DHCP. By default you&#8217;ll have a bridge device for libvirt called virbr0 and dnsmasq will be running, so watch syslog for the VM getting its address.</p>
<pre style="padding-left: 30px;">ssh cmsj@192.168.122.xyz</pre>
<p>you should now be in your VM! Now all you need to do is configure it to do things and then fix its networking. My plan is to switch the VMs to static IPs and then use NAT to forward connections from public IPs to the VMs, but you could bridge them onto the host&#8217;s main ethernet device and assign public IPs directly to the VMs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/06/08/the-lawnmower-man/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Python decisions</title>
		<link>http://www.tenshu.net/archives/2010/06/03/python-decisions/</link>
		<comments>http://www.tenshu.net/archives/2010/06/03/python-decisions/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 21:06:31 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=8573</guid>
		<description><![CDATA[Every time I find myself hacking on some Python I find myself second guessing all sorts of tiny design decisions and so I figure the only way to get any kind of perspective on them is to talk about them. Either I&#8217;ll achieve more clarity through constructing explanations of what I was thinking, or people [...]]]></description>
			<content:encoded><![CDATA[<p>Every time I find myself hacking on some Python I find myself second guessing all sorts of tiny design decisions and so I figure the only way to get any kind of perspective on them is to talk about them. Either I&#8217;ll achieve more clarity through constructing explanations of what I was thinking, or people will comment with useful insights. Hopefully the latter, but this is hardly the most popular blog in the world ;)<br />
So. What shall we look at first. Well, I just hacked up a tiny script last night to answer a simple question:</p>
<p style="padding-left: 30px;"><em> Is most of my music collection from the 90s?</em></p>
<address style="padding-left: 30px;"> </address>
<p>Obviously what I want to do here is examine the ID3 tags of the files in my music collection and see how they&#8217;re distributed. A quick search with apt showed that Ubuntu 10.04 has two python libraries for dealing with ID3 tags and a quick play with each suggested that the one with the API most relevant to my interests was <a title="Install eyeD3" href="apt:python-eyed3">eyeD3</a>. After a few test iterations of the script I was getting bored of waiting for it to silently scan the roughly 4000 MP3s I have, so I did another quick search and found a <a title="Install progressbar" href="apt:python-progressbar">progress bar </a>library.</p>
<p>So that&#8217;s all of the motive and opportunity established, now let&#8217;s examine the means to the end. If you want to follow along at home, the whole script is <a title="musicdecades.py.txt" href="/wp-content/uploads/2010/06/musicdecades.py_.txt">here</a>.</p>
<p style="padding-left: 30px;">
<pre style="padding-left: 30px;">try:</pre>
<pre style="padding-left: 30px;"> import eyeD3</pre>
<pre style="padding-left: 30px;"> import progressbar as pbar</pre>
<pre style="padding-left: 30px;">except ImportError:</pre>
<pre style="padding-left: 30px;">print("You should make sure python-eyed3 and python-progressbar \</pre>
<pre style="padding-left: 30px;">are installed")</pre>
<pre style="padding-left: 30px;"> sys.exit(1)</pre>
<p>First off this is the section where I&#8217;m importing the two non-default python libraries that I depend on. I want to provide a good experience when they&#8217;re not installed, so I catch the exception and tell people the Debian/Ubuntu package names they need, and exit gracefully. I rename the progressbar module as I import it just because &#8220;progressbar&#8221; is annoyingly long as a name, and I don&#8217;t like doing &#8220;from foo import *&#8221;.</p>
<p>Skipping further on, we find the code that extracts the ID3 year tag:</p>
<pre style="padding-left: 30px;">year = tag.getYear() or 'Unknown'
</pre>
<p>This is something I&#8217;m really not sure about the &#8220;correctness&#8221; of; One of the reasons I went with the eyeD3 library was that the getYear() method returns None if it can&#8217;t find any data, but I don&#8217;t really want to capture the result, then test the result explicitly and if it&#8217;s None set the value to &#8220;Unknown&#8221;, so I went with the above code which only needs a single line and is (IMHO) highly readable.</p>
<p>This is ultimately the crux of the entire program &#8211; we&#8217;ve now collected the year, so we can work out which decade it&#8217;s from:</p>
<pre style="padding-left: 30px;">if year is not 'Unknown':
 year = "%s0s" % str(year)[:3]
</pre>
<p>If this isn&#8217;t an unknown year we chop the final digit off the year and replace it with a zero. Job done!</p>
<p>Next up, another style question. Rather than store the year we just processed I want to know how many of each decade have been found, so the obvious choice is a dict where the keys are the decades and the values are the number of times each decade has been found. One option would be to pre-fill the dict with all the decades, each with a value of zero, but that seems redundant and ugly, so instead I start out with an empty dict. This presents a challenge &#8211; if we find a decade that isn&#8217;t already a key in the dict (which will frequently be the case) we need to notice that and add it. We could do this by pre-emptively testing the dict with its has_key() method, but that struck me as annoyingly wordy, so I went with:</p>
<pre style="padding-left: 30px;">try:</pre>
<pre style="padding-left: 30px;"> years[year] += 1</pre>
<pre style="padding-left: 30px;">except KeyError:</pre>
<pre style="padding-left: 30px;"> years[year] = 1</pre>
<p>If we are incrementing a year that isn&#8217;t already in the dict, python will raise a KeyError, at which point we know what&#8217;s happened and know the correct value is 1, so we just set it explicitly. Seems like the simplest solution, but is it the sanest?</p>
<p>The only other thing I wanted to say is a complaint &#8211; having built up the dict I then want to print it nicely, so I have a quick list comprehension to produce a list of strings of the format &#8220;19xx: yy&#8221; (i.e. the decade and the final number of tracks found for that decade), which I then join together using:</p>
<pre style="padding-left: 30px;">', '.join(OUTPUT)</pre>
<p>which I hate! Why can&#8217;t I do:</p>
<pre style="padding-left: 30px;">OUTPUT.join(', ')</pre>
<p>(where &#8220;OUTPUT&#8221; is the list of strings). If that were possible, what I&#8217;d actually do is tack the .join() onto the end of the list comprehension and a single line would turn the dict into a printable string.</p>
<p>So there we have it, my thoughts on the structure of my script. I&#8217;d also add that I&#8217;ve become mildly obsessive about getting good scores from pylint on my code, which is why it&#8217;s rigorously formatted, docstring-ed and why the variable names in the __main__ section are in capitals.</p>
<p>What are your thoughts?</p>
<p>Oh, and the answer is no, most of my music is from the 2000s. The 1990s come in second :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/06/03/python-decisions/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>gtk icon cache search tool</title>
		<link>http://www.tenshu.net/archives/2010/05/12/gtk-icon-cache-search-tool/</link>
		<comments>http://www.tenshu.net/archives/2010/05/12/gtk-icon-cache-search-tool/#comments</comments>
		<pubDate>Wed, 12 May 2010 22:35:45 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=4867</guid>
		<description><![CDATA[Earlier on this evening I was asking the very excellent Ted Gould about a weird problem with my Gtk+ icon theme &#8211; an app I&#8217;d previously installed by hand in /usr/local/, but subsequently removed, had broken icons because Gtk+ was looking in /usr/local/share/icons/ instead of /usr/share/icons/.
We did a little digging and realised I had an [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier on this evening I was asking the very excellent Ted Gould about a weird problem with my Gtk+ icon theme &#8211; an app I&#8217;d previously installed by hand in /usr/local/, but subsequently removed, had broken icons because Gtk+ was looking in /usr/local/share/icons/ instead of /usr/share/icons/.</p>
<p>We did a little digging and realised I had an icon theme cache file in /usr/local/ that was overriding the one in /usr/. A bit of deleting later and it&#8217;s back, but in the process we whipped up a little bit of python to print out the filename of an icon given an icon name.</p>
<pre style="padding-left: 30px;">#!/usr/bin/python
# gtk-find-icon by Chris Jones &lt;cmsj@tenshu.net&gt;
# Copyright 2010. GPL v2.

import sys
import gtk

THEME = gtk.IconTheme()
ICON = THEME.lookup_icon(sys.argv[1],
 gtk.ICON_SIZE_MENU,
 gtk.ICON_LOOKUP_USE_BUILTIN)

if not ICON:
 print "None found"
else:
 print(ICON.get_filename())</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/05/12/gtk-icon-cache-search-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Writing Terminator plugins</title>
		<link>http://www.tenshu.net/archives/2010/04/18/writing-terminator-plugins/</link>
		<comments>http://www.tenshu.net/archives/2010/04/18/writing-terminator-plugins/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 20:30:43 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=814</guid>
		<description><![CDATA[Terminator Plugin HOWTO
One of the features of the new 0.9x series of Terminator releases that hasn&#8217;t had a huge amount of announcement/discussion yet is the plugin system. I&#8217;ve posted previously about the decisions that went into the design of the plugin framework, but I figured now would be a good time to look at how [...]]]></description>
			<content:encoded><![CDATA[<h2>Terminator Plugin HOWTO</h2>
<p>One of the features of the new 0.9x series of Terminator releases that hasn&#8217;t had a huge amount of announcement/discussion yet is the plugin system. I&#8217;ve posted previously about the decisions that went into the design of the plugin framework, but I figured now would be a good time to look at how to actually take advantage of it.</p>
<p>While the plugin system is really generic, so far there are only two points in the Terminator code that actually look for plugins &#8211; the Terminal context menu and the default URL opening code. If you find you&#8217;d like to write a plugin that interacts with a different part of Terminator, please let me know, I&#8217;d love to see some clever uses of plugins and I definitely want to expand the number of points that plugins can hook into.</p>
<h2>The basics of a plugin</h2>
<p>A plugin is a class in a .py file in terminatorlib/plugins or ~/.config/terminator/plugins, but not all classes are automatically treated as plugins. Terminator will examine each of the .py files it finds for a list called &#8216;available&#8217; and it will load each of the classes mentioned therein.</p>
<p>Additionally, it would be a good idea to import terminatorlib.plugin as that contains the base classes that other plugins should be derived from.</p>
<p>A quick example:</p>
<pre style="padding-left: 30px;">import terminatorlib.plugin as plugin
available = ['myfirstplugin']
class myfirstplugin(plugin.SomeBasePluginClass):
  etc.
</pre>
<p>So now let&#8217;s move on to the simplest type of plugin currently available in Terminator, a URL handler.</p>
<h2>URL Handlers</h2>
<p>This type of plugin adds new regular expressions to match text in the terminal that should be handled as URLs. We ship an example of this with Terminator, it&#8217;s a handler that adds support for the commonly used format for Launchpad. Ignoring the comments and the basics above, this is ultimately all it is:</p>
<pre style="padding-left: 30px;">class LaunchpadBugURLHandler(plugin.URLHandler):
  capabilities = ['url_handler']
  handler_name = 'launchpad_bug'
  match = '\\b(lp|LP):?\s?#?[0-9]+(,\s*#?[0-9]+)*\\b'
</pre>
<pre style="padding-left: 30px;">  def callback(self, url):
    for item in re.findall(r'[0-9]+', url):
      return('https://bugs.launchpad.net/bugs/%s' % item)</pre>
<p>That&#8217;s it! Let&#8217;s break it down a little to see the important things here:</p>
<ul>
<li>inherit from plugin.URLHandler if you want to handle URLs.</li>
<li>include &#8216;url_handler&#8217; in your capabilities list</li>
<li>URL handlers must specify a unique handler_name (no enforcement of uniqueness is performed by Terminator, so use some common sense with the namespace)</li>
<li>Terminator will call a method in your class called callback() and pass it the text that was matched. You must return a valid URL which will probably be based on this text.</li>
</ul>
<p>and that&#8217;s all there is to it really. Next time you start terminator you should find the pattern you added gets handled as a URL!</p>
<h2>Context menu items</h2>
<p>This type of plugin is a little more involved, but not a huge amount and as with URLHandler we ship an example in terminatorlib/plugins/custom_commands.py which is a plugin that allows users to add custom commands to be sent to the terminal when selected. This also brings a second aspect of making more complex plugins &#8211; storing configuration. Terminator&#8217;s shiny new configuration system (based on the excellent ConfigObj) exposes some API for plugins to use for loading and storing their configuration. The nuts and bolts here are:</p>
<pre style="padding-left: 30px;">import terminatorlib.plugin as plugin
from terminatorlib.config import Config
available = ['CustomCommandsMenu']
class CustomCommandsMenu(plugin.MenuItem):
  capabilities = ['terminal_menu']
  config = None
  def __init__(self):
    self.config = Config()
    myconfig = self.config.plugin_get_config(self.__class__.__name__)
    # Now extract valid data from sections{}
  def callback(self, menuitems, menu, terminal):
    menuitems.append(gtk.MenuItem('some jazz'))
</pre>
<p>This is a pretty simplified example, but it&#8217;s sufficient to insert a menu item that says &#8220;some jazz&#8221;. I&#8217;m not going to go into the detail of hooking up a handler to the &#8216;activate&#8217; event of the MenuItem or other PyGTK mechanics, but this gives you the basic detail. The method that Terminator will call from your class is again &#8220;callback()&#8221; and you get passed a list you should add your menu structure to, along with references to the main menu object and the related Terminal. As the plugin system expands and matures I&#8217;d like to be more formal about the API that plugins should expect to be able to rely on, rather than having them poke around inside classes like Config and Terminal. Suggestions are welcome :)</p>
<p>Regarding the configuration storage API &#8211; the value returned by Config.plugin_get_config() is just a dict, it&#8217;s whatever is currently configured for your plugin&#8217;s name in the Terminator config file. There&#8217;s no validation of this data, so you should pay attention to it containing valid data. You can then set whatever you want in this dict and pass it to Config().plugin_set_config() with the name of your class and then call Config().save() to flush this out to disk (I recommend that you be quite liberal about calling save()).</p>
<h2>Wrap up</h2>
<p>Right now that&#8217;s all there is to it. Please get in touch if you have any suggestions or questions &#8211; I&#8217;d love to ship more plugins with Terminator itself, and I can think of some great ideas. Probably the most useful thing would be something to help customise Terminator for heavy ssh users (see the earlier fork of Terminator called &#8217;ssherminator&#8217;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/04/18/writing-terminator-plugins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Terminator 0.93 released!</title>
		<link>https://launchpad.net/terminator/+announcement/5614</link>
		<comments>https://launchpad.net/terminator/+announcement/5614#comments</comments>
		<pubDate>Thu, 15 Apr 2010 20:34:01 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">tag:launchpad.net,2010-04-15:/+announcement/5614</guid>
		<description><![CDATA[Another week, another release focused on squashing as many bugs as possible. There's also one feature in this release - a patch from Kees Cook to add a preferences UI for the alternate_screen_scroll setting.
Please keep those bug reports coming, the re...]]></description>
			<content:encoded><![CDATA[<p>Another week, another release focused on squashing as many bugs as possible. There's also one feature in this release - a patch from Kees Cook to add a preferences UI for the alternate_<wbr></wbr>screen_<wbr></wbr>scroll setting.<br />
Please keep those bug reports coming, the response to the 0.9x series has been fantastic!</p>]]></content:encoded>
			<wfw:commentRss>https://launchpad.net/terminator/+announcement/5614/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terminator 0.92 released</title>
		<link>https://launchpad.net/terminator/+announcement/5556</link>
		<comments>https://launchpad.net/terminator/+announcement/5556#comments</comments>
		<pubDate>Wed, 07 Apr 2010 21:50:58 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">tag:launchpad.net,2010-04-07:/+announcement/5556</guid>
		<description><![CDATA[Hot on the heels of 0.91 we have a new release for you. This is another bugfix release, stomping on as many regressions from 0.14 as we can find. Many, many thanks to all of the people who have been in touch with the project to tel us about the things ...]]></description>
			<content:encoded><![CDATA[<p>Hot on the heels of 0.91 we have a new release for you. This is another bugfix release, stomping on as many regressions from 0.14 as we can find. Many, many thanks to all of the people who have been in touch with the project to tel us about the things that are affecting them. If you find more regressions/bugs, please let us know!<br />
Also in this release the Palette section of the Profile editor in the Preferences GUI is now fully active, which means that all of the config file options should now be fully editable in the GUI.</p>]]></content:encoded>
			<wfw:commentRss>https://launchpad.net/terminator/+announcement/5556/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terminator 0.90 released!</title>
		<link>https://launchpad.net/terminator/+announcement/5496</link>
		<comments>https://launchpad.net/terminator/+announcement/5496#comments</comments>
		<pubDate>Tue, 30 Mar 2010 22:22:12 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">tag:launchpad.net,2010-03-30:/+announcement/5496</guid>
		<description><![CDATA[After lots of work we're really very proud to announce that the completely re-worked Terminator 0.90 is now available! Hopefully we haven't introduced too many new bugs in exchange for the much requested features of being able to save layouts!]]></description>
			<content:encoded><![CDATA[After lots of work we're really very proud to announce that the completely re-worked Terminator 0.90 is now available! Hopefully we haven't introduced too many new bugs in exchange for the much requested features of being able to save layouts!]]></content:encoded>
			<wfw:commentRss>https://launchpad.net/terminator/+announcement/5496/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Heads up, new Terminator incoming</title>
		<link>http://www.tenshu.net/archives/2010/03/30/heads-up-new-terminator-incoming/</link>
		<comments>http://www.tenshu.net/archives/2010/03/30/heads-up-new-terminator-incoming/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 13:07:56 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=800</guid>
		<description><![CDATA[Ok folks, I suck for not getting Terminator 0.90 released earlier and I suck for not having a bunch of bug fixes for 0.14 in Ubuntu Lucid.
I&#8217;m going to fix both tonight by releasing 0.90 and begging the lovely Ubuntu Universe folks to grant an exception to get it into Lucid.
Here&#8217;s hoping everything goes smoothly!
]]></description>
			<content:encoded><![CDATA[<p>Ok folks, I suck for not getting Terminator 0.90 released earlier and I suck for not having a bunch of bug fixes for 0.14 in Ubuntu Lucid.<br />
I&#8217;m going to fix both tonight by releasing 0.90 and begging the lovely Ubuntu Universe folks to grant an exception to get it into Lucid.<br />
Here&#8217;s hoping everything goes smoothly!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/03/30/heads-up-new-terminator-incoming/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>An adventure with an HP printer/scanner and Ubuntu</title>
		<link>http://www.tenshu.net/archives/2010/03/15/an-adventure-with-an-hp-printerscanner-and-ubuntu/</link>
		<comments>http://www.tenshu.net/archives/2010/03/15/an-adventure-with-an-hp-printerscanner-and-ubuntu/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 13:17:12 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=389</guid>
		<description><![CDATA[For a while now I&#8217;ve been thinking about some ideas for a project that will require a scanner. No problem you think, scanners of various kinds have been supported in Linux for a long time.
I dislike ordering hardware online because of the shipping lag and because I&#8217;m a sucker for the retail experience, so I [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now I&#8217;ve been thinking about some ideas for a project that will require a scanner. No problem you think, scanners of various kinds have been supported in Linux for a long time.</p>
<p>I dislike ordering hardware online because of the shipping lag and because I&#8217;m a sucker for the retail experience, so I was checking out which devices would work with Ubuntu and which devices were on sale in my local computer supermarket. The latter was a depressingly short list, and the former was getting annoying to search for, but I stumbled on the idea of a multi-function printer. It turns out that it&#8217;s cheaper to buy a scanner as part of a printer than it is to buy a scanner on its own (granted the resolution of the scanner isn&#8217;t quite as good, but it&#8217;s more than sufficient for my needs). The reason for this is undoubtedly that the manufacturers are expecting to make up their money by selling me ink cartridges every few months.</p>
<p>As I started to look at models of multi-function printers, one thing became apparent almost immediately &#8211; HP have done a lot of leg work on this. I quickly found a bunch of info on their site about how they basically support all of their stuff on Linux, including a page which specifically listed popular distros and which versions worked with which printers.</p>
<p>I decided pretty much immediately that I wanted to support this, so off I went to the shop to buy an HP. They had the decent looking F4580 for around £40, so I nabbed that and set off home.</p>
<p>When I got home I fired up my laptop running Lucid and plugged the new device in. Less than 10 seconds later I was told it was ready for printing, and I fired up Robert Ancell&#8217;s excellent new Simple Scan to see what configuration I would need to do to make that work&#8230;. the answer being none, it scanned a page first time.</p>
<p>Now smug with the ease with which that had worked I started installing the HP driver software on a popular proprietary operating system so I could use it to configure the printer&#8217;s WiFi feature (something I assumed I couldn&#8217;t do from within Ubuntu &#8211; an assumption that turns out to have been wrong). Ten minutes later it was still finishing off the install process, but eventually I did get the printer hooked up to our wireless network.</p>
<p>Back to the Lucid machine, I told it to add a new printer, it immediately saw the HP announcing itself on the network and let me quickly add that and I could print over wifi. Pretty nifty stuff.</p>
<p>Then I started poking around with HP&#8217;s Linux Imaging and Printing software (HPLIP) and noticed that there was an &#8220;hp-toolbox&#8221; that wasn&#8217;t installed. This is the tool I should have used to configure the wifi network on the printer; It also shows the ink levels and lets you kick off scanning/printing/cleaning type jobs. Out of sheer curiosity I went into hp-toolbox&#8217;s preferences and changed it from using xsane to simple-scan, and told it to start a Scan. I wasn&#8217;t expecting it to work because the device wasn&#8217;t connected via USB, but it turns out that not only does the device support scanning over WiFi, it works in Linux. It&#8217;s not quite as fast as a direct hookup, but it&#8217;s certainly significantly more convenient!</p>
<p>So there we have it, out of the box I was up and running within 10 seconds of plugging the device in, and if I&#8217;d known to just install hp-toolbox I would have had everything running wirelessly a few minutes later. This being compared to installing CDs and dealing with great gobs of driver/application mess (I&#8217;ve seen HP&#8217;s Windows drivers and it&#8217;s no fun trying to persuade them to update themselves, or to persuade them not to prompt you to register every week). A huge, epic victory for Linux and Ubuntu &#8211; and one that I seem to find with much random consumer hardware these days. A few years ago this post would have been full of complicated commands and scripts and compilation as I described how to make the device work, but now all I can do is be smug about how easy it was :D<br />
Win.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/03/15/an-adventure-with-an-hp-printerscanner-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>This is your captain speaking, Terminator has now landed!</title>
		<link>http://www.tenshu.net/archives/2010/01/21/this-is-your-captain-speaking-we-have-now-landed/</link>
		<comments>http://www.tenshu.net/archives/2010/01/21/this-is-your-captain-speaking-we-have-now-landed/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:35:23 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=383</guid>
		<description><![CDATA[I managed to finish off what I thought were the last few missing keyboard shortcuts during my lunch break today, but then realised that I&#8217;d missed two, but I was so excited an short of time that I decided to just go ahead and land the branch anyway!
So there it is &#8211; trunk is now [...]]]></description>
			<content:encoded><![CDATA[<p>I managed to finish off what I thought were the last few missing keyboard shortcuts during my lunch break today, but then realised that I&#8217;d missed two, but I was so excited an short of time that I decided to just go ahead and land the branch anyway!<br />
So there it is &#8211; trunk is now completely refactored and full of exciting new bugs. I noticed while I was working from it this afternoon that the transparency setting code wasn&#8217;t working, but I expect I can get that cleared up tonight :)</p>
<p>Now a bunch of bug fixing and a config converter and we can release!<br />
Thanks to everyone who has been testing so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/01/21/this-is-your-captain-speaking-we-have-now-landed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Final approach for Terminator epic-refactor</title>
		<link>http://www.tenshu.net/archives/2010/01/21/final-approach-for-terminator-epic-refactor/</link>
		<comments>http://www.tenshu.net/archives/2010/01/21/final-approach-for-terminator-epic-refactor/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 00:21:09 +0000</pubDate>
		<dc:creator>cmsj</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Techie]]></category>
		<category><![CDATA[Terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.tenshu.net/?p=380</guid>
		<description><![CDATA[I&#8217;m done hacking on the Terminator epic-refactor branch for the evening and the following has been achieved today (in chronological order):

Fix a bug in handling URLs dropped on the window
Implement directional navigation
Implement geometry hinting
Fix a bug in group emitting that cause &#8220;Broadcast off&#8221; and &#8220;Broadcast to all&#8221; to become inverted
Implement WM_URGENT bell handler

I&#8217;m really happy [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m done hacking on the Terminator epic-refactor branch for the evening and the following has been achieved today (in chronological order):</p>
<ul>
<li>Fix a bug in handling URLs dropped on the window</li>
<li>Implement directional navigation</li>
<li>Implement geometry hinting</li>
<li>Fix a bug in group emitting that cause &#8220;Broadcast off&#8221; and &#8220;Broadcast to all&#8221; to become inverted</li>
<li>Implement WM_URGENT bell handler</li>
</ul>
<p>I&#8217;m <em>really</em> happy with how this is going. All that is left to have feature parity with trunk, I think, is some keyboard shortcut handlers.</p>
<p>I&#8217;d still love to get more testing results to make sure I haven&#8217;t missed anything, but at this rate I&#8217;m expecting to be able to land the epic-refactor branch on trunk this weekend, after five and a half months.</p>
<p>Then I&#8217;m going to write a tool to convert old config files and we can think about putting out a 0.90 beta release. Exciting stuff!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tenshu.net/archives/2010/01/21/final-approach-for-terminator-epic-refactor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
