<?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>tolaris.com</title>
	<atom:link href="http://www.tolaris.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tolaris.com</link>
	<description>When the going gets tough, the tough sniff packets.</description>
	<lastBuildDate>Thu, 17 May 2012 19:59:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>BackupPC on Ubuntu 12.04</title>
		<link>http://www.tolaris.com/2012/05/17/backuppc-on-ubuntu-12-04/</link>
		<comments>http://www.tolaris.com/2012/05/17/backuppc-on-ubuntu-12-04/#comments</comments>
		<pubDate>Thu, 17 May 2012 19:59:11 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[backuppc]]></category>
		<category><![CDATA[precise]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1734</guid>
		<description><![CDATA[I recently upgraded my home server from Ubuntu 10.10 maverick to 12.04 precise. I ran &#8220;do-release-upgrade&#8221; three times, upgrading through natty and oneiric. The process was very smooth, but I found a few bugs with BackupPC. If you are using BackupPC 3.2.1 on precise, or plan to upgrade soon, I suggest you read the following. [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded my home server from Ubuntu 10.10 maverick to 12.04 precise. I ran &#8220;do-release-upgrade&#8221; three times, upgrading through natty and oneiric. The process was very smooth, but I found a few bugs with BackupPC. If you are using BackupPC  3.2.1 on precise, or plan to upgrade soon, I suggest you read the following.</p>
<p><span id="more-1734"></span><strong>1. $Conf{Ping6Path} is not set</strong></p>
<p><a href="https://bugs.launchpad.net/ubuntu/+source/backuppc/+bug/782890">This</a> was a surprise to me, as I use IPv4 for running backups. Since natty, not setting $Conf{Ping6Path} causes BackupPC to report &#8220;no ping response&#8221; for most hosts. Strangely, this error is irregular. Pings to some hosts always succeed, while others only succeed <em>sometimes</em>. No hosts consistently failed.</p>
<p>The solution is easy. Set this in /etc/backuppc/config:</p>
<p>$Conf{Ping6Path} = &#8216;/bin/ping6&#8242;;</p>
<p><strong>2. Use of qw(&#8230;) as parentheses is deprecated</strong></p>
<p><a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=650522">Since Perl 5.14</a> in Ubuntu 11.10 oneiric, BackupPC reports these errors at startup, in logs, and during command-line operations:</p>
<pre>Use of qw(...) as parentheses is deprecated at /usr/share/backuppc/lib/BackupPC/Storage/Text.pm line 302.
Use of qw(...) as parentheses is deprecated at /usr/share/backuppc/lib/BackupPC/Lib.pm line 1425.</pre>
<p>To resolve this, download <a href='http://www.tolaris.com/blog/wp-content/uploads/2012/05/BackupPC-3.2.1-CVE-2011-170886.diff'>this patch</a>, and apply it:</p>
<pre>cd /usr/share/backuppc/
patch -p0 < /tmp/BackupPC-3.2.1-CVE-2011-170886.diff</pre>
<p><strong>3. BackupPC displays bogus "Last email sent" messages</strong></p>
<p>BackupPC will send error message emails to the administrator or user of a host (backup target) if it cannot reach the host for a set period of time. The user interface always displays this last message, even if it doesn't exist:</p>
<blockquote><p>Last email sent to user@example.com was at 2012-05-01 01:23, subject "".</p></blockquote>
<p>Last year <a href="http://adsm.org/lists/html/BackupPC-users/2011-03/msg00074.html">I wrote a patch </a> to resolve this. If no email has ever been sent (last email subject is undefined), it simply doesn't output the "Last email sent" line. My patch has never made it upstream, so I patch it manually after upgrades.</p>
<p>To resolve this, download <a href='http://www.tolaris.com/blog/wp-content/uploads/2012/05/BackupPC_noemail_HostInfo.pm_.patch'>this patch</a>, and apply it:</p>
<pre>patch /usr/share/backuppc/lib/BackupPC/CGI/HostInfo.pm < /tmp/BackupPC_noemail_HostInfo.pm_.patch</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2012/05/17/backuppc-on-ubuntu-12-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using host networking and NAT with VirtualBox, v2.0</title>
		<link>http://www.tolaris.com/2012/05/16/using-host-networking-and-nat-with-virtualbox-v2-0/</link>
		<comments>http://www.tolaris.com/2012/05/16/using-host-networking-and-nat-with-virtualbox-v2-0/#comments</comments>
		<pubDate>Wed, 16 May 2012 21:20:16 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[precise]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1722</guid>
		<description><![CDATA[Time marches on, and so do all those little changes in Linux distribution releases. Most of my really popular blog posts are how-to guides on complicated-but-useful procedures for the technical Linux user. Those users are the same ones who may read the date in the URL and say &#8220;Ewww, this was written three years ago, [...]]]></description>
			<content:encoded><![CDATA[<p>Time marches on, and so do all those little changes in Linux distribution releases. Most of my really popular blog posts are how-to guides on complicated-but-useful procedures for the technical Linux user. Those users are the same ones who may read the date in the URL and say &#8220;Ewww, this was written three years ago, it must be totally outdated now!&#8221; I&#8217;ve decided to update the most popular posts to bring them up to date. This post is &#8220;<a href="/2009/03/05/using-host-networking-and-nat-with-virtualbox/">Using host networking and NAT with VirtualBox</a>&#8220;, version 2.0.</p>
<p><span id="more-1722"></span>Version 1.0 of this guide had a good run. Very little changed between VirtualBox 2.0 and VirtualBox 4.0, or between Ubuntu 8.04 and Ubuntu 11.10, which made it obsolete. However, new screenshots are nice, and changes in Ubuntu 12.04 necessitates a change in dnsmasq.</p>
<p>This updated guide assumes you are using VirtualBox 4.1.14 from a Linux host running Ubuntu 12.04 &#8220;Precise Pangolin&#8221;.  Similar commands can be used on any Debian or Ubuntu release since 2008.  You&#8217;ll have to adapt some things to use it on RPM- or source-based Linux distributions.  Assume all commands are run as root (directly or with sudo).</p>
<p>This guide enables IPv4 networking between VMs and the host OS. IPv6 networking is similar, but dnsmasq does not support DHCP on IPv6. If I write a guide to IPv6 auto-configuration and router advertisements, I will integrate it with these instructions.</p>
<p><strong>Step 1: Create a bridge interface</strong></p>
<p>First, we must create a bridge interface for the VMs. VirtualBox creates a &#8220;vboxnet0&#8243; interface by default, but this is not a bridge. Install the bridge utilities:</p>
<p><code>apt-get install bridge-utils</code></p>
<p>Now make the bridge start on boot.  Add the following to /etc/network/interfaces:</p>
<pre># VirtualBox NAT bridge
auto vnet0
iface vnet0 inet static
        address 172.16.0.1
        netmask 255.255.255.0
        bridge_ports none
        bridge_maxwait 0
        bridge_fd 1
        up iptables -t nat -I POSTROUTING -s 172.16.0.0/24 -j MASQUERADE
        down iptables -t nat -D POSTROUTING -s 172.16.0.0/24 -j MASQUERADE</pre>
<p>Either reboot or start it manually:<br />
<code>ifup vnet0</code></p>
<p>We now have a bridge interface to which VirtualBox can attach virtual machines.  That traffic will be NATed to your host&#8217;s IP address when the guest OS accesses the Internet.  However, the traffic won&#8217;t yet route.</p>
<p>Note: if you are already using a firewall such as iptables, shorewall, or ufw, you should remove the two iptables lines above and add equivalent commands to your firewall configuration.  Otherwise NAT will probably not function.</p>
<p><strong>Step 2: Enable IP forwarding</strong></p>
<p>Now you must tell the kernel to route traffic.  Find the &#8216;net.ipv4.ip_forward&#8217; line in /etc/sysctl.conf, and uncomment it:</p>
<pre># Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1</pre>
<p>And load it:<br />
<code>sysctl -p</code></p>
<p><strong>Step 3: Setup DHCP and DNS for clients</strong></p>
<p>OK, now you can forward and NAT traffic from client VMs.  But you still have to configure static IPs in each guest&#8217;s OS.  Here is where DNSMasq shines.  It provides an all-in-one DHCP/DNS server in a small footprint.  Install it:<br />
<code>apt-get install dnsmasq</code></p>
<p>And edit /etc/dnsmasq.conf to include:</p>
<pre>interface=vnet0
domain-needed
dhcp-range=172.16.0.2,172.16.0.254,1h</pre>
<p>As of Ubuntu 12.04, <a href="http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/">network manager runs a local dnsmasq resolver</a> on localhost. This will conflict with our dnsmasq, which (despite an interface argument) also tries to run on localhost. Therefore we need to add:</p>
<pre>bind-interfaces
except-interface=lo</pre>
<p>It is safe to use these options on older releases or if you have disabled the network manager dnsmasq instance.</p>
<p>That&#8217;s all you need, but you may want to explicitly define DNS servers and domains for the guests, or set static assignments.  Examples:</p>
<pre>dhcp-option=option:dns-server,172.16.0.1,8.8.8.8,8.8.4.4
dhcp-option=option:domain-name,example.com
dhcp-host=08:00:27:00:00:02,windows,172.16.0.2
dhcp-host=08:00:27:00:00:03,lucid,172.16.0.3</pre>
<p>This defines the host OS and the OpenDNS servers as the DNS servers (instead of passing on whatever your host OS uses), tells all guests they are part of the domain example.com, and defines two static assignments by MAC address.</p>
<p>My final dnsmasq.conf looks like this:</p>
<pre>interface=vnet0
bind-interfaces
except-interface=lo
domain-needed
dhcp-range=172.16.0.2,172.16.0.254,1h
dhcp-option=option:dns-server,172.16.0.1,8.8.8.8,8.8.4.4
dhcp-option=option:domain-name,example.com
dhcp-host=08:00:27:00:00:02,windows,172.16.0.2
dhcp-host=08:00:27:00:00:03,lucid,172.16.0.3</pre>
<p><strong>Step 4: Set up the virtual machine</strong></p>
<ol>
<li>Start VirtualBox Manager, highlight a VM, and select &#8220;Settings&#8221; from the toolbar or right-click menu.</li>
<li>Choose &#8220;Network&#8221; on the left.</li>
<li>Choose an adaptor, and check &#8220;Enable Network Adaptor&#8221;.</li>
<li>For &#8220;Attached to:&#8221;, select &#8220;Bridged Adaptor&#8221;.</li>
<li>For &#8220;Name:&#8221;, select the bridge you created in step 1, vnet0.</li>
<li>If you assigned a static DHCP assignment above, expand the advanced settings and set the same MAC address.</li>
</ol>
<p>Example:<br />
<a href="http://www.tolaris.com/blog/wp-content/uploads/2012/05/vm-network-settings-v2.0.png"><img src="http://www.tolaris.com/blog/wp-content/uploads/2012/05/vm-network-settings-v2.0.png" alt="" title="vm-network-settings-v2.0" width="666" height="569" class="alignnone size-full wp-image-1726" /></a></p>
<p>Your virtual machines will now automatically receive an IP address in the 172.16.0.0/24 network, will resolve DNS, will NAT to your host&#8217;s external IP address, and can directly address each other.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2012/05/16/using-host-networking-and-nat-with-virtualbox-v2-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Added to precise repository: handbrake, mysql-query-browser</title>
		<link>http://www.tolaris.com/2012/05/16/added-to-precise-repository-handbrake-mysql-query-browser/</link>
		<comments>http://www.tolaris.com/2012/05/16/added-to-precise-repository-handbrake-mysql-query-browser/#comments</comments>
		<pubDate>Wed, 16 May 2012 20:26:47 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[precise]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1712</guid>
		<description><![CDATA[I&#8217;ve just upgraded to Ubuntu 12.04 LTS &#8220;Precise Pangolin&#8221; on a number of devices. It&#8217;s been smooth so far, and I&#8217;ll write up the issues I&#8217;ve found soon. In the mean time, I&#8217;ve added a few packages to the precise repository. handbrake-gtk and handbrake-cli, taken directly from the official PPA. The oneiric package runs in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just upgraded to <a href="http://www.ubuntu.com/ubuntu">Ubuntu 12.04 LTS</a> &#8220;Precise Pangolin&#8221; on a number of devices. It&#8217;s been smooth so far, and I&#8217;ll write up the issues I&#8217;ve found soon. In the mean time, I&#8217;ve added a few packages to the <a href="http://www.tolaris.com/apt-repository/">precise repository</a>.</p>
<p><span id="more-1712"></span>
<ol>
<li>handbrake-gtk and handbrake-cli, taken directly from the <a href="https://launchpad.net/~stebbins/+archive/handbrake-releases">official PPA</a>. The oneiric package runs in precise so I haven&#8217;t rebuilt it.</li>
<li>mysql-query-browser, mysql-admin, and their dependencies, taken directly from oneiric. These have been <a href="http://ubuntuforums.org/showthread.php?t=1935611">replaced by MySQL Workbench</a> and dropped from precise. However, Workbench doesn&#8217;t support MySQL 4, so if you are still forced to work with that ancient release, you still need mysql-query-browser.</li>
<li>loco, from the lucid repo. I like to colourise logs whilst debugging.</li>
<li>system-profile, a bash script with cron job that I wrote to take a summary of all installed hardware and running settings which aren&#8217;t easily found in the filesystem. Sure, you can run &#8220;cat /proc/cpuinfo&#8221; while the server is running, but what about when it&#8217;s dead? system-profile gives you the same information, provided you made a backup of the filesystem. <a href="/tag/backuppc/">You do have backups</a>, right?</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2012/05/16/added-to-precise-repository-handbrake-mysql-query-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New packages added to repository</title>
		<link>http://www.tolaris.com/2012/03/27/new-packages-added-to-repository/</link>
		<comments>http://www.tolaris.com/2012/03/27/new-packages-added-to-repository/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 21:38:55 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1694</guid>
		<description><![CDATA[I&#8217;ve added several packages to the repository recently. I still use maverick, the last release before Unity became the default. I intend to move to Unity with precise, but until then I&#8217;ve been backporting things to maverick. Highlights: maverick: fceux 2.1.5, backported from precise maverick: get-iplayer 2.8.0, taken directly from precise lucid: logcheck 1.3.14, backported [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added several packages to the <a href="http://www.tolaris.com/apt-repository/" title="APT Repository">repository</a> recently. I still use maverick, the last release before Unity became the default. I intend to move to Unity with precise, but until then I&#8217;ve been backporting things to maverick.</p>
<p>Highlights:</p>
<ol>
<li>maverick: fceux 2.1.5, backported from precise</li>
<li>maverick: get-iplayer 2.8.0, taken directly from precise</li>
<li>lucid: logcheck 1.3.14, backported from precise to correct a problem with wildcard globs in the lucid release</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2012/03/27/new-packages-added-to-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XBMC keymap for Logitech diNovo Mini updated for Eden</title>
		<link>http://www.tolaris.com/2012/03/26/xbmc-keymap-for-logitech-dinovo-mini-updated-for-eden/</link>
		<comments>http://www.tolaris.com/2012/03/26/xbmc-keymap-for-logitech-dinovo-mini-updated-for-eden/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 23:12:04 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[htpc]]></category>
		<category><![CDATA[xbmc]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1683</guid>
		<description><![CDATA[XBMC 11.0 &#8220;Eden&#8221; has just been released. So far, it&#8217;s sexy. So sexy. After the upgrade, one key on my Logitech diNovo Mini keyboard stopped working. Previously, I had configured the &#8220;Media&#8221; key in the lower right corner to switch between full screen and windowed mode, so I could access the normal Ubuntu desktop. However, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xbmc.org/">XBMC</a> 11.0 &#8220;Eden&#8221; has just been released. So far, it&#8217;s sexy. So sexy.</p>
<p>After the upgrade, one key on my Logitech diNovo Mini keyboard stopped working. <a href="http://www.tolaris.com/2011/01/13/using-the-logitech-dinovo-mini-with-xbmc-and-ubuntu/" title="Using the Logitech diNovo Mini with XBMC and Ubuntu">Previously</a>, I had configured the &#8220;Media&#8221; key in the lower right corner to switch between full screen and windowed mode, so I could access the normal Ubuntu desktop. However, this now launches the Music Library. They keymap for this key changed from &lt;launch_media_center&gt; in Dharma to &lt;launch_media_select&gt; Eden.</p>
<p><a href='http://www.tolaris.com/blog/wp-content/uploads/2012/03/keyboard.xml_.zip'>This file</a> corrects it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2012/03/26/xbmc-keymap-for-logitech-dinovo-mini-updated-for-eden/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My OPDS library</title>
		<link>http://www.tolaris.com/2012/02/13/my-opds-library/</link>
		<comments>http://www.tolaris.com/2012/02/13/my-opds-library/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 21:12:35 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ebooks]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1623</guid>
		<description><![CDATA[I have a personal server (tolaris.com), a large collection of eBooks, and several Android devices. I like to read books on the go, without the hassle of actually carrying dead trees. But I don&#8217;t want to manage local copies of ebooks on my phone or tablet. What I really want is a personal library, accessible [...]]]></description>
			<content:encoded><![CDATA[<p>I have a personal server (<a href="http://www.tolaris.com/">tolaris.com</a>), a large collection of eBooks, and several Android devices. I like to read books on the go, without the hassle of actually carrying <em>dead trees</em>. But I don&#8217;t want to manage local copies of ebooks on my phone or tablet. What I really want is a personal library, accessible anywhere, from which I can download my books at any time. And now I have that.</p>
<p><span id="more-1623"></span>What you&#8217;ll need:</p>
<ul>
<li><a href="http://calibre-ebook.com/">Calibre</a>, to manage your eBook library. Calibre is awesome. It supports all the formats you are likely to care about and can convert between them, and stores and manages your books in a way you can easily access with a file browser.</li>
<li><a href="http://calibre2opds.com/">Calibre2opds</a>, which generates <a href="http://wiki.mobileread.com/wiki/OPDS">OPDS</a> and HTML catalogs from the metadata of Calibre. OPDS is an interchangeable format for describing and sharing books &#8211; such as in a personal library.</li>
<li>A personal server with an HTTP server, such as <a href="http://httpd.apache.org/">Apache</a>. You can use a real server or a virtual machine as long as it has a public IP address you can access. Or you could use your desktop PC, accessible only within your private LAN when you&#8217;re at home. If you don&#8217;t want to run your own server, you could even <a href="http://dearauthor.com/ebooks/create-your-own-cloud-of-ebooks-with-calibre-calibre-opds-dropbox">use Dropbox</a>.</li>
<li>eBook software with OPDS support, such as <a href="http://www.fbreader.org/">FBReader</a>. I read primarily on my Android devices, a Nook Color and an HTC Desire HD, both running community-built ROMs. You can get FBReader on the <a href="https://market.android.com/details?id=org.geometerplus.zlibrary.ui.android&#038;hl=en">Market</a>.</li>
</ul>
<p>How to do it:</p>
<p><strong>Install Calibre</strong></p>
<p>Calibre is easy to install (<code>apt-get install calibre</code> on Ubuntu), and easy to use. I won&#8217;t cover it here. Install it, add some eBooks to your library, and close the application.</p>
<p><strong>Install and configure Calibre2opds</strong><a href="http://www.tolaris.com/blog/wp-content/uploads/2012/02/calibre2opds_2.4_beta_4_rungui.png"><img src="http://www.tolaris.com/blog/wp-content/uploads/2012/02/calibre2opds_2.4_beta_4_rungui.png" alt="" title="calibre2opds_2.4_beta_4_rungui" width="794" height="708" class="alignright size-full wp-image-1640" /></a></p>
<p>Calibre2opds supports both a GUI mode, which I use only to configure it, and a command-line mode, which is handy for updating your library from a script. Unfortunately, the CLI mode has been <a href="http://calibre2opds.myjetbrains.com/youtrack/issue/c2o-69">broken since 2.4-beta4</a>, and isn&#8217;t expected to be fixed until the next major release. So I continue to use that release. The developers no longer provide 2.4-beta4, so <a href="http://www.tolaris.com/blog/wp-content/uploads/2012/02/calibre2opds-2.4-beta4.zip">download it here</a>.</p>
<p>Unpack the zip file somewhere, and open a terminal. Run it for the first time:</p>
<pre>sh ./rungui.sh</pre>
<p>Configure the following settings on the &#8220;Main options&#8221; tab:</p>
<ol>
<li>Set &#8220;Database folder&#8221; to the root of your Calibre library directory.</li>
<li>Leave &#8220;Destination folder&#8221; blank.</li>
<li>Uncheck &#8220;Copy Catalog to database folder&#8221;.</li>
</ol>
<p>Now press &#8220;Save&#8221;, then &#8220;Generate catalogs&#8221;. This can take several minutes to complete if you have a large library.</p>
<p>If you have run Calibre2opds once and saved your settings, you can run it without the GUI using:</p>
<pre>sh ./run.sh</pre>
<p><strong>Upload to the server</strong></p>
<p>Now upload your library and catalog to your server. If you run your own server you probably know how to do this. If not, see the Dropbox method above.</p>
<p>I use a simple script with <code>rsync</code> to upload ~/Library to a private area of my web server. Here is a very simple script that you can run after you add new books to Calibre.</p>
<pre>#!/bin/sh

# if Calibre metadata is newer than the OPDS index, update the catalog
if [ "$HOME/Library/metadata.db" -nt "$HOME/Library/index.xml" ] ; then
   cd ~/calibre2opds/
   sh ./run.sh
else
   echo "Calibre has not been run since last update, skipping calibre2opds."
fi      

rsync -av --delete $HOME/Library/ webuser@example.com:~/public_html/my_personal_library/</pre>
<p>Once this is done, you will have a HTML catalog you can browse:</p>
<p><a href="http://www.tolaris.com/blog/wp-content/uploads/2012/02/html_catalog_2.png"><img src="http://www.tolaris.com/blog/wp-content/uploads/2012/02/html_catalog_2.png" alt="" title="html_catalog_2" width="615" height="467" class="alignnone size-full wp-image-1646" /></a></p>
<p><strong>Install and configure FBReader</strong></p>
<ol>
<li>Install FBReader from <a href="https://market.android.com/details?id=org.geometerplus.zlibrary.ui.android&#038;hl=en">Android Market</a> and open it.</li>
<li>Press the Menu key, then select &#8220;Network library</li>
<li>Press the Menu key, then select &#8220;Add catalog&#8221;</li>
<li>Select &#8220;Enter URL manually&#8221;</li>
<li>Enter the URL to your library, appended with &#8220;_catalog/index.xml&#8221;. For example, &#8220;http://www.example.com/my_personal_library/_catalog/index.xml&#8221;.</li>
<li>Press OK twice. Your catalog will now appear in the list.</li>
</ol>
<p>You can now browse your catalog within FBReader, select any book, and download it, and read it without navigating out again.</p>
<p><a href="http://www.tolaris.com/blog/wp-content/uploads/2012/02/fbreader4.png"><img src="http://www.tolaris.com/blog/wp-content/uploads/2012/02/fbreader2.png" alt="" title="fbreader2" width="240" height="400" class="alignleft size-full wp-image-1644" /></a><a href="http://www.tolaris.com/blog/wp-content/uploads/2012/02/fbreader4.png"><img src="http://www.tolaris.com/blog/wp-content/uploads/2012/02/fbreader3.png" alt="" title="fbreader3" width="240" height="400" class="alignleft size-full wp-image-1644" /></a><a href="http://www.tolaris.com/blog/wp-content/uploads/2012/02/fbreader4.png"><img src="http://www.tolaris.com/blog/wp-content/uploads/2012/02/fbreader4.png" alt="" title="fbreader4" width="240" height="400" class="alignnone size-full wp-image-1644" /></a></p>
<p>If you are an iPhone user, consider <a href="http://www.megareader.net/">MegaReader</a>, available free in the App Store. Configuration is similar.</p>
<p><strong>Updating the library</strong></p>
<p>Once you have all this set up, updating your library is easy. Just add the book in Calibre, run calibre2opds, and sync the files to your server. It&#8217;ll be available in FBReader as soon as your access the network library.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2012/02/13/my-opds-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Troubleshooting</title>
		<link>http://www.tolaris.com/2012/01/19/on-troubleshooting/</link>
		<comments>http://www.tolaris.com/2012/01/19/on-troubleshooting/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 21:23:56 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1613</guid>
		<description><![CDATA[My colleague TT Mooney has some very important words about troubleshooting. Please take the time to read them. Especially if you work with us.]]></description>
			<content:encoded><![CDATA[<p>My colleague TT Mooney has some very important words about <a href="http://ttmooney.com/?p=51">troubleshooting</a>. Please take the time to read them. <em>Especially</em> if you work with us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2012/01/19/on-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Market: &#8220;Error while retrieving information from server.&#8221;</title>
		<link>http://www.tolaris.com/2011/12/18/android-market-error-while-retrieving-information-from-server/</link>
		<comments>http://www.tolaris.com/2011/12/18/android-market-error-while-retrieving-information-from-server/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 00:00:51 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1575</guid>
		<description><![CDATA[Recently Google offered a sale on 10 Android apps each day for 10p (or 10&#162;). During the sale I bought a number of apps, because 10p is practically indistinguishable from &#8220;free&#8221;. Unfortunately, my bank believed this large number of sub-one-pound purchases to be fraudulent. Normally they&#8217;d be right; that&#8217;s exactly the kind of thing criminal [...]]]></description>
			<content:encoded><![CDATA[<p>Recently Google offered a sale on 10 Android apps each day for 10p (or 10&cent;). During the sale I bought a number of apps, because 10p is practically indistinguishable from &#8220;free&#8221;. Unfortunately, my bank believed this large number of sub-one-pound purchases to be fraudulent. Normally they&#8217;d be right; that&#8217;s exactly the kind of thing criminal organisations do when testing credit cards. But in my case, it was just a case of &#8220;SALE! SALE! SALE!&#8221; madness.</p>
<p>I cleared it with the bank, but after that I could no longer buy applications through the Android Market application. When I attempted to do so, the Market required me to check &#8220;I agree to the Payments for Android<br />
Market Terms and Conditions&#8221;, then failed with the message &#8220;Error while retrieving information from server.&#8221;</p>
<p><span id="more-1575"></span>If you don&#8217;t care to read the grimy details, perhaps you should skip to <a href="#solution">the solution</a>.</p>
<p>I reported the issue to Android Market technical support, who replied to me the following day requesting steps to reproduce. I gave them a full bug report:</p>
<ol>
<li>Open Market.</li>
<li>Navigate to any app. Press the amount button, such as &#8220;£0.10&#8243;, button on the upper right.</li>
<li>The confirmation page loads, listing my credit card, gmail account, and total. &#8220;Accept &#038; Buy&#8221; is grey, and the statement &#8220;I agree to the Payments for Android Market Terms and Conditions&#8221; is displayed, unchecked.<br />
<a href="/blog/wp-content/uploads/2011/12/android_market_purchase_1.png"><img src="/blog/wp-content/uploads/2011/12/android_market_purchase_1.png" alt="" title="Android Market purchase error, step 1" width="240" height="400" class="alignnone size-full wp-image-1581" /></a></li>
<li>Check next to &#8220;I agree &#8230;&#8221;. &#8220;Accept &#038; Buy&#8221; becomes blue.<br />
<a href="/blog/wp-content/uploads/2011/12/android_market_purchase_2.png"><img src="/blog/wp-content/uploads/2011/12/android_market_purchase_2.png" alt="" title="Android Market purchase error, step 2" width="240" height="400" class="alignnone size-full wp-image-1582" /></a></li>
<li>Press &#8220;Accept &#038; Buy&#8221;.</li>
<li>The error message &#8220;Error while retrieving information from server&#8221; appears.<br />
<a href="/blog/wp-content/uploads/2011/12/android_market_purchase_3.png"><img src="/blog/wp-content/uploads/2011/12/android_market_purchase_3.png" alt="" title="Android Market purchase error, step 3" width="240" height="400" class="alignnone size-full wp-image-1583" /></a></li>
</ol>
<p>What immediately stood out is that I had never previously seen &#8220;I agree to the Payments for Android Market Terms and Conditions&#8221; appear during a purchase. The Market normally prompts you to accept this the first time you run it after factory reset. My wife&#8217;s phone did not have this message.</p>
<p>Also of interest, I <em>could</em> purchase Android apps through the <a href="https://market.android.com/">Android Market website</a>, and send them to the device (or install them via the Market). The problem was only with purchases made via the Market app.</p>
<p>I provided all these details, including the fraud problem to Android Market technical support. Unfortunately, I also identified my devices as running community-build Android ROMs. My HTC Desire HD phone runs <a href="http://miuiandroid.com/">MIUI</a>, and my Nook Color tablet runs <a href="http://www.cyanogenmod.com/">CyanogenMod</a>. That caused another day of delay while technical support insisted that they could not help me because &#8220;unauthorized operating systems (custom ROMs) may have limited functionality due to the compatibility of the device.&#8221;</p>
<p>I asked technical support to check that my Market account is functioning normally, and they responded with &#8220;I&#8217;ve taken another look at your account, and can find no reason you shouldn&#8217;t be able to access Android Market. Please remember that Android Market may not work well with devices in a modified state as far as operating system or user access privileges. I can only recommend using Android Market with your device in its factory default state.&#8221;</p>
<p>I did not expect technical support to support a modified ROM. And before anyone accuses them of refusing to help for that reason, they did not blame the ROM outright and they did try to help. However, they did not solve the problem.</p>
<p>So I spent another day testing. I purged Market settings from <code>/data/data/com.android.vending</code>. I compared to friends&#8217; devices. I arranged to borrow a stock, unmodified phone from a friend and test the following day. And then I realised something &#8211; my wife&#8217;s phone showed a different credit card number in the purchase screen. We have the same joint account and credit card number, which means that she was able to make purchases <em>with a different credit card</em>.</p>
<p>I logged in to <a href="http://www.google.com/wallet/">Google Wallet</a> and deleted my credit card, and added it again. The problem was immediately solved. The Market no longer displayed &#8220;I agree to the Payments for Android Market Terms and Conditions&#8221;, and I&#8217;ve been able to buy apps ever since.</p>
<p>Conclusions:</p>
<ol>
<li>The Android Market error message &#8220;Error while retrieving information from server&#8221; apparently means &#8220;Your credit card with Google Wallet once refused a charge&#8221;. Or at least indicates a problem with Google Wallet. This error message is totally unhelpful and should be corrected.</li>
<li><a name="solution"></a>If you get this error message, try logging in to <a href="http://www.google.com/wallet/">Google Wallet</a>, remove your credit card, and add it again.</li>
<li>If you are running a custom ROM, Android Market technical support may pause because the ROM could be at fault. I appreciate that they did try, and they were polite and courteous the whole time. But it still sucks that they believe the CyanogenMod team is any less professional than HTC. And it especially sucks when you provide professional-quality steps-to-reproduce which clearly indicate the ROM is not the problem.
</li>
<li>Android Market technical support does not know about this error message or issue with Google Wallet. This is especially disconcerting, as it probably happens all the time and they are exactly the people who should know about it.</li>
</ol>
<p>I found only a handful of references to this error via Google searches, none with solutions. So I&#8217;m writing this all up here, in hopes that it will help other people.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2011/12/18/android-market-error-while-retrieving-information-from-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Merry Christmas, now with more entropy!</title>
		<link>http://www.tolaris.com/2011/12/17/merry-christmas-now-with-more-entropy/</link>
		<comments>http://www.tolaris.com/2011/12/17/merry-christmas-now-with-more-entropy/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 22:46:53 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xmas]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1568</guid>
		<description><![CDATA[Merry Christmas, everyone! We have a special card just for you. (In case you miss it the first time, try reloading or clicking the button.) If you&#8217;d like to know more about our awesome card, see a previous year&#8217;s post. Hey Mark, have you stolen my idea yet? You&#8217;re becoming rather tardy, mate. $happy $holiday, [...]]]></description>
			<content:encoded><![CDATA[<p>Merry Christmas, everyone!  We have a <a href="/xmas/xmas2011.php">special card just for you</a>.</p>
<p>(In case you miss it the first time, try reloading or clicking the button.)</p>
<p><span id="more-1568"></span>If you&#8217;d like to know more about our awesome card, see <a href="/2009/12/14/merry-christmas/">a previous year&#8217;s post</a>. Hey <a href="http://mark.denovich.com/">Mark</a>, have you stolen my idea yet? You&#8217;re becoming rather tardy, mate.</p>
<p>$happy $holiday, everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2011/12/17/merry-christmas-now-with-more-entropy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to OpenWRT 10.03.1-rc6</title>
		<link>http://www.tolaris.com/2011/11/07/upgrading-to-openwrt-10-03-1-rc6/</link>
		<comments>http://www.tolaris.com/2011/11/07/upgrading-to-openwrt-10-03-1-rc6/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 23:11:22 +0000</pubDate>
		<dc:creator>Tyler Wagner</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[openwrt]]></category>

		<guid isPermaLink="false">http://www.tolaris.com/?p=1544</guid>
		<description><![CDATA[Immediately after the upgrade to 10.03.1-rc5, the OpenWRT team released 10.03.1-rc6. Since rc5 didn&#8217;t fix wireless on my Buffalo WZR-HP-G300NH, I gave rc6 a go. This time the upgrade preserved most of my settings. I still had to reinstall my usual software, and fix a few things. Use the following to install my original list [...]]]></description>
			<content:encoded><![CDATA[<p>Immediately after the upgrade to 10.03.1-rc5, the OpenWRT team released 10.03.1-rc6. Since rc5 didn&#8217;t fix wireless on my Buffalo WZR-HP-G300NH, I gave rc6 a go.</p>
<p><span id="more-1544"></span>This time the upgrade preserved most of my settings. I still had to reinstall my usual software, and fix a few things. Use the following to install my <a href="/2010/09/01/openwrt-10-03-on-buffalo-wzr-hp-g300nh/">original list</a> of useful software. This should be handy when rc7 or, haha, the &#8220;final&#8221; 10.03.1 is released.</p>
<pre>
opkg update
opkg install kmod-fs-btrfs kmod-fs-ext2 kmod-fs-ext3 kmod-fs-ext4 kmod-fs-isofs kmod-fs-reiserfs kmod-fs-vfat kmod-fs-xfs
opkg install kmod-nls-cp1250 kmod-nls-cp1251 kmod-nls-cp437 kmod-nls-cp775 kmod-nls-cp850 kmod-nls-cp852 kmod-nls-cp866 kmod-nls-iso8859-1 kmod-nls-iso8859-13 kmod-nls-iso8859-15 kmod-nls-iso8859-2 kmod-nls-koi8r kmod-nls-utf8
opkg install kmod-usb2 kmod-usb-storage kmod-usb-storage-extras block-hotplug block-mount hotplug2
opkg install --force-overwrite avahi-daemon bwm conntrack-tools fdisk fping iftop ip kmod-ipv6 libnl lft lsof luci-app-ntpc luci-app-openvpn luci-app-upnp luci-ssl miniupnpd mtr net-tools-hostname ngrep nmap ntpclient openssh-client openvpn rsync screen snmpd sshfs tcpdump vim
mkdir /mnt/usbstorage -p
</pre>
<p>This list no longer includes iptables-utils, which has been merged into iptables and is now simply a dummy package.</p>
<p>After that, I also had to:</p>
<ol>
<li>Restore my OpenVPN certificates to /lib/uci/upload/</li>
<li>Delete duplicate configurations in &#8220;LED Configuration&#8221;</li>
<li>Go to System -> Startup and enable the newly-installed daemons</li>
</ol>
<p>Warning: do not restore to /overlay, even if that is what your BackupPC server is archiving. Restore to the root directory.</p>
<p>I tested wireless throughput on rc4 and rc6 on my Buffalo WZR-HP-G300NH, and also on a Linksys WRT-54-GL with DD-WRT v24-sp1 for comparison. Since <a href="/2011/11/07/upgrading-to-openwrt-10-03-1-rc5/">rc5 was unstable</a> (except in 802.11b-only mode), I didn&#8217;t bother with full tests. All wireless networks had an identical configuration, from ESSID to channel to encryption settings.</p>
<p>I used iperf to transmit 10-second UDP streams from my laptop (on wireless) to zuul (on gigabit Ethernet). When testing between two directly-connected nodes, iperf will scale its burst rate until it finds the maximum link speed. Example: <code>iperf -u -c zuul -b 35M -t 10</code>. The results, averaged over 5 tests each:</p>
<p>Linksys WRT-54-GL with DD-WRT v24-sp1 &#8211; 28.5 mbit<br />
Buffalo WZR-HP-G300NH with 10.03.1-rc4 &#8211; 23.9 mbit<br />
Buffalo WZR-HP-G300NH with 10.03.1-rc6 &#8211; 26.8 mbit</p>
<p>I&#8217;m glad to see improved throughput since rc4, but it still doesn&#8217;t quite reach the WRT-54-GL, which is surprising. The difference is small enough to ignore. So far, I&#8217;ve had no issues with drops in wireless. I&#8217;ll update this post after I&#8217;ve had time to observe wireless stability.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tolaris.com/2011/11/07/upgrading-to-openwrt-10-03-1-rc6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

