<?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>John&#039;s Blog &#187; Linux</title>
	<atom:link href="http://john.nachtimwald.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://john.nachtimwald.com</link>
	<description>My little blog</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:11:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Duplicity Backup Script</title>
		<link>http://john.nachtimwald.com/2010/08/07/duplicity-backup-script/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=duplicity-backup-script</link>
		<comments>http://john.nachtimwald.com/2010/08/07/duplicity-backup-script/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 20:59:16 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[duplicity]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://john.nachtimwald.com/?p=464</guid>
		<description><![CDATA[I&#8217;ve started using duplicity combined with Amazon&#8217;s S3 to backup this server. Duplicity is an amazing application that makes backups simple. Some of the features I like best about duplicity are: it encrypts the data, compresses it, splits it into manageable chunks, does incremental backups, and can backup to a variety of destinations. When you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started using <a href="http://duplicity.nongnu.org/">duplicity</a> combined with Amazon&#8217;s <a href="https://s3.amazonaws.com/">S3</a> to backup this server. Duplicity is an amazing application that makes backups simple.</p>
<p>Some of the features I like best about duplicity are: it encrypts the data, compresses it, splits it into manageable chunks, does incremental backups, and can backup to a variety of destinations. When you restore your data it takes care of applying the incremental backups to produce the final files. Also, duplicity can be used to restore previous versions of stored files.</p>
<p>Overall I&#8217;m very happy with using duplicity for pushing automatic backups to my S3 account. To make it easier to use and so that I can run it from a cron job I&#8217;ve written a simple bash script to handle calling duplicity with the correct options. The script also dumps my MySQL databases and pushes them separately to a different S3 bucket.</p>
<p>Following is a variant of the script I&#8217;m using on my server. This one is a bit more generic and allows for MySQL backups to be turned off as well as some basic dependency checking. It also allows for some simple option tuning. The version I use has most of the options hard coded in the appropriate place instead of putting them into variables. This script is mostly tested.</p>
<p>***Edit: minor changes to the script. It should have only been checking for MySQL commands when MySQL backup is enabled.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Duplicity Setup ###</span>
<span style="color: #007800;">PASSPHRASE</span>=<span style="color: #ff0000;">&quot;&lt;your passphrase&gt;&quot;</span>
<span style="color: #007800;">AWS_ACCESS_KEY_ID</span>=<span style="color: #ff0000;">&quot;&lt;your key id&gt;&quot;</span>
<span style="color: #007800;">AWS_SECRET_ACCESS_KEY</span>=<span style="color: #ff0000;">&quot;&lt;your secret key&gt;&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># This needs to be a newline separated list of files and directories to backup</span>
<span style="color: #007800;">INCLUDEFILES</span>=<span style="color: #ff0000;">&quot;/etc/duplicity/server-filelist.txt&quot;</span>
&nbsp;
<span style="color: #007800;">S3FILESYSLOCATION</span>=<span style="color: #ff0000;">&quot;s3+http://&lt;your file bucket&gt;&quot;</span>
<span style="color: #007800;">S3MYSQLLOCATION</span>=<span style="color: #ff0000;">&quot;s3+http://&lt;your mysql bucket&gt;&quot;</span>
<span style="color: #007800;">S3OPTIONS</span>=<span style="color: #ff0000;">&quot;--s3-use-new-style --s3-use-rrs&quot;</span>
&nbsp;
<span style="color: #007800;">EXTRADUPLICITYOPTIONS</span>=
&nbsp;
<span style="color: #007800;">FULLDAYS</span>=<span style="color: #ff0000;">&quot;30D&quot;</span>
<span style="color: #007800;">MAXFULL</span>=<span style="color: #000000;">3</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### MySQL Setup ###</span>
<span style="color: #007800;">MUSER</span>=<span style="color: #ff0000;">&quot;&lt;your mysql user&gt;&quot;</span>
<span style="color: #007800;">MPASS</span>=<span style="color: #ff0000;">&quot;&lt;mysql user's password&gt;&quot;</span>
<span style="color: #007800;">MHOST</span>=<span style="color: #ff0000;">&quot;localhost&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Disable MySQL ###</span>
<span style="color: #666666; font-style: italic;"># Change to 0 to disable</span>
<span style="color: #007800;">BACKUPMYSQL</span>=<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;">###### End Of Editable Parts ######</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Env Vars ###</span>
<span style="color: #007800;">PASSPHRASE_OLD</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(echo $PASSPHRASE)</span>&quot;</span>
<span style="color: #007800;">AWS_ACCESS_KEY_ID_OLD</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(echo $AWS_ACCESS_KEY_ID)</span>&quot;</span>
<span style="color: #007800;">AWS_SECRET_ACCESS_KEY_OLD</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(echo $AWS_SECRET_ACCESS_KEY)</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PASSPHRASE</span>=<span style="color: #007800;">$PASSPHRASE</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AWS_ACCESS_KEY_ID</span>=<span style="color: #007800;">$AWS_ACCESS_KEY_ID</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AWS_SECRET_ACCESS_KEY</span>=<span style="color: #007800;">$AWS_SECRET_ACCESS_KEY</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Commands ###</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</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: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #007800;">MYSQLTMPDIR</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(mktemp -d)</span>&quot;</span>
 <span style="color: #007800;">MYSQL</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(which mysql)</span>&quot;</span>
 <span style="color: #007800;">MYSQLDUMP</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(which mysqldump)</span>&quot;</span>
 <span style="color: #007800;">GZIP</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(which gzip)</span>&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #007800;">DUPLICITY</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(which duplicity)</span>&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</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: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MYSQLDUMP</span>&quot;</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$GZIP</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Not all MySQL commands found.&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">2</span>
 <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DUPLICITY</span>&quot;</span>  <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Duplicity not found.&quot;</span>
 <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Dump MySQL Databases ###</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</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: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #666666; font-style: italic;"># Get all databases name</span>
 <span style="color: #007800;">DBS</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$($MYSQL -u $MUSER -h $MHOST -p$MPASS -Bse 'show databases')</span>&quot;</span>
 <span style="color: #000000; font-weight: bold;">for</span> db <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$DBS</span>
 <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$db</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;information_schema&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
   <span style="color: #007800;">$MYSQLDUMP</span> <span style="color: #660033;">-u</span> <span style="color: #007800;">$MUSER</span> <span style="color: #660033;">-h</span> <span style="color: #007800;">$MHOST</span> -p<span style="color: #007800;">$MPASS</span> <span style="color: #007800;">$db</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #007800;">$GZIP</span> <span style="color: #660033;">-9</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$MYSQLTMPDIR</span><span style="color: #000000; font-weight: bold;">/</span>mysql-<span style="color: #007800;">$db</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
 <span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Backup files ###</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$S3FILESYSLOCATION</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #007800;">$DUPLICITY</span> <span style="color: #660033;">--full-if-older-than</span> <span style="color: #007800;">$FULLDAYS</span> <span style="color: #007800;">$S3OPTIONS</span> <span style="color: #007800;">$EXTRADUPLICITYOPTIONS</span> <span style="color: #660033;">--include-globbing-filelist</span> <span style="color: #007800;">$INCLUDEFILES</span> <span style="color: #660033;">--exclude</span> <span style="color: #ff0000;">'**'</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #007800;">$S3FILESYSLOCATION</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</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: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$S3MYSQLLOCATION</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #007800;">$DUPLICITY</span> <span style="color: #660033;">--full-if-older-than</span> <span style="color: #007800;">$FULLDAYS</span> <span style="color: #007800;">$S3OPTIONS</span> <span style="color: #007800;">$EXTRADUPLICITYOPTIONS</span> <span style="color: #660033;">--allow-source-mismatch</span> <span style="color: #007800;">$MYSQLTMPDIR</span> <span style="color: #007800;">$S3MYSQLLOCATION</span>
 <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Cleanup ###</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MAXFULL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MAXFULL</span>&quot;</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: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$S3FILESYSLOCATION</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #007800;">$DUPLICITY</span> remove-all-but-n-full <span style="color: #007800;">$MAXFULL</span> <span style="color: #007800;">$S3FILESYSLOCATION</span>
 <span style="color: #000000; font-weight: bold;">fi</span>
 <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</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: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$S3MYSQLLOCATION</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
   <span style="color: #007800;">$DUPLICITY</span> remove-all-but-n-full <span style="color: #007800;">$MAXFULL</span> <span style="color: #007800;">$S3MYSQLLOCATION</span>
  <span style="color: #000000; font-weight: bold;">fi</span>
 <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$BACKUPMYSQL</span>&quot;</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: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
 <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #007800;">$MYSQLTMPDIR</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PASSPHRASE</span>=<span style="color: #007800;">$PASSPHRASE_OLD</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AWS_ACCESS_KEY_ID</span>=<span style="color: #007800;">$AWS_ACCESS_KEY_ID_OLD</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AWS_SECRET_ACCESS_KEY</span>=<span style="color: #007800;">$AWS_SECRET_ACCESS_KEY_OLD</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://john.nachtimwald.com/2010/08/07/duplicity-backup-script/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Kernel 2.6.34, Xorg 1.8 and video-intel 2.12.0 Issues</title>
		<link>http://john.nachtimwald.com/2010/08/01/kernel-2-6-34-xorg-1-8-and-video-intel-2-12-0-issues/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=kernel-2-6-34-xorg-1-8-and-video-intel-2-12-0-issues</link>
		<comments>http://john.nachtimwald.com/2010/08/01/kernel-2-6-34-xorg-1-8-and-video-intel-2-12-0-issues/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 14:20:11 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://john.nachtimwald.com/?p=456</guid>
		<description><![CDATA[For quite a long time Intel has been the shining light of open source video drivers on Linux. Even though Intel integrated video doesn&#8217;t have the highest performance it was what you needed to have for full 3D support, and fancy splash screens when booting with (plymouth). By no means were the drivers ever perfect [...]]]></description>
			<content:encoded><![CDATA[<p>For quite a long time Intel has been the shining light of open source video drivers on Linux. Even though Intel integrated video doesn&#8217;t have the highest performance it was what you needed to have for full 3D support, and fancy splash screens when booting with (<a href="http://en.wikipedia.org/wiki/Plymouth_%28software%29">plymouth</a>). By no means were the drivers ever perfect but they actually worked for the majority of people. That is until Kernel 2.6.34, Xorg 1.8 and the 2.12.0 Intel driver were released. There are really two different sets of issues I&#8217;ve experienced. One relates to Kernel 2.6.34 and the other is with Xorg 1.8 and video-intel 2.12.0.</p>
<p>With Kernel 2.6.34 suspend stopped working properly. At first I thought that the ACPI suspend patches for my notebook that were added years(?) ago had been reverted. The symptoms were the same as before Linux was able to suspend properly with my notebook. Instead of suspending the system would lockup, the screen would be blank and the fan would run at its maximum speed. The suspend code for my notebook was still present in 2.6.34 so I was at a bit of a loss as to why suspend was suddenly broken.</p>
<p>I ended up finding the solution to the suspend problem while looking for a the solution to the Xorg 1.8 issues. <a href="http://bugs.archlinux.org/task/18298">This</a> bug report proposed setting i915.powersave=0 on the kernel line in grub&#8217;s menu.lst file. This worked for me and I can now suspend again. In the bug report not everyone is claiming success with this solution.</p>
<p>Xorg 1.8 and video-intel 2.12.0 are giving many people issues: screen not redrawing properly, GPU hangs and slow 3D performance. I have not experienced the GPU hangs but that could be because I haven&#8217;t had my computer running long enough with the 2.12.0 driver for it to happen.</p>
<p>Another ArchLinux <a href="http://bugs.archlinux.org/task/19302">bug</a> has the solution to the screen redraw issue. I followed Alyssa Hung (Deciare) instructions and applied <a href="http://bugs.freedesktop.org/attachment.cgi?id=35342">this</a> patch to Mesa 7.8.2. Installing the intel-dri package based on a patched Mesa made the screen redraw issues disappear completely.</p>
<p>I also found a possible fix for the GPU hang issue. Applying <a href="https://patchwork.kernel.org/patch/104542/">this</a> patch to the kernel is supposed to work. I have not tried it myself.</p>
<p>As for the slow 3D performance, I have not found a fix. Short of disabling compositing simple tasks like changing virtual desktops and cycling though open windows is noticeably slower with 2.12.0. On my laptop (2.0 GHz Core 2 Duo) it is so slow that the animation stutters. This is not caused by the new drivers fixing the 3D frame rate to the vsync refresh rate because the frame rate is much lower than the vsyc rate. Until a fix is found for this problem I&#8217;ve reverted to using Xort 1.7 and video-intel 2.10.0.</p>
]]></content:encoded>
			<wfw:commentRss>http://john.nachtimwald.com/2010/08/01/kernel-2-6-34-xorg-1-8-and-video-intel-2-12-0-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yubikey Auto Lock in Gnome</title>
		<link>http://john.nachtimwald.com/2010/07/25/yubikey-auto-lock-in-gnome/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yubikey-auto-lock-in-gnome</link>
		<comments>http://john.nachtimwald.com/2010/07/25/yubikey-auto-lock-in-gnome/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 22:05:29 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[screen saver]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[yubikey]]></category>

		<guid isPermaLink="false">http://john.nachtimwald.com/?p=433</guid>
		<description><![CDATA[I recently purchased a Yubikey from Yubico. What got me to buy it was the discount they&#8217;re offering to Security Now! listeners. So far I&#8217;m liking it quite a bit and have been looking to use it any way I can. One of the uses I found was to have the presence of they Yubikey [...]]]></description>
			<content:encoded><![CDATA[<p>I recently purchased a <a href="http://www.yubico.com/products/yubikey/">Yubikey</a> from <a href="http://www.yubico.com/">Yubico</a>. What got me to buy it was the discount they&#8217;re offering to <a href="http://twit.tv/sn">Security Now!</a> listeners. So far I&#8217;m liking it quite a bit and have been looking to use it any way I can. One of the uses I found was to have the presence of they Yubikey <a href="http://forum.yubico.com/viewtopic.php?f=11&#038;t=246">unlock and lock</a> Gnome Screen Saver.</p>
<p>Toward the end of the forum thread there is a very nice set of udev rules that work perfect for me and are very clean. I put the following into /etc/udev/rules.d/85-yubikey.rules</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;add&quot;</span>, ENV<span style="color: #7a0874; font-weight: bold;">&#123;</span>ID_VENDOR<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;Yubico&quot;</span>, RUN+=<span style="color: #ff0000;">&quot;/usr/local/bin/gnome-screensaver-unlock&quot;</span>
<span style="color: #007800;">ACTION</span>==<span style="color: #ff0000;">&quot;remove&quot;</span>, ENV<span style="color: #7a0874; font-weight: bold;">&#123;</span>ID_VENDOR<span style="color: #7a0874; font-weight: bold;">&#125;</span>==<span style="color: #ff0000;">&quot;Yubico&quot;</span>, RUN+=<span style="color: #ff0000;">&quot;/usr/local/bin/gnome-screensaver-lock&quot;</span></pre></div></div>

<p>I really dislike the scripts that are in the thread for locking and unlocking the computer. Gnome Screen Saver is a DBus enabled application so controlling it is very easy. Below are the unlock and lock scripts I&#8217;ve written. They use qdbus to send the dbus commands. This could be replaced with dbus-send but I use Qt and qdbus&#8217;s syntax is easier to work with.</p>
<p>gnome-screensaver-unlock</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">user</span>=<span style="color: #000000; font-weight: bold;">`</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> gnome-screensaver <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #007800;">$user</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #007800;">GNOME_SCREENSAVER_PROC</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ps</span> xa <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> gnome-screensaver <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-z</span> DBUS_SESSION_BUS_ADDRESS <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$GNOME_SCREENSAVER_PROC</span><span style="color: #000000; font-weight: bold;">/</span>environ<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
        <span style="color: #c20cb9; font-weight: bold;">su</span> <span style="color: #007800;">$user</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;qdbus org.gnome.ScreenSaver / SetActive false&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<p>gnome-screensaver-lock</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">user</span>=<span style="color: #000000; font-weight: bold;">`</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> gnome-screensaver <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-n</span> <span style="color: #007800;">$user</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #007800;">GNOME_SCREENSAVER_PROC</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ps</span> xa <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> gnome-screensaver <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $1}'</span><span style="color: #000000; font-weight: bold;">`</span>
	<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-z</span> DBUS_SESSION_BUS_ADDRESS <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$GNOME_SCREENSAVER_PROC</span><span style="color: #000000; font-weight: bold;">/</span>environ<span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
	<span style="color: #c20cb9; font-weight: bold;">su</span> <span style="color: #007800;">$user</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;qdbus org.gnome.ScreenSaver / SetActive true&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<p>One thing that isn&#8217;t mentioned in the forum thread that is very important, <b>this unlocking method is highly insecure</b>. The locking portion is fine but unlocking shouldn&#8217;t actually be done in this way. The above udev rules only checks that a Yubikey is inserted. It does not which which Yubikey is inserted. Any Yubikey can bypass your password and unlock the computer. The unlocking script does not preform any additional checks against the yubikey. Due to this, I don&#8217;t have the unlock code enabled on my computer.</p>
<p>However, it is possible to make unlocking secure. You can use one of the two yubikey pam modules, Yubico&#8217;s <a href="http://code.google.com/p/yubico-pam/">yubico-pam</a> and Securix Live&#8217;s <a href="http://www.securixlive.com/yubipam/index.php">yubipam</a>. Yubico-pam requires internet access because it validates against Yubico&#8217;s servers. Yubipam does not need internet access but you will have to reprogram your Yubikey with a new AES key. The new key must be stored in the computer. Each has it&#8217;s advantages and disadvantages but using the pam module with Gnome Screen Saver (I haven&#8217;t actually tried so it might not work) will provide you with a secure unlock.</p>
<p>Thinking about secure unlocks there is a <a href="http://forum.yubico.com/viewtopic.php?f=11&#038;t=210">clever solution</a> that allows for the Yubikey to be used with SSH without the need for the pam module. If I can find a way (I haven&#8217;t looked yet) to have an input that can capture the Yubikey&#8217;s output then it would be possible to handle the unlock in a secure manner without the need for the pam module&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://john.nachtimwald.com/2010/07/25/yubikey-auto-lock-in-gnome/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Repair Corrupt Cybook File System on Linux</title>
		<link>http://john.nachtimwald.com/2009/02/22/repair-corrupt-cybook-file-system-on-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=repair-corrupt-cybook-file-system-on-linux</link>
		<comments>http://john.nachtimwald.com/2009/02/22/repair-corrupt-cybook-file-system-on-linux/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 20:12:57 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cybook]]></category>

		<guid isPermaLink="false">http://john.nachtimwald.com/?p=84</guid>
		<description><![CDATA[I unplugged my Cybook from the computer without first unmounting the volume. It was still in the process of deleting a few files. When I turned it on the files showed in the library but were unable to be viewed. After I plugged the Cybook back into the computer the file system was mounted as [...]]]></description>
			<content:encoded><![CDATA[<p>I unplugged my Cybook from the computer without first unmounting the volume. It was still in the process of deleting a few files. When I turned it on the files showed in the library but were unable to be viewed. After I plugged the Cybook back into the computer the file system was mounted as read only and dmesg spit out a large number of IO errors.</p>
<p>The Cybook&#8217;s file system was damaged. Thankfully the Cybook uses Fat32. All that was needed to fix the errors was to run the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> fsck.vfat <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb <span style="color: #660033;">-artvVw</span></pre></div></div>

<p>/dev/sdb is the device id for the Cybook&#8217;s memory. If you are unsure of what it is, plug in the Cybook, wait for it to be detected and run dmesg in the console. At the end of the output there will be information about the device being connected and what device id the system has assigned to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://john.nachtimwald.com/2009/02/22/repair-corrupt-cybook-file-system-on-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

