<?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>Lee Maguire &#187; Linux</title>
	<atom:link href="http://www.hexkey.co.uk/lee/log/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hexkey.co.uk/lee/log</link>
	<description>graded snobberies, bawdiness, hypocrisy</description>
	<lastBuildDate>Sat, 04 Sep 2010 22:57:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Mounting the K750 under Linux</title>
		<link>http://www.hexkey.co.uk/lee/log/2005/11/13/mounting-the-k750-under-linux/</link>
		<comments>http://www.hexkey.co.uk/lee/log/2005/11/13/mounting-the-k750-under-linux/#comments</comments>
		<pubDate>Sun, 13 Nov 2005 23:42:18 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hexkey.co.uk/lee3/?p=18</guid>
		<description><![CDATA[fdi for using the Sony Ericsson 750i]]></description>
			<content:encoded><![CDATA[<p>Mainly for the benefit of search engine users, here&#8217;s the <a href="http://www.freedesktop.org/wiki/Software_2fhal">HAL</a> fdi I&#8217;m using for the Sony Ericsson k750 under Linux.</p>
<div class="config">
<pre>
&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;!-- -*- SGML -*- --&gt;

&lt;!-- Sony Ericsson k750 --&gt;
&lt;deviceinfo version="0.2"&gt;
  &lt;device&gt;
        &lt;match key="@storage.physical_device:usb.product" string="Sony Ericsson K750"&gt;
          &lt;match key="storage.bus" string="usb"&gt;
            &lt;merge key="storage.drive_type" type="string"&gt;memory_stick&lt;/merge&gt;
            &lt;merge key="storage.requires_eject" type="bool"&gt;false&lt;/merge&gt;
            &lt;!--  Doesn't seem to stop gphoto from loading
            &lt;append key="info.capabilities" type="string"&gt; camera&lt;/append&gt;
            &lt;merge key="camera.access_method" type="string"&gt;storage&lt;/merge&gt;
            &lt;merge key="camera.libgphoto2.support" type="bool"&gt;false&lt;/merge&gt;
            --&gt;
            &lt;append key="info.capabilities" type="string"&gt; portable_audio_player&lt;/append&gt;
            &lt;merge key="portable_audio_player.type" type="string"&gt;generic&lt;/merge&gt;
&lt;merge key="portable_audio_player.access_method" type="string"&gt;storage&lt;/merge&gt;
            &lt;merge key="portable_audio_player.storage_device" type="copy_property"&gt;info.udi&lt;/merge&gt;
            &lt;merge key="portable_audio_player.output_formats" type="string"&gt;audio/mpeg audio/x-mp3 audio/aac&lt;/me
rge&gt;
          &lt;/match&gt;
        &lt;/match&gt;
        &lt;match key="@block.storage_device:@storage.physical_device:usb.product" string="Sony Ericsson K750"&gt;
          &lt;match key="block.is_volume" bool="true"&gt;
            &lt;merge key="volume.policy.desired_mount_point" type="string"&gt;k750&lt;/merge&gt;
            &lt;merge key="volume.label" type="string"&gt;Sony Ericsson k750&lt;/merge&gt;
            &lt;merge key="volume.policy.mount_option.check=r" type="bool"&gt;true&lt;/merge&gt;
            &lt;merge key="volume.policy.mount_option.utf8" type="bool"&gt;false&lt;/merge&gt;
          &lt;/match&gt;
        &lt;/match&gt;
      &lt;/match&gt;
  &lt;/device&gt;
&lt;/deviceinfo&gt;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.hexkey.co.uk/lee/log/2005/11/13/mounting-the-k750-under-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shuffle redux</title>
		<link>http://www.hexkey.co.uk/lee/log/2005/05/08/shuffle-redux/</link>
		<comments>http://www.hexkey.co.uk/lee/log/2005/05/08/shuffle-redux/#comments</comments>
		<pubDate>Sun, 08 May 2005 21:42:05 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hexkey.co.uk/lee/log3/?p=89</guid>
		<description><![CDATA[fdi for automounting the iPod shuffle]]></description>
			<content:encoded><![CDATA[<p>And talking of Linux hardware &#8211; much of the (minimal) fussing about getting the iPod shuffle working under Linux that I mentioned <a href="/lee/log/2005/03/01/">back in March </a>is now unnecessary.  The version of <a href="http://gtkpod.sourceforge.net/">gtkpod</a> in Debian/unstable now has shuffle support &#8211; and the automount process can be simplified by a simple xml file I modified from development files and dropped into /etc/hal/fdi/local-ipod.fdi.  So I guess that for later distros you won&#8217;t even have to do that.</p>
<p>The following allows shuffle to be automounted (based on its USB id) under /media/ipod (where both gtkpod and <a href="http://www.rhythmbox.org/">rhythmbox</a> look for it). (updated 2005-11-23)</p>
<div class="config">
<pre>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;!-- -*- SGML -*- --&gt;

&lt;!-- iPod Shuffle --&gt;
&lt;deviceinfo version="0.2"&gt;
  &lt;device&gt;
    &lt;match key="block.is_volume" bool="true"&gt;
      &lt;match key="volume.fsusage" string="filesystem"&gt;
        &lt;match key="@block.storage_device:@storage.physical_device:usb.vendor_id" int="0x05ac"&gt;
          &lt;match key="@block.storage_device:@storage.physical_device:usb.product_id" int="0x1300"&gt;
            &lt;merge key="volume.policy.desired_mount_point" type="string"&gt;ipod&lt;/merge&gt;
            &lt;merge key="volume.label" type="string"&gt;iPod: &lt;/merge&gt;
            &lt;append key="volume.label" type="copy_property"&gt;info.product&lt;/append&gt;
            &lt;merge key="volume.policy.mount_option.check=r" type="bool"&gt;true&lt;/merge&gt;
            &lt;merge key="volume.policy.mount_option.utf8" type="bool"&gt;false&lt;/merge&gt;
            &lt;append key="info.capabilities" type="string"&gt; portable_audio_player&lt;/append&gt;
            &lt;merge key="portable_audio_player.access_method" type="string"&gt;storage&lt;/merge&gt;
            &lt;merge key="portable_audio_player.type" type="string"&gt;ipod&lt;/merge&gt;
            &lt;merge key="portable_audio_player.storage_device" type="copy_property"&gt;info.udi&lt;/merge&gt;
            &lt;merge key="portable_audio_player.output_formats" type="strlist"&gt;audio/mpeg audio/x-mp3 audio/aac&lt;/merge&gt;
            &lt;merge key="storage.requires_eject" type="bool"&gt;true&lt;/merge&gt;
          &lt;/match&gt;
        &lt;/match&gt;
      &lt;/match&gt;
    &lt;/match&gt;
  &lt;/device&gt;
&lt;/deviceinfo&gt;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.hexkey.co.uk/lee/log/2005/05/08/shuffle-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random hardware</title>
		<link>http://www.hexkey.co.uk/lee/log/2005/03/01/random-hardware/</link>
		<comments>http://www.hexkey.co.uk/lee/log/2005/03/01/random-hardware/#comments</comments>
		<pubDate>Tue, 01 Mar 2005 11:45:35 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hexkey.co.uk/lee/log3/?p=97</guid>
		<description><![CDATA[I was given a brand-new iPod shuffle this weekend (thanks Che!). Not only do I now get the fresh experience of owning technology that&#8217;s not already considered obsolete, I also haven&#8217;t owned a piece of personal stereo technology since the crappy generic-brand personal cassette player I had when I was 13. While I&#8217;m not a Apple design fetishist, it is [...]]]></description>
			<content:encoded><![CDATA[<p>I was given a brand-new <a href="http://www.apple.com/ipodshuffle/">iPod shuffle </a>this weekend (<em>thanks Che!</em>).  Not only do I now get the fresh experience of owning technology that&#8217;s not already considered obsolete, I also haven&#8217;t owned a piece of personal stereo technology since the crappy generic-brand personal cassette player I had when I was 13.</p>
<p>While I&#8217;m not a Apple design fetishist, it is a lovely little object.  And its smaller, cheaper, simpler approach is more in line with my own tastes in personal tech than the previous models.  And the lanyard will make it ideal for some kind of&#8230; exercise.  Importing the high-octane electronica soundtracks from first-person shooters and racing games should do the trick.</p>
<p>And really, it only looks like a sinister techno-cult talisman when worn over a black turtleneck.</p>
<p>Unlike, well, almost everyone I know, I&#8217;ve never spent weeks ripping and encoding my CD collection. I could never spare the cycles to run MP3 players, so I let the Napster revolution pass me by.  And since I don&#8217;t use Windows or OSX at home, I&#8217;m certainly not going to be using iTunes any time soon.</p>
<p>So my first job was to rip my CDs - apt-get <a title="Sound Juicer" href="http://www.burtonini.com/blog/computers/sound-juicer?flav=xhtml">sound-juicer</a>, a fairly straight-forward CD ripper for Gnome.  Sound Juicer, by default, rips tracks into to the <em>hacker&#8217;s choice</em> audio format, <a href="http://www.xiph.org/ogg/">Ogg Vorbis</a>.  Sadly the Shuffle won&#8217;t play these directly, so .oggs would need to be transcoded before being synced to the iPod.  And juicer doesn&#8217;t support Apple&#8217;s favoured <a href="http://www.apple.com/mpeg4/aac/">MPEG4 AAC</a> codec (although an <a title="AudioCoding.com - Open Source AAC Codecs" href="http://www.audiocoding.com/">FAAC</a> plugin exists for the <a href="http://gstreamer.freedesktop.org/">gstreamer </a>framework it&#8217;s built on).  So it&#8217;s back to the <em>lingua franca</em> of digital audio distribution, MP3.</p>
<p>But, of course, the pure Debian distribution doesn&#8217;t support MP3 encoding out-of-the-box (as it were).  But like various other codecs and other programs affected by patent issues, support can be added by adding a repository (tainted with the stench of practical compromise) to your apt sources.list.</p>
<p>But even admitting these sites exist is a betrayal of the free software movement.  So I won&#8217;t.</p>
<p>But, since the devil makes all the best digital media, you&#8217;ll probably already have added one, and thus the following should do the trick:</p>
<div class="kbd"><kbd><br />
apt-get install gstreamer0.8-lame<br />
</kbd></div>
<p>The next task is getting linux to talk to the iPod.  Fortunately, upon plugging it into a USB socket, it presents itself as a virginal USB mass storage device and thus appears as a fresh SCSI disk on the system.  Since it uses the variable naming of the removable SCSI devices, we need to set up a dynamic symlink using <a href="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html">udev </a>by adding the following into /etc/udev/rules.d/local.rules:</p>
<div class="config"><tt><br />
# iPod shuffle  </p>
<p></tt><tt>BUS="scsi", SYSFS{model}="iPod", KERNEL="sd*", NAME="%k", SYMLINK="ipod"<br />
</tt></div>
<p>Then mkdir /media/ipod, add the following to /etc/fstab and restart udev</p>
<div class="config"><tt><br />
/dev/ipod       /media/ipod     vfat    rw,user,noauto,sync     0       0<br />
</tt></div>
<p>I then apt-got <a href="http://gtkpod.sourceforge.net/">gtkpod </a>which gives a graphical playlist manager allowing syncing. Sadly the latest release predates the launch of the shuffle, and it emerges that the shuffle uses a different database than the disk based iPods, thus older software can read the data on the shuffle, but it can&#8217;t modify it.</p>
<p>Fortunately for me a short-term solution has appeared, since those dedicated ipod-owning perl-hackers have, this last weekend, released <a title="gnupod" href="http://www.blinkenlights.ch/cgi-bin/fm.pl?get=ipod">GNUpod</a> version 0.98,  collection of ipod management scripts now with Shuffle support.</p>
<div class="kbd"><kbd><br />
mount /media/ipod  </p>
<p>gnupod_INIT.pl -m /media/ipod  # on the first use only</p>
<p>gnupod_addsong.pl -m /media/ipod ~/Music/Foo/*.mp3</p>
<p>mktunes.pl -m /media/ipod</p>
<p></kbd><kbd>umount /media/ipod<br />
</kbd></div>
<p>And I&#8217;m all set.  Hurrah!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hexkey.co.uk/lee/log/2005/03/01/random-hardware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Networking UML under Debian</title>
		<link>http://www.hexkey.co.uk/lee/log/2005/01/04/networking-uml-under-debian/</link>
		<comments>http://www.hexkey.co.uk/lee/log/2005/01/04/networking-uml-under-debian/#comments</comments>
		<pubDate>Tue, 04 Jan 2005 15:38:02 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hexkey.co.uk/lee/log3/?p=102</guid>
		<description><![CDATA[I recently needed to setup the networking on a Debian box with three network cards on three different networks, each assigned three IP addresses &#8211; two of which would be assigned to taps for UML hosts. It was actually a little more complex that I was expecting. Of the few configuration examples I&#8217;ve seen on the web, none [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to setup the networking on a Debian box with three network cards on three different networks, each assigned three IP addresses &#8211; two of which would be assigned to taps for <a title="User-mode Linux" href="http://user-mode-linux.sourceforge.net/">UML</a> hosts.</p>
<p>It was actually a little more complex that I was expecting.  Of the few configuration examples I&#8217;ve seen on the web, none of them adequately covered the mixing bridges and tunnels in &#8220;/etc/network/interfaces&#8221;.</p>
<p>Weirdly, even though I&#8217;ve been using it for a few years, it&#8217;s only now that I&#8217;m beginning to grok ifupdown (the Debian way of configuring network interfaces).  It&#8217;s a powerful, simple, and extensible enough to support fairly complex actions with simple, elegant, configurations.  For example, &#8221;uml_proxy_*&#8221; handles inserting static routes and <a title="proxy ARP (wikipedia)" href="http://en.wikipedia.org/wiki/Proxy_ARP">ARP proxying</a>.</p>
<p>The downside, sadly, is that it&#8217;s near impossible to provide any definitive documentation of &#8220;interfaces&#8221; &#8211; good luck finding documentation for &#8221;uml_proxy_*&#8221;!</p>
<p>The following &#8220;/etc/network/interfaces&#8221; requires the extensions provided by resolvconf, uml-utilities, and bridge-utils to run correctly.</p>
<div class="config">
<pre>auto lo
iface lo inet loopback

auto umltap0_0 umltap0_1
auto umltap1_0 umltap1_1
auto umltap2_0 umltap2_1

iface umltap0_0 inet static
        tunctl_user uml
        address 192.0.2.30
        netmask 255.255.255.240

iface umltap0_1 inet static
        tunctl_user uml
        address 192.0.2.26
        netmask 255.255.255.240

iface umltap1_0 inet static
        tunctl_user uml
        address 10.140.1.3
        netmask 255.255.255.0

iface umltap1_1 inet static
        tunctl_user uml
        address 10.140.1.4
        netmask 255.255.255.0

iface umltap2_0 inet static
        tunctl_user uml
        address 10.51.1.143
        netmask 255.255.255.0

iface umltap2_1 inet static
        tunctl_user uml
        address 10.51.1.144
        netmask 255.255.255.0

auto br0 br1 br2
iface br0 inet static
        pre-up ifconfig eth0 0.0.0.0 promisc up
        address 192.0.2.27
        netmask 255.255.255.240
        network 192.0.2.16
        broadcast 192.0.2.31
        gateway 192.0.2.17
        bridge_fd 0
        bridge_hello 0
        bridge_stp off
        bridge_ports eth0 umltap0_0 umltap0_1
        uml_proxy_arp 192.0.2.30 192.0.2.26
        uml_proxy_ether br0
        dns-search example.com
        dns-nameservers 192.0.2.17
        post-down ifconfig eth0 down

iface br1 inet static
        pre-up ifconfig eth1 0.0.0.0 promisc up
        address 10.140.1.2
        netmask 255.255.255.0
        network 10.140.1.0
        broadcast 10.140.1.255
        bridge_fd 0
        bridge_hello 0
        bridge_stp off
        bridge_ports eth1 umltap1_0 umltap1_1
        uml_proxy_arp 10.140.1.3 10.140.1.4
        uml_proxy_ether br1
        post-down ifconfig eth1 down

iface br2 inet static
        pre-up ifconfig eth2 0.0.0.0 promisc up
        address 10.51.1.142
        netmask 255.255.255.240
        bridge_fd 0
        bridge_hello 0
        bridge_stp off
        bridge_ports eth2 umltap2_0 umltap2_1
        uml_proxy_arp 10.51.1.143 10.51.1.144
        uml_proxy_ether br2
        up route add -net 10.51.0.0/16 gw 10.51.1.129 br2
        post-down ifconfig eth2 down</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.hexkey.co.uk/lee/log/2005/01/04/networking-uml-under-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Treason uncloaked!</title>
		<link>http://www.hexkey.co.uk/lee/log/2004/01/16/treason-uncloaked/</link>
		<comments>http://www.hexkey.co.uk/lee/log/2004/01/16/treason-uncloaked/#comments</comments>
		<pubDate>Fri, 16 Jan 2004 17:39:44 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.hexkey.co.uk/lee/log3/?p=214</guid>
		<description><![CDATA[I just got an email from logcheck consisting of lines similar to the following: kernel: TCP: Treason uncloaked! Peer 218.69.139.x:43090/80 shrinks window 1468046648:1468049476. Repaired. Treason uncloaked! Fantastic. Another unintelligible, jocular message flagging unusual error conditions. Very &#8220;printer on fire&#8221;. (Either that, or a babelfish translation of something that sounded reasonable. And to be fair, you&#8217;ll only see it [...]]]></description>
			<content:encoded><![CDATA[<p>I just got an email from <a title="Debian: logcheck - Mails anomalies in the system logfiles to the administrator" href="http://packages.debian.org/unstable/admin/logcheck">logcheck</a> consisting of lines similar to the following:</p>
<blockquote class="samp"><p><samp> kernel: TCP: Treason uncloaked! Peer 218.69.139.x:43090/80 shrinks window 1468046648:1468049476. Repaired.<br />
</samp></p></blockquote>
<p><em>Treason uncloaked!</em> Fantastic.  Another unintelligible, jocular message flagging unusual error conditions.  Very <a title="Usenet: lp1 on fire" href="http://groups.google.com/groups?selm=2b7pghINNgeu%40charnel.ecst.csuchico.edu">&#8220;printer on fire&#8221;</a>.  (Either that, or a babelfish translation of something that sounded reasonable.  And to be fair, you&#8217;ll only see it if TCP debugging is turned on.)</p>
<p>Considering the use of the exclamation mark, it&#8217;s not clear if the uncloaking of treason (mine or others?) is anything to worry about. &#8221;Repaired&#8221; is reassuring, I suppose - but might this a symptom of a fresh exploit?  A new worm?</p>
<p>Googling suggests that it&#8217;s a bugfix from linux 2.4.7 for dealing with broken <abbr title="Transmission Control Protocol">TCP</abbr> implementations. The <a title="linux kernel:/net/ipv4/tcp_timer.c" href="http://cvs.sourceforge.net/viewcvs.py/linuxsh/kernel/net/ipv4/tcp_timer.c?r1=1.7&amp;r2=1.8">code </a>explains itself as:</p>
<blockquote class="code" cite="http://cvs.sourceforge.net/viewcvs.py/linuxsh/kernel/net/ipv4/tcp_timer.c?r1=1.7&amp;r2=1.8"><p><code></p>
<pre>  /* Receiver dastardly shrinks window. Our retransmits
   * become zero probes, but we should not timeout this
   * connection. If the socket is an orphan, time it out,
   * we cannot allow such beasts to hang infinitely.
   */</pre>
<p></code></p></blockquote>
<p>I especially like the use of &#8220;dastardly&#8221; in the comments. From now on kernel messages, for me, will have voice of an announcer on some pulpy 30s radio serial. <em>&#8220;Who knows what evil lurks in the packets of men? <a title="RFC3514: The Security Flag in the IPv4 Header" href="http://www.ietf.org/rfc/rfc3514.txt">RFC3514</a> knows&#8230;&#8221;</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hexkey.co.uk/lee/log/2004/01/16/treason-uncloaked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
