<?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; ubuntu</title>
	<atom:link href="http://www.guru.net.nz/blog/category/ubuntu/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>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>
	</channel>
</rss>

