<?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>Confessions of a Guru &#187; linux</title>
	<atom:link href="http://www.guru.net.nz/blog/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.guru.net.nz/blog</link>
	<description>Random stuff from a Dunedin (NZ) based web developer, beer drinker and dad</description>
	<lastBuildDate>Wed, 14 Dec 2011 09:18:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Adjusting the screen DPI in Ubuntu</title>
		<link>http://www.guru.net.nz/blog/2011/08/adjusting-the-screen-dpi-in-ubuntu.html</link>
		<comments>http://www.guru.net.nz/blog/2011/08/adjusting-the-screen-dpi-in-ubuntu.html#comments</comments>
		<pubDate>Sun, 07 Aug 2011 10:04:50 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/blog/?p=418</guid>
		<description><![CDATA[My laptop has a screen resolution of 1280&#215;800 (it&#8217;s a 16:10 ratio widescreen). Sometimes it seems that the screen is a little crowded. Fortunately on most operating systems there&#8217;s a solution &#8211; adjust the screen DPI to get more pixels per inch. The simplest way to do this in Gnome (the default window manager for [...]]]></description>
			<content:encoded><![CDATA[<p>My laptop has a screen resolution of 1280&#215;800 (it&#8217;s a 16:10 ratio widescreen). Sometimes it seems that the screen is a little crowded. Fortunately on most operating systems there&#8217;s a solution &#8211; adjust the screen DPI to get more pixels per inch.</p>
<p>The simplest way to do this in Gnome (the default window manager for Ubuntu) is to go into the following:</p>
<ol>
<li>System, Preferences, Appearance</li>
<li>Click on the Fonts tab</li>
<li>Click on the Details button in the bottom right</li>
<li>Adjust the &#8220;Resolution&#8221; value.</li>
</ol>
<div>The default value is 96 &#8211; I find that 84 is a good number for me, but even down at 70 the text is still very readable.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2011/08/adjusting-the-screen-dpi-in-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redshift &#8211; visual help for night owl programmers</title>
		<link>http://www.guru.net.nz/blog/2011/05/redshift-visual-help-for-night-owl-programmers.html</link>
		<comments>http://www.guru.net.nz/blog/2011/05/redshift-visual-help-for-night-owl-programmers.html#comments</comments>
		<pubDate>Tue, 24 May 2011 12:27:36 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[gnome]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/blog/?p=377</guid>
		<description><![CDATA[If you&#8217;re a night owl like me the first thing you do when you crank up your laptop at night is to bust down the brightness down to minimum to save yourself some eyestrain. After coming across a page showing The Best Of Linux Software I saw mention of a program called redshift. Redshift makes [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a night owl like me the first thing you do when you crank up your laptop at night is to bust down the brightness down to minimum to save yourself some eyestrain.  After coming across a page showing <a href="www.makeuseof.com/pages/best-linux-software">The Best Of Linux Software</a> I saw mention of a program called redshift. Redshift makes your screen redder by adjusting the gamma curves, and thus making your screen easier to see.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">bob<span style="color: #000000; font-weight: bold;">@</span>bob-laptop:~$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> redshift libnotify-bin</pre></div></div>

<p>(libnotify is not required to run redshift, but is used by the script below).</p>
<p>The ocular science behind this is straightforward &#8211; to quote <a href="http://en.wikipedia.org/wiki/Night_vision">Wikipedia</a>:</p>
<blockquote><p>In biological night vision, molecules of rhodopsin in the rods of the eye undergo a change in shape as they absorb light. Rhodopsin is the chemical that allows night-vision, and is extremely sensitive to light. Exposed to a spectrum of light, the pigment immediately bleaches, and it takes about 30 minutes to regenerate fully, but most of the adaptation occurs within the first five or ten minutes in the dark. Rhodopsin in the human rods is less sensitive to the longer red wavelengths of light, so many people use red light to help preserve night vision as it only slowly depletes the eye&#8217;s rhodopsin stores in the rods and instead is viewed by the cones.</p></blockquote>
<p>Anyway, the utility is simple enough to use, but requires that it be launched from the command line.  I don&#8217;t mind that at all, but I don&#8217;t want the hassle of having to do that.  Instead what I ended up doing was writing a wrapper script for redshift that I placed on my Gnome panel which would effectively toggle redshift on and off when I click the icon.  Here&#8217;s the script:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># Redshift toggle script</span>
<span style="color: #666666; font-style: italic;"># @author: Bob Brown, gurubob@gmail.com</span>
<span style="color: #666666; font-style: italic;"># @blog: http://www.guru.net.nz/</span>
<span style="color: #666666; font-style: italic;"># </span>
<span style="color: #666666; font-style: italic;"># Required packages: redshift libnotify-bin</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Lat/Long for Dunedin, New Zealand</span>
<span style="color: #007800;">LAT</span>=-<span style="color: #000000;">45.8</span>
<span style="color: #007800;">LONG</span>=<span style="color: #000000;">170.5</span>
<span style="color: #007800;">NOTIFYIMAGE</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>icons<span style="color: #000000; font-weight: bold;">/</span>Humanity<span style="color: #000000; font-weight: bold;">/</span>actions<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">22</span><span style="color: #000000; font-weight: bold;">/</span>object-inverse.svg
&nbsp;
<span style="color: #007800;">RUNNING</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #c20cb9; font-weight: bold;">ps</span> aux<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> redshift<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> <span style="color: #c20cb9; font-weight: bold;">grep</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> redshift.sh<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">wc</span> <span style="color: #660033;">-l</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$RUNNING</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	notify-send <span style="color: #660033;">-i</span> <span style="color: #007800;">$NOTIFYIMAGE</span> <span style="color: #ff0000;">&quot;Stopping Redshift&quot;</span> <span style="color: #ff0000;">&quot;Redshift is shutting down&quot;</span>
	<span style="color: #c20cb9; font-weight: bold;">killall</span> redshift
<span style="color: #000000; font-weight: bold;">else</span>
	notify-send <span style="color: #660033;">-i</span> <span style="color: #007800;">$NOTIFYIMAGE</span> <span style="color: #ff0000;">&quot;Starting Redshift&quot;</span> <span style="color: #ff0000;">&quot;Redshift has been started with your location as per $0&quot;</span>
	<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>redshift <span style="color: #660033;">-l</span> <span style="color: #007800;">$LAT</span>:<span style="color: #007800;">$LONG</span> <span style="color: #000000; font-weight: bold;">&amp;</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<p>You can see the script is straightforward and requires a little configuration &#8211; redshift requires your latitude and longitude as it adjusts the redshift of your screen based on the time of day, swinging between maximum redness at midnight and no redness during daylight hours (the website claims this, but I have not yet seen it as I&#8217;ve been running redshift for about an hour so far and it&#8217;s 12:13am). You can use this <a href="http://itouchmap.com/latlong.html">interactive map</a> to find your latitude and longitude.</p>
<p>The shift to red is dramatic at first, especially going from the cool blue-white of maximum screen output but after a few minutes I find myself hardly noticing it at all.  It will be interesting to see whether redshift finds a permanent place on my laptop.</p>
<p>By the way, there is a GTK front-end for redshift too and it works just as well.  It allows you to toggle the application by right clicking the red lightbulb icon in the notification area of the gnome panel.  Simply install it like so:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">bob<span style="color: #000000; font-weight: bold;">@</span>bob-laptop:~$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> gtk-redshift</pre></div></div>

<p>and then place it into your startup applications in Gnome:</p>
<ol>
<li>System, Preferences, Startup Applications</li>
<li>Click Add</li>
<li>Enter &#8220;Redshift&#8221; for the name</li>
<li>Enter <em>/usr/bin/gtk-redshift -l YOURLAT:YOURLONG</em> for the command (my command is <em>/usr/bin/gtk-redshift -l -45:170</em>, roughly)
<li>Click Add</li>
<ol>
<p>Presumably now redshift will start when you log in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2011/05/redshift-visual-help-for-night-owl-programmers.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wubi &#8211; the Windows Ubuntu Installer</title>
		<link>http://www.guru.net.nz/blog/2010/09/wubi-the-windows-ubuntu-installer.html</link>
		<comments>http://www.guru.net.nz/blog/2010/09/wubi-the-windows-ubuntu-installer.html#comments</comments>
		<pubDate>Fri, 03 Sep 2010 11:04:31 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/blog/?p=356</guid>
		<description><![CDATA[So you&#8217;ve heard about Ubuntu and you&#8217;ve been interested but when you found out that it (can) completely replace your current operating system you thought better of it.  After all, the last thing you want to happen when you try a piece of new software is for you to lose everything. Enter Wubi.  Wubi is [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve heard about Ubuntu and you&#8217;ve been interested but when you found out that it (can) completely replace your current operating system you thought better of it.  After all, the last thing you want to happen when you try a piece of new software is for you to lose everything.</p>
<p>Enter Wubi.  Wubi is a small installer program (about 1MB) that will install Ubuntu on your Windows computer (Mac and Linux versions are coming) that will install the whole operating system into a &#8220;container file&#8221; on your existing Windows hard drive. What this means for you is that there&#8217;s virtually no risk installing Ubuntu as if you don&#8217;t like it or if you want to go back to how things were you simply remove the Wubi application through the Windows control panel.</p>
<p>How it works:</p>
<ol>
<li>Wubi asks you where you want to install Ubuntu and how much disk space you want to give it</li>
<li>Wubi then downloads an Ubuntu 10.04 ISO file</li>
<li>The ISO file is unpacked into the container file along with grub (the boot loader that comes with Ubuntu)</li>
<li>The Windows startup options are modified to include booting into Ubuntu as an option.</li>
<li>Your PC restarts and the installation completes.</li>
</ol>
<p>The performance of Ubuntu running in a container file is good &#8211; there will be overheads far greater than running native file systems like ext4 directly on the disk but as a no-risk introduction to Ubuntu for the Windows user, this is a great start.</p>
<p>As far as I know, the only thing that DOESN&#8217;T work in Ubuntu installed using this method is the hibernate support.  Attempting to hibernating your Ubuntu desktop environment simply results in the screen being locked requiring your password to continue (presumably the hibernation failed).</p>
<p>Check out this YouTube video of Shawn Powers from Linux Journal installing Wubi (4:24s).<br />
<object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/n5x9iJWXbUY?fs=1&amp;hl=en_US&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/n5x9iJWXbUY?fs=1&amp;hl=en_US&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object><br />
Happy Ubuntuing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2010/09/wubi-the-windows-ubuntu-installer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LCA2010 &#8211; a first timers overview</title>
		<link>http://www.guru.net.nz/blog/2010/01/lca2010-a-first-timers-overview.html</link>
		<comments>http://www.guru.net.nz/blog/2010/01/lca2010-a-first-timers-overview.html#comments</comments>
		<pubDate>Sat, 23 Jan 2010 12:11:58 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/blog/?p=316</guid>
		<description><![CDATA[Well, LCA2010 drew to a close here in Wellington yesterday with the final event being the Penguin Dinner just after Brisbane was announced as the next host city for LCA2011.  The preceding week has been a great chance for geeks to meet, hack, discuss, debate, fix, help, recruit, teach and share with other geeks.  A [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.guru.net.nz/blog/wp-content/uploads/2010/01/LCA2010-120x240v2.png"><img class="alignright size-full wp-image-320" title="LCA2010-120x240v2" src="http://www.guru.net.nz/blog/wp-content/uploads/2010/01/LCA2010-120x240v2.png" alt="" width="120" height="240" /></a>Well, LCA2010 drew to a close here in Wellington yesterday with the final event being the Penguin Dinner just after Brisbane was announced as the next host city for <a href="http://followtheflow.org/">LCA2011</a>.  The preceding week has been a great chance for geeks to meet, hack, discuss, debate, fix, help, recruit, teach and share with other geeks.  A wide range of geekery was represented, from Linux kernel hackers, to source control experts (notably representatives from the GitHub and Ubuntu Launchpad projects), to documentation lovers (yes, they exist, I saw some!) all the way down (or up?) to hardware hackers soldering together Arduino/Pebble kits and developing technology to win the Lunar X Prize (hello, Lunar Numbat).</p>
<p>For me, the highlights of this week have been:</p>
<ul>
<li>Seeing HTML5 support for the Video tag, and in particular seeing realtime video processing with Javascript (<a href="http://www.bluishcoder.co.nz/lca2010/de/play.xhtml">example here</a>)</li>
<li>An overview of Drupal 7 by <a href="http://www.webchick.net/">Webchick</a> including writing a sample &#8220;Pirate Module&#8221;</li>
<li>Various presentations by <a href="http://pjf.id.au/blog/">Paul Fenwick</a>, including a piece of social genius, a proposed Facebook application called &#8220;AntiSocial&#8221; (keep an eye on his blog for more info)</li>
<li>The <a href="http://wellington.pm.org/articles/hackoff2010/">LCA2010 Hackoff</a> organised by the Wellington Perlmongers group &#8211; our team did well, answering 3 out of the 6 questions (with the solution to #4 arriving minutes after the contest has closed)</li>
<li>The Pengiun dinner, where some* <a href="http://epicbeer.com/">Epic Beer</a> was consumed (Epic were a sponsor of LCA2010) and a whopping $33,000 dollars was raised for the <a href="http://www.lifeflight.org.nz/">Lifeflight Trust</a> at the charity auction (winning prize was a trip for four on the rescue helicopter with some good old fashioned winching on 8mm steel cable)</li>
<li>An overview by  Patrick Brennan from Albany Senior High School (a new school) where he spoke about the massive savings they made by choosing to go completely open-source for their new school.  It was a delight to see the passion that the entire board has for the philosophy of free software.</li>
<li>Following and contributing to the vibe of the conference in realtime with Twitter via the <a href="http://search.twitter.com/search?q=%23lca2010">lca2010 hashtag</a></li>
</ul>
<p>Everything worked very smoothly with the conference venue being more than adequate and with power and internet access never being an issue, although there were a few times where I had to charge my iPod from my laptop battery.  Each session was streamed live and the archived videos will be available at a later stage once they&#8217;ve been processed and made available online.</p>
<p>Also, being able to stay with Adam and Amy was a great advantage with their apartment being only about three blocks from the Wellington Convention Centre and right on Courtenay Place.</p>
<p>Finally, a heartfelt thanks to Andrew and Susanne for organising the conference, and to the hordes of crew, support people, volunteers, ghosts and incidentals who made the event such a pleasure to attend.</p>
<p>* Ok, way too much <img src='http://www.guru.net.nz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2010/01/lca2010-a-first-timers-overview.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FogBugz &#8220;Active Project&#8221; notification tool</title>
		<link>http://www.guru.net.nz/blog/2009/12/fogbugz-active-project-notification-tool.html</link>
		<comments>http://www.guru.net.nz/blog/2009/12/fogbugz-active-project-notification-tool.html#comments</comments>
		<pubDate>Wed, 09 Dec 2009 10:50:36 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[fogbugz]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/blog/?p=309</guid>
		<description><![CDATA[At Turboweb we&#8217;ve recently subscribed to a 5-user on-demand license for an awesome case tracking system called FogBugz.  For us it means that we have controlled workflow of cases (bugs, features, enquiries etc.) along with awesome estimation reporting and time tracking.  FogBugz was built with development teams in mind and it&#8217;s a very nice tool. [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.turboweb.co.nz">Turboweb</a> we&#8217;ve recently subscribed to a 5-user on-demand license for an awesome case tracking system called <a href="http://www.fogbugz.com">FogBugz</a>.  For us it means that we have controlled workflow of cases (bugs, features, enquiries etc.) along with awesome estimation reporting and time tracking.  FogBugz was built with development teams in mind and it&#8217;s a very nice tool.</p>
<p>Anyway, one of the things it has is a nice API which you can use to interrogate the product (read and write) and this got me thinking about how I could use the API to remind me what I should currently be working on.  Thus was created the &#8220;FogBugz Notification Tool&#8221;.</p>
<p>This script does the following:</p>
<ol>
<li>Connects to your FogBugz installation</li>
<li>Runs a query to see what things have been worked on today</li>
<li>If there are any items that don&#8217;t have an end date, then it&#8217;s the case that&#8217;s currently being worked on</li>
<li>Get the details of the case</li>
<li>Use notify-send to pop up a notification bubble showing case number, title, estimated time and time remaining.</li>
</ol>
<p style="padding-left: 30px;"><img class="alignnone size-full wp-image-310" title="FogBugz Active Case Notification" src="http://www.guru.net.nz/blog/wp-content/uploads/2009/12/fb-activecase.png" alt="FogBugz Active Case Notification" width="381" height="267" /></p>
<p>I have found this most effective if I put it in my crontab to run every 5 minutes.</p>
<p>Requirements:</p>
<ul>
<li>Ubuntu Linux (or any version of Linux that supports the &#8220;notify-send&#8221; command)</li>
<li>PHP5 CLI (simply because this script is written with PHP)</li>
<li>The &#8220;libnotify-bin&#8221; package (this provides the &#8220;notify-send&#8221; command, try &#8220;sudo apt-get install libnotify-bin&#8221;)</li>
</ul>
<p>The script requires a little configuration for your circumstances, but this is easily done by editing the defined constants in the script:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">// Adjust these defines to suit your installation</span>
	<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FBBASEURL'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'https://mywebsite.fogbugz.com/'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FBUSERNAME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my@email.address.com'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FBPASSWORD'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mypassword'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And to add it to your crontab, simply add this line (note the */5 means every time the current number of minutes in the hour is evenly divisible by 5)</p>
<pre>*/5 * * * * DISPLAY=:0.0 /usr/bin/php /home/bob/fogbugz-notify.php</pre>
<p>Of course, adjust the path appropriately.</p>
<ul>
<li><a href="http://www.guru.net.nz/blog/fogbugz-notify.tar.gz">Download the script here</a> (9.1kB)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2009/12/fogbugz-active-project-notification-tool.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubuntu and Lightning &#8211; not working, application seems buggy?</title>
		<link>http://www.guru.net.nz/blog/2009/01/ubuntu-and-lightning-not-working-application-seems-buggy.html</link>
		<comments>http://www.guru.net.nz/blog/2009/01/ubuntu-and-lightning-not-working-application-seems-buggy.html#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:09:32 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[lightning]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[thundebird]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/blog/?p=263</guid>
		<description><![CDATA[I&#8217;ve switched over to running Ubuntu 8.10 full time at work now.  The only things I miss are TortoiseSVN and the application integration with the desktop (Thunderbird/W32 for example lets you drag attachments onto the desktop).  Oh, and I miss TimeSnapper (classic &#8211; free download) too, but will get off my chuff and work out [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve switched over to running Ubuntu 8.10 full time at work now.  The only things I miss are TortoiseSVN and the application integration with the desktop (Thunderbird/W32 for example lets you drag attachments onto the desktop).  Oh, and I miss TimeSnapper (<a href="http://www.timesnapper.com/downloads/TimeSnapperClassicSetup.exe">classic &#8211; free download</a>) too, but will get off my chuff and work out an alternative using <a href="http://en.wikipedia.org/wiki/Xwd">Xwd</a>.</p>
<p>Anyway, at work we use the <a href="http://www.mozilla.org/projects/calendar/lightning/download.html">Lightning</a> calendar plugin for Thunderbird, with the <a href="https://addons.mozilla.org/en-US/thunderbird/addon/4631">Google Calendar provider</a> in order to collaborate on a calendar.  For the most part this works well as when not in the office you can fall back to <a href="http://calendar.google.com">Google Calendar</a>.</p>
<p>I went down the path of installing Lightning into Thunderbird (download the XPI, browse to it etc&#8230;) but after the installation Lightning seemed broken.  The UI was mostly there but it looked buggy and nothing worked.  After hunting around for a reason, I came across <a href="https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/278853">this thread</a> that suggested that the problem was that the libstdc++5 package had to be installed.</p>
<p>I was skeptical, but after reading half a dozen &#8220;me too&#8221; posts where the problem had been fixed I got stuck in.</p>
<ol>
<li>Uninstall the Lightning plugin from Thunderbird</li>
<li>Open a terminal, and run this command: <strong>sudo aptitude install libstdc++5</strong></li>
<li>Reinstall Lightning from the XPI you downloaded</li>
</ol>
<p>Then things came to life nicely.  I was disappointed that the state of Lightning without libstdc++5 appeared to be a buggy application rather than a specific error.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2009/01/ubuntu-and-lightning-not-working-application-seems-buggy.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Screen recording with Linux</title>
		<link>http://www.guru.net.nz/blog/2008/09/screen-recording-with-linux.html</link>
		<comments>http://www.guru.net.nz/blog/2008/09/screen-recording-with-linux.html#comments</comments>
		<pubDate>Wed, 03 Sep 2008 09:33:00 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/newblog/?p=185</guid>
		<description><![CDATA[Hello to my future self &#8211; I&#8217;ve anticipated that I will be back in the future to read this post because I&#8217;m sure I would have forgotten how to do this stuff. Firstly, a disclaimer &#8211; I am by no means an expert in this field, I just banged it &#8217;till it worked. If you [...]]]></description>
			<content:encoded><![CDATA[<p>Hello to my future self &#8211; I&#8217;ve anticipated that I will be back in the future to read this post because I&#8217;m sure I would have forgotten how to do this stuff.  Firstly, a disclaimer &#8211; I am by no means an expert in this field, I just banged it &#8217;till it worked.  If you are having trouble doing similar things then I encourage you to post comments where they can be seen and responded to by all.</p>
<p>Secondly, an explanation of what it is I&#8217;m doing here.  A while back I saw some screencasts re <a href="http://www.inkscape.org/">Inkscape</a> at <a href="http://screencasters.heathenx.org/">screencasters.heathenx.org</a>.  I was impressed &#8211; it was a great way to teach people how to use Inkscape.</p>
<p>I had a play around and managed to get to the point where I can now do the following:</p>
<ul>
<li>Record my screen, or any particular window</li>
<li>Use my Logitech USB headset to record the audio</li>
<li>Play the resulting movie back, sound through speakers or headset</li>
</ul>
<p>For some reason I seem to be having a ridiculously hard time determining where the audio output goes for my Linux apps.  In Windows, when I plug my headset in, it becomes the default audio device for all applications.  Currently running applications still use their normal sound output, until restarted.  If I dig deep enough I might even be able to find settings in each program that allows me to specify which sound device (headset or sound card) should get the output.</p>
<p>In Linux (Ubuntu 8.04, Gnome to be precise) I discovered under System &gt; Preferences &gt; Sound an application that allows me to adjust the sound preferences.  In the dropdown list for each playback type I have seven possible playback device options (Auto, USB Audio, Intel ICH5, Intel ICH5 &#8211; IEC958, ALSA, OSS &amp; PulseAudio).  It seems that if I set them all to USB Audio then I get lucky and most things play through the headphones.  Some things, especially the Adobe Flash Player plugin insists on playing through my desktop speakers regardless.  I saw someone complaining that this was Adobe&#8217;s fault, not Linux but I can&#8217;t comment.  In order to avoid all this confusion I found out how to specify the sound device that you want to use for each operation.  This is pretty much the crux of this post.</p>
<p>Anyway, here&#8217;s what I did &#8230;</p>
<h2>Recorded My Desktop</h2>
<p>There&#8217;s a package in the Ubuntu universe repository called recordmydesktop which as the name suggests can be used to record your desktop, with sound.  This is great for making recordings of how to do things to share with others.  I installed the recordmydesktop package, along with the GTK front end to save me having to look up the commands all the time..</p>
<pre>bob@sparkie:~$ sudo apt-get install recordmydesktop gtk-recordmydesktop</pre>
<p><a href="http://www.guru.net.nz/blog/uploaded_images/Screenshot-recordMyDesktop-715177.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://www.guru.net.nz/blog/uploaded_images/Screenshot-recordMyDesktop-715167.png" border="0" alt="" /></a>Once installed I then hit Alt-F2 (to bring up the Run  Application dialog) and typed in gtk-recordmydesktop.</p>
<p>It seemed that by default it was trying to record sound via the mic input on my sound card.  Fat chance it would have had because I don&#8217;t have a mic in my soundcard, instead I have a USB headset.</p>
<p>After Googling around I discovered that if I click the Advanced button in gtk-recordmydesktop I could then enter the sound device to use to capture audio.  I used the device name &#8220;plughw:Headset,0,0&#8243; and was able to record sound via my USB headset.</p>
<p>The key to this was finding out what to type in for the device name.  I discovered the aplay and arecord utilities that allow you to play and record sound.  Each utility has a -l switch which lists the available devices.  Here&#8217;s the output of my arecord -l:</p>
<pre>bob@sparkie:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: ICH5 [Intel ICH5], device 0: Intel ICH [Intel ICH5]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ICH5 [Intel ICH5], device 1: Intel ICH - MIC ADC [Intel ICH5 - MIC ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ICH5 [Intel ICH5], device 2: Intel ICH - MIC2 ADC [Intel ICH5 - MIC2 ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ICH5 [Intel ICH5], device 3: Intel ICH - ADC2 [Intel ICH5 - ADC2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0</pre>
<p>You can see beside each &#8220;card&#8221; there is a device name, either ICH5 (my sound card) or Headset.  Each of those cards has a number of subdevices &#8211; in the case of the sound card you can see there are four possible subdevices I could have chosen (numbered 0 to 3) and for the headset it&#8217;s a free ride because there&#8217;s only one to choose from (as I would have expected).</p>
<p>So, now that plughw:Headset,0,0 should make a bit more sense.  With that all set up, I hit record, wiggled my mouse around, spoke some gibberish and created a .ogg file of my session.</p>
<h2>Sound Recording and Playback</h2>
<p>While I was debugging my sound devices I fiddled around a bit with arecord and aplay.  Using the command <span style="font-size:85%;"><span style="font-family: courier new;">arecord -Dplughw:Headset,0,0 -f S16_LE -c2 -r44100 &gt; myfile.wav</span></span> I created a 44kHz wav file using the headset mic as my recording device.</p>
<p>When I played it back with aplay myfile.wav, it played through my desktop speakers.  To play it through my headset I just specified the device name as I did with the arecord command, thus  <span style="font-family: courier new;font-size:85%;">aplay -Dplughw:Headset,0 myfile.wav</span></p>
<p>If you want to use mplayer to play something back using a specific device for audio output, this command will do the trick for you:<span style="font-size:85%;"><span style="font-family: courier new;"> mplayer -ao alsa:device=hw=1.0 ep069.flv</span></span>.  Device 1.0 is card #1, device 0 &#8211; and that&#8217;s the headset.</p>
<p>If you need to adjust the volume, I found you can use the alsamixer.  To control each card you can specify which one with the -c switch.  In my case card 0 is the default and internal sound card, and card 1 is the USB Headset: <span style="font-size:85%;"><span style="font-family: courier new;">alsamixer -c 1</span></span></p>
<p>That&#8217;s all for now!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2008/09/screen-recording-with-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Installs &#8211; a game, and a tool&#8230;</title>
		<link>http://www.guru.net.nz/blog/2007/11/quick-installs-a-game-and-a-tool.html</link>
		<comments>http://www.guru.net.nz/blog/2007/11/quick-installs-a-game-and-a-tool.html#comments</comments>
		<pubDate>Sun, 18 Nov 2007 07:46:00 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ttdx]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/newblog/?p=161</guid>
		<description><![CDATA[A game &#8230; I&#8217;ve been a fan of Transport Tycoon for a very long time. I was elated when I discovered that an open source alternative to the original game was being developed. It fixes some of the usability things with the game. It does however require you to source the original data files from [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A game &#8230;</strong></p>
<p>I&#8217;ve been a fan of <a href="http://www.google.co.nz/search?hl=en&amp;q=transport+tycoon&amp;btnG=Search&amp;meta=">Transport Tycoon</a> for a very long time.  I was elated when I discovered that <a href="http://www.openttd.com/">an open source alternative</a> to the original game was being developed.  It fixes some of the usability things with the game.  It does however require you to source the original data files from the original game (openttd don&#8217;t distribute them because that&#8217;s piracy&#8230;).  These data files can be turned up with a bit of googling but if you&#8217;re lazy and don&#8217;t mind having it all downloaded and installed for you, just copy/paste this command into your xterm window (tested on Ubuntu 7.10 only)</p>
<p><code>wget -o /dev/null -O /dev/stdout http://www.guru.net.nz/blog/images/install_openttd.sh | bash</code></p>
<p><strong>WARNING</strong>: You must <em>NEVER, EVER</em> copy/paste commands into an xterm window without understanding what they do.  According to trustworthy me, the above command grabs a copy of my <a href="http://www.guru.net.nz/blog/images/install_openttd.sh">install_openttd.sh</a> and then runs it on your computer.  There is no guarantee that this command won&#8217;t totally f*ck your system so please exercise due care and caution.  I&#8217;ve tested it, it works on my PC&#8217;s, YMMV&#8230;</p>
<p>Oh, by the way it also downloads my BigNewZealand.scm scenario file so you can play TTD in New Zealand &#8216;out of the box&#8217;, just choose Play Scenario, BigNewZealand (<a href="http://www.guru.net.nz/blog/2006/12/openttd-scenario-new-zealand.html">see here for more on that front</a>).</p>
<p><strong>A tool &#8230;</strong></p>
<p>I saw some time ago on someone&#8217;s Ubuntu desktop a few Internet Explorer icons.  I was curious at the time but didn&#8217;t have a need for it.  Recently however it turned out that I did as a web application I use (you might know of it&#8230;) requires IE and IE on my Vista install is so rooted it&#8217;s not funny &#8211; never did work out of the box, lol.</p>
<p>Anyway, the project is called IEs4Linux (<a href="www.ies4linux.org">www.ies4linux.org</a>).  It&#8217;s basically an automated setup script that will install up to three different versions of Internet Explorer on your Linux machine.  This is great for if you work in a world where cross browser compatibility is important as you can flick between IE, Firefox, Opera, Konqueror etc.</p>
<p>The <a href="http://www.tatanka.com.br/ies4linux/page/Legal_notices">legal notices</a> say that you must have a Windows95 or above license to legally run Internet Explorer on your PC so <a href="http://search.ebay.com/search/search.dll?sofocus=bs&amp;sbrftog=1&amp;catref=C6&amp;from=R10&amp;_trksid=m37&amp;satitle=windows+98+license&amp;sacat=-1%26catref%3DC6&amp;sargn=-1%26saslc%3D2&amp;sadis=200&amp;fpos=ZIP%2FPostal&amp;sabfmts=1&amp;saobfmts=insif&amp;ftrt=1&amp;ftrv=1&amp;saprclo=&amp;saprchi=&amp;fsop=1%26fsoo%3D1">cover your ass first</a> if you need to.</p>
<p>The browser is the real deal, it is the actual Internet Explorer program directly from Microsoft.com (you can see the install script download it) and it is run in Wine.  You can also install plugins as per normal, see <a href="http://www.tatanka.com.br/ies4linux/page/Plugins">http://www.tatanka.com.br/ies4linux/page/Plugins</a> for some yummy details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2007/11/quick-installs-a-game-and-a-tool.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Convert ASX to MP3 (or WAV)</title>
		<link>http://www.guru.net.nz/blog/2007/08/convert-asx-to-mp3-or-wav.html</link>
		<comments>http://www.guru.net.nz/blog/2007/08/convert-asx-to-mp3-or-wav.html#comments</comments>
		<pubDate>Tue, 14 Aug 2007 11:51:00 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[asx]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[mplayer]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/newblog/?p=156</guid>
		<description><![CDATA[From an email tonight &#8230; Hey Geoff, Great success! I managed to easily convert your news.asx file to a MP3 (and a PCM file in between if that&#8217;s useful to you). First of all, I installed mplayer and ffmpeg (I didn&#8217;t have either):bob@stella:~$ sudo apt-get install ffmpeg mplayer Then, I converted the news.asx file to [...]]]></description>
			<content:encoded><![CDATA[<p>From an email tonight &#8230;</p>
<blockquote><p>Hey Geoff,</p>
<p>Great success!  I managed to easily convert your news.asx file to a MP3 (and a PCM file in between if that&#8217;s useful to you).</p>
<p>First of all, I installed mplayer and ffmpeg (I didn&#8217;t have either):<br />bob@stella:~$ sudo apt-get install ffmpeg mplayer</p>
<p>Then, I converted the news.asx file to a PCM file:<br />bob@stella:~$ mplayer -ao pcm news.asx</p>
<p>This created a file called audiodump.wav.  I then converted that to a MP3 using ffmpeg.<br />bob@stella:~$ ffmpeg -i audiodump.wav news.mp3</p>
<p>I was then left with a mp3 file which I could do what I pleased with.  Ironically I used mplayer to confirm that it&#8217;s content was playable &#8211; we&#8217;ve come full circle:<br />bob@stella:~$ mplayer news.mp3</p>
<p>Then, because I&#8217;m a tidy kiwi I cleaned up behind myself:<br />bob@stella:~$ rm audiodump.pcm</p>
<p>Let me know how you get on.</p>
<p>Cheers,</p>
<p>- Bob -</p>
<p>Geoff Barkman wrote:<br />> Hi Bob<br />> This is the asx file that I was talking to you about tonight at the dunlug meeting.<br />> I record using mimms, which is a media file grabber. It plays using mplayer if needed&#8230; but I haven&#8217;t found a way to convert it to an editable file that I can just grab a 5 minute clip out of the audio&#8230; I have to play it in real time and hit record when the news starts.<br />> I looked at recording less than a 11 minute clip&#8230; but the time seems to vary at the radio station and I end up loosing the start or finish of the news.<br />><br />> My shell script that I run using a crontab has this code in it.<br />><br />> #!/bin/bash<br />><br />> mimms -t 11 -c http://www.thesomethingorother.com/listenlive/news.asx /home/geoff/NEWS/news.asx &#038;<br />><br />> It gets saved as a file called news.asx.<br />> I looked at recording it using just an ordinairy old radio tuner&#8230; but it is only broadcast on AM radio in dunedin&#8230; the web stream option has higher quality audio on it.<br />><br />> Cheers<br />> Geoff Barkman</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2007/08/convert-asx-to-mp3-or-wav.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Smart Playlists in Firefly Media Server</title>
		<link>http://www.guru.net.nz/blog/2007/07/smart-playlists-in-firefly-media-server.html</link>
		<comments>http://www.guru.net.nz/blog/2007/07/smart-playlists-in-firefly-media-server.html#comments</comments>
		<pubDate>Tue, 03 Jul 2007 12:10:00 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[firefly]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[media]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/newblog/?p=152</guid>
		<description><![CDATA[It seems it&#8217;s hard to find the documentation for how you define smart playlists in Firefly Media Server (previously mt-daapd). I found them here.]]></description>
			<content:encoded><![CDATA[<p>It seems it&#8217;s hard to find the documentation for how you define smart playlists in Firefly Media Server (previously mt-daapd).  I found them <a href="http://wiki.sblug.org/Setup_iTunes_server_in_linux">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2007/07/smart-playlists-in-firefly-media-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

