<?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>Marcus Povey &#187; linux</title>
	<atom:link href="http://www.marcus-povey.co.uk/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcus-povey.co.uk</link>
	<description>Making the world a better place, one byte at a time...</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:13:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<atom:link rel='hub' href='http://www.marcus-povey.co.uk/?pushpress=hub'/>
		<item>
		<title>Howto: Printing to any printer with an iPad/iPhone and Apple Airprint</title>
		<link>http://www.marcus-povey.co.uk/2011/11/11/howto-printing-to-any-printer-with-an-ipadiphone-and-apple-airprint/</link>
		<comments>http://www.marcus-povey.co.uk/2011/11/11/howto-printing-to-any-printer-with-an-ipadiphone-and-apple-airprint/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 08:59:38 +0000</pubDate>
		<dc:creator>Marcus Povey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[airprint]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[avahi]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[printer]]></category>

		<guid isPermaLink="false">http://www.marcus-povey.co.uk/?p=762</guid>
		<description><![CDATA[Apple Airprint is a technology (a zeroconf implementation under the bonnet) which allows apple devices to detect, configure and print without any overt configuration on the part of the user. The bad news is that in only works for a handful of printers natively. But never fear, Linux to the rescue! At this point I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.marcus-povey.co.uk/wp-content/airprint.jpg" alt="" width="150" align="right" />Apple Airprint is a technology (a <a href="http://en.wikipedia.org/wiki/Zero_configuration_networking">zeroconf</a> implementation under the bonnet) which allows apple devices to detect, configure and print without any overt configuration on the part of the user.</p>
<p>The bad news is that in only works for a handful of printers natively. But never fear, Linux to the rescue!</p>
<p>At this point I&#8217;m going to assume that you have a Linux box somewhere on your network acting as a file and print server (pretty regular kit in most geek homes).</p>
<p><strong>Set up your printer</strong></p>
<p>The first step is to set up CUPS on your linux server and then installing the appropriate printer driver for your printer.</p>
<p>I won&#8217;t go into detail here as there are numerous guides out there on the wider web, but mostly this is a matter of installing cups and foomatic and then visiting the cups configuration website on the server (localhost:631 usually) and adding your printer.</p>
<p>Make sure that the printer is shared. Print a test page.</p>
<p>One gotcha I found is that my default configuration only allowed connections from the local machine, even though the printer was marked as shared (although frankly I was cheating since most of my computers printed to my server over a Samba relay, but that&#8217;s by the by).</p>
<p>Take a look at <code>/etc/cups/cupsd.conf</code> and make sure that <code></code> has an <code>Allow From</code> from your local network. E.g.</p>
<blockquote><p><code><br />
&lt;Location /&gt;<br />
Order Deny,Allow<br />
Deny From All<br />
Allow From 127.0.0.1<br />
Allow From 192.168.0.0/24<br />
&lt;/Location&gt;</code></p></blockquote>
<p><strong>Export the printer</strong></p>
<p>The next step is to install the zeroconf demon, which is called <a href="http://en.wikipedia.org/wiki/Avahi_(software)">Avahi</a>. This varies from system to system, but on debian this is pretty much a matter of <strong>apt-getting avahi-daemon</strong>. You may also want <strong>avahi-discover</strong> so you can browse the exported devices on your network.</p>
<p>Assuming you&#8217;ve correctly set up and shared your printers in CUPS the next step is to generate an avahi configuration for it. Thankfully, there&#8217;s a handy Python script called <a href="https://github.com/tjfontaine/airprint-generate">airprint-generate, available on github</a> which does much of the donkey work.</p>
<p>Copy the resultant file to <code>/etc/avahi/services</code> and restart the avahi demon. </p>
<p>If your printer is password protected, you will want to add a <code>&lt;txt-record&gt;air=username,password&lt;/txt-record&gt;</code> field to the file before doing so. Where username and password is the literal cleartext strings sent.</p>
<p><strong>Profit!!!</strong></p>
<p>Theoretically that should be it. After the configuration, and restarting the various demons involved your printer should be available to the various iOS devices kicking around your network. </p>
<p>Let me know if you have any questions!</p>
<div class="wsbuttons">
	<div class="shareblob facebook">
		<div class="fb-like" data-href="http://www.marcus-povey.co.uk/2011/11/11/howto-printing-to-any-printer-with-an-ipadiphone-and-apple-airprint/" data-send="false" data-layout="box_count" data-width="60" data-show-faces="false" data-colorscheme="light"></div>
	</div>

	<div class="shareblob google">
		<div class="g-plusone" data-size="tall" data-href="http://www.marcus-povey.co.uk/2011/11/11/howto-printing-to-any-printer-with-an-ipadiphone-and-apple-airprint/"></div>
	</div>

	<div class="shareblob twitter">
		<div class="twitter">
			<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.marcus-povey.co.uk%2F2011%2F11%2F11%2Fhowto-printing-to-any-printer-with-an-ipadiphone-and-apple-airprint%2F&count=vertical" class="twitter-share-button" data-lang="en">Tweet</a>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
		</div>
	</div>

</div>
	]]></content:encoded>
			<wfw:commentRss>http://www.marcus-povey.co.uk/2011/11/11/howto-printing-to-any-printer-with-an-ipadiphone-and-apple-airprint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using an XBOX 360 wireless controller with XBMC on Ubuntu</title>
		<link>http://www.marcus-povey.co.uk/2009/12/29/using-an-xbox-360-wireless-controller-with-xbmc-on-ubuntu/</link>
		<comments>http://www.marcus-povey.co.uk/2009/12/29/using-an-xbox-360-wireless-controller-with-xbmc-on-ubuntu/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 17:48:30 +0000</pubDate>
		<dc:creator>Marcus Povey</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[360]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wireless]]></category>
		<category><![CDATA[xbmc]]></category>
		<category><![CDATA[xbox]]></category>
		<category><![CDATA[xbox 360]]></category>

		<guid isPermaLink="false">http://www.marcus-povey.co.uk/?p=357</guid>
		<description><![CDATA[This Christmas I finally bit the bullet and treated myself to a shiny XBox 360. Ostensibly this was so that I could experiment with console development, but mostly I have used it to play Gears of War. In a slight departure from what I usually talk about, I thought I&#8217;d quickly jot down how I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/miskan/25241898/"><img src="http://farm1.static.flickr.com/22/25241898_aa45084bd8_m.jpg" border="0" alt="" align="right" /></a>This Christmas I finally bit the bullet and treated myself to a shiny XBox 360. Ostensibly this was so that I could experiment with console development, but mostly I have used it to play <a href="http://en.wikipedia.org/wiki/Gears_of_War">Gears of War</a>.</p>
<p>In a slight departure from what I usually talk about, I thought I&#8217;d quickly jot down how I got the wireless controller to work with my Ubuntu <a href="http://xbmc.org/">XBMC</a> media PC.</p>
<p>The wireless controller provides a slightly more usable remote than my <a href="http://remote.collect3.com.au/">iPhone</a> (which must first be unlocked making quick pauses impossible) or rather flaky wireless keyboard, so hopefully this will be useful to someone.</p>
<p><strong>Getting started<br />
</strong></p>
<p>My media PC currently runs Ubuntu Karmic with XBMC. To begin with you will need to install the XBox kernel driver (already installed on Karmic).</p>
<p>Most importantly however, you will need to get yourself a <a href="http://support.microsoft.com/kb/933711?sd=xbox">XBox wireless gaming receiver for Windows</a> &#8211; which I got included with my second controller. Xbox controllers do not use standard bluetooth, so you can&#8217;t just pair in the normal way using your existing hardware.</p>
<p>This <a href="https://help.ubuntu.com/community/Xbox360Controller">howto has some more info</a>&#8230;</p>
<p><strong>Configuring XBMC</strong></p>
<p>Assuming you have your module installed and controller paired you will need to tell XBMC about it by configuring a keyfile:</p>
<ol>
<li>I used <a href="https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/system/keymaps/joystick.Microsoft.Xbox.Controller.S.xml">this keyfile as a starting point</a>. Download and save it as <code>~/.xbmc/userdata/keymaps/Keymap.xml</code> (note case).</li>
<li>Find out what your computer thinks the controller is by looking at the output from: <code>cat /proc/bus/input/devices</code> &#8211; you want a <code>"Name"</code> that says something like <code>"Xbox 360 Wireless Receiver"</code></li>
<li>Replace all occurrences of <code>"Microsoft Xbox Controller S"</code> with this value.</li>
</ol>
<p>At this point if you start XBMC it should respond to the controller. If you are lucky this is all you will have to do, however for me I had to mess around with the key bindings a bit since the example keymap file didn&#8217;t match my controller exactly.</p>
<p>If this happens to you there&#8217;s not much I can suggest other than to bind one key at a time, restart XBMC and see what button that maps to then repeat until all your keys are mapped. I&#8217;m sure there must be an easier way that I&#8217;ve overlooked, feel free to comment below!</p>
<p>For what it&#8217;s worth, here is my modified (but somewhat incomplete) key file which has largely sensible bindings. Hack away to get it working how you like.</p>
<p>» <a href="http://www.marcus-povey.co.uk/wp-content/Keymap.zip">Modified Keymap</a></p>
<p><small><em>Image &#8220;<a href="http://www.flickr.com/photos/miskan/25241898/">XBMC</a>&#8221; by <a href="http://www.flickr.com/photos/miskan/">Miskan</a></em></small></p>
<div class="wsbuttons">
	<div class="shareblob facebook">
		<div class="fb-like" data-href="http://www.marcus-povey.co.uk/2009/12/29/using-an-xbox-360-wireless-controller-with-xbmc-on-ubuntu/" data-send="false" data-layout="box_count" data-width="60" data-show-faces="false" data-colorscheme="light"></div>
	</div>

	<div class="shareblob google">
		<div class="g-plusone" data-size="tall" data-href="http://www.marcus-povey.co.uk/2009/12/29/using-an-xbox-360-wireless-controller-with-xbmc-on-ubuntu/"></div>
	</div>

	<div class="shareblob twitter">
		<div class="twitter">
			<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.marcus-povey.co.uk%2F2009%2F12%2F29%2Fusing-an-xbox-360-wireless-controller-with-xbmc-on-ubuntu%2F&count=vertical" class="twitter-share-button" data-lang="en">Tweet</a>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
		</div>
	</div>

</div>
	]]></content:encoded>
			<wfw:commentRss>http://www.marcus-povey.co.uk/2009/12/29/using-an-xbox-360-wireless-controller-with-xbmc-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

