<?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>Terence Eden has a Blog &#187; linux</title> <atom:link href="http://shkspr.mobi/blog/index.php/tag/linux/feed/" rel="self" type="application/rss+xml" /><link>http://shkspr.mobi/blog</link> <description>Mobiles, Shakespeare, Politics, Usability.</description> <lastBuildDate>Mon, 06 Feb 2012 16:31:09 +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>Connecting Samsung ICS to Ubuntu using MTP</title><link>http://shkspr.mobi/blog/index.php/2012/01/connecting-samsung-ics-to-ubuntu-using-mtp/</link> <comments>http://shkspr.mobi/blog/index.php/2012/01/connecting-samsung-ics-to-ubuntu-using-mtp/#comments</comments> <pubDate>Tue, 03 Jan 2012 15:45:42 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[android]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[ics]]></category> <category><![CDATA[mtp]]></category> <category><![CDATA[ubuntu]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=5132</guid> <description><![CDATA[(These notes are mostly for my own benefit). Android is moving away from USB Mass Storage. You will no longer be able to plug in a USB cable and have your Android show up as a USB disk. There are some good technical reasons for this, but it is a pain if you want to <a
href='http://shkspr.mobi/blog/index.php/2012/01/connecting-samsung-ics-to-ubuntu-using-mtp/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>(These notes are mostly for my own benefit).</p><p>Android is moving away from USB Mass Storage.  You will no longer be able to plug in a USB cable and have your Android show up as a USB disk.  There are some <a
href="http://www.engadget.com/2011/11/21/ice-cream-sandwich-supports-usb-mass-storage-after-all-galaxy-n/">good technical reasons</a> for this, but it is a pain if you want to copy some files to your phone.  The new system &#8211; MTP &#8211; isn&#8217;t automagically detected in Ubuntu.  This is something which is likely to be fixed in later versions of Ubuntu &#8211; but for now you&#8217;ll have to hack around it.</p><p>The crazy cats at <a
href="http://www.omgubuntu.co.uk/2011/12/how-to-connect-your-android-ice-cream-sandwich-phone-to-ubuntu-for-file-access/">omgUbuntu have a tutorial</a> which I have adapted for the Samasung Galaxy S (running <a
href="http://forum.xda-developers.com/showthread.php?t=1363593">ICS from teamhacksung</a>).</p><p>First, install the MTP tools.</p><pre>sudo apt-get install mtp-tools mtpfs</pre><p>Connect the phone to the computer using USB.</p><p>To check that MTP is installed and working, run the command</p><pre>mtp-detect</pre><p>You should see a spool of text as MTP detects the phone.</p><p>To create the rules which allow Ubuntu to detect the phone, create a new rule file like so:</p><pre>sudo nano /etc/udev/rules.d/51-android.rules</pre><p>Add in this line of text</p><pre>SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666"</pre><p>If you&#8217;re using a different device, run this command to get the correct idVendor and idProduct:</p><pre>mtp-detect | grep idVendor
mtp-detect | grep idProduct</pre><p>We&#8217;ll need to restart udev so it can pick up the new rule.</p><pre>sudo service udev restart</pre><p>Then create a directory in your filesystem which you can use to access your phone.</p><pre>
sudo mkdir /media/GalaxyS
sudo chmod a+rwx /media/GalaxyS
</pre><p>Now we need to add ourselves to fuse.</p><pre>sudo adduser YOURUSERNAME fuse
sudo nano /etc/fuse.conf</pre><p>The last line probably reads</p><pre>#user_allow_other</pre><p>Remove the &#8220;#&#8221; so you&#8217;re left with:</p><pre>user_allow_other</pre><p>Save the file.</p><p>We&#8217;re going to create two commands &#8220;android-connect&#8221; and &#8220;android-disconnect&#8221;.  When run, these will allow you to connect to your phone, then safely disconnect.</p><pre>echo "alias android-connect=\"mtpfs -o allow_other /media/GalaxyS\"" >> ~/.bashrc
echo "alias android-disconnect=\"fusermount -u /media/GalaxyS\"" >> ~/.bashrc
source ~/.bashrc
</pre><p>Restart the computer.  Make sure the phone is connected via USB.  Open a terminal and run</p><pre>android-connect</pre><p>Open your file manager and go to &#8220;/media/GalaxyS&#8221;<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2012/01/ICS-MTP.png" alt="ICS MTP" title="ICS MTP" width="190" height="413" class="aligncenter size-full wp-image-5136" /></p><p>Once you&#8217;re done, disconnect the device by running</p><pre>android-disconnect</pre><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=5132&amp;md5=e985195578b5101eab91e587102b92ba" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2012/01/connecting-samsung-ics-to-ubuntu-using-mtp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=5132&amp;md5=e985195578b5101eab91e587102b92ba" type="text/html" /> </item> <item><title>Changing the Microsoft 4000&#8242;s Zoom Keys in Ubuntu</title><link>http://shkspr.mobi/blog/index.php/2011/12/changing-the-microsoft-4000s-zoom-keys-in-ubuntu/</link> <comments>http://shkspr.mobi/blog/index.php/2011/12/changing-the-microsoft-4000s-zoom-keys-in-ubuntu/#comments</comments> <pubDate>Wed, 28 Dec 2011 12:30:15 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[keyboard]]></category> <category><![CDATA[microsoft]]></category> <category><![CDATA[ubuntu]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=5091</guid> <description><![CDATA[I&#8217;m in love with my keyboard! The Microsoft Natural Ergonomic Keyboard 4000 is a dream to type on. Large, well spaced keys, split keyboard, and a whole host of extra media buttons. There&#8217;s only one tiny problem. Two of the buttons don&#8217;t work in Linux &#8211; specifically, the keyboard scroll buttons. This is a long <a
href='http://shkspr.mobi/blog/index.php/2011/12/changing-the-microsoft-4000s-zoom-keys-in-ubuntu/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>I&#8217;m in love with my keyboard! The <a
href="http://www.amazon.co.uk/gp/product/B000B9RYG8/ref=as_li_ss_tl?ie=UTF8&#038;tag=shkspr-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=B000B9RYG8">Microsoft Natural Ergonomic Keyboard 4000</a><img
src="http://www.assoc-amazon.co.uk/e/ir?t=shkspr-21&#038;l=as2&#038;o=2&#038;a=B000B9RYG8" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> is a dream to type on. Large, well spaced keys, split keyboard, and a whole host of extra media buttons.<br
/> <a
href="http://www.amazon.co.uk/gp/product/B000B9RYG8/ref=as_li_ss_tl?ie=UTF8&amp;tag=shkspr-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B000B9RYG8"><img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/12/4126YPCP4DL.jpg" alt="Microsoft 4000 Keyboard" title="Microsoft 4000 Keyboard" width="500" height="309" class="aligncenter size-full wp-image-5098" /></a><br
/> There&#8217;s only one tiny problem.  Two of the buttons don&#8217;t work in Linux &#8211; specifically, the keyboard scroll buttons.  This is a <a
href="https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/313514">long standing bug in Linux</a>, but luckily it is fairly easy to fix.</p><p>Using <a
href="http://askubuntu.com/questions/69804/how-do-i-change-the-keymap-of-a-single-device-logitech-presenter">Florian Diesch&#8217;s tutorial at Ask Ubuntu</a>, I&#8217;ve come up with this simple guide to get your keyboard working.<br
/> <span
id="more-5091"></span></p><ol><li>Open a terminal.  Sorry, this is all going to be command prompt based!</li><li>Install the program evtest<pre>sudo apt-get install evtest</pre></li><li>You will need to find which input &#8220;event&#8221; corresponds to your keyboard. Run the following command<pre>sudo evtest /dev/input/event5</pre><p>When you press the scroll key on your keyboard, you should see an output like</p><pre>Event: time 1325072953.278713, type 4 (Misc), code 4 (ScanCode), value c022e
Event: time 1325072953.278729, type 1 (Key), code 109 (PageDown), value 1
Event: time 1325072953.278752, -------------- Report Sync ------------
</pre><p>If you don&#8217;t, cancel (using CTRL+C) and try another event number. Start at event0 and work your way up.</li><li>Let&#8217;s see what the keys are currently mapped to.  Type the command<pre>sudo /lib/udev/keymap -i input/event5</pre><p>(or whatever &#8220;event&#8221; number you need).  You should see an output like</p><pre>scan code: 0xC022D   key code: zoomin
scan code: 0xC022E   key code: zoomout</pre></li><li>We need to create a file which contains the new keymapping.  To do this, type<pre>sudo nano /lib/udev/keymaps/microsoft-4000</pre></li><li>Insert the following two lines into the file<pre>0xC022D pageup
0xC022E pagedown</pre><p>If you would rather scroll line-by-line, you can use</p><pre>0xC022D up
0xC022E down</pre><p>Save the file by pressing CTRL+X.</li><li>Now, let&#8217;s implement the remapped keys.  Type<pre>sudo /lib/udev/keymap input/event5 /lib/udev/keymaps/microsoft-4000</pre></li><li>Your scroll buttons should now be working!  If not&#8230; errr&#8230; try again?</li><li>Assuming it is working, we need to make this permanent so that we don&#8217;t have to type in a command every time we reboot.  To open the keymapping file, type<pre>sudo nano /lib/udev/rules.d/95-keymap.rules</pre></li><li>Scroll through the file until you see<pre>#
# The following are external USB keyboards
#

LABEL="keyboard_usbcheck"
</pre><p>Past in the following line</p><pre>ENV{ID_VENDOR_ID}=="045e", ENV{ID_MODEL_ID}=="00db", RUN+="keymap $name microsoft-4000"</pre><p>The line needs to be <strong>above</strong></p><pre>GOTO="keyboard_end"</pre><p>Save the file (CTRL+X).</li><li>Reboot.</li></ol><p>Hey presto! Your keys will now obey your commands.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=5091&amp;md5=53b9e3f975e14209f72900d6a779845e" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/12/changing-the-microsoft-4000s-zoom-keys-in-ubuntu/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=5091&amp;md5=53b9e3f975e14209f72900d6a779845e" type="text/html" /> </item> <item><title>Linux Spotify Keybindings</title><link>http://shkspr.mobi/blog/index.php/2011/12/linux-spotify-keybindings/</link> <comments>http://shkspr.mobi/blog/index.php/2011/12/linux-spotify-keybindings/#comments</comments> <pubDate>Sun, 11 Dec 2011 14:32:02 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[spotify]]></category> <category><![CDATA[ubuntu]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=4942</guid> <description><![CDATA[Hurrah! Spotify have released a native Linux player which works with free accounts! These notes show (which are mostly for my benefit) show you how to install it and configure your multimedia keyboard so the play/pause key controls the music on Spotify. Download Spotify for Linux. It&#8217;s available in 32bit or 64bit. Double click on <a
href='http://shkspr.mobi/blog/index.php/2011/12/linux-spotify-keybindings/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>Hurrah! Spotify have released a <a
href="http://www.omgubuntu.co.uk/2011/12/spotify-on-linux-works-for-free-accounts-offers-15-million-tracks/">native Linux player which works with free accounts</a>!</p><p>These notes show (which are mostly for my benefit) show you how to install it and configure your multimedia keyboard so the play/pause key controls the music on Spotify.</p><p><a
href="http://repository.spotify.com/pool/non-free/s/spotify/">Download Spotify for Linux</a>. It&#8217;s available in 32bit or 64bit.</p><p>Double click on the .deb that has been downloaded and it should install.  Nice and easy!</p><p>To get the multimedia keys working, we need to follow the instructions in <a
href="http://www.mabishu.com/blog/2010/11/15/playing-with-d-bus-interface-of-spotify-for-linux/">this tutorial</a> and the codes <a
href="http://lnxscene.org/~jylam/spotify.html">described at lnxscene</a>.</p><p>Install xbindkeys.</p><pre>sudo apt-get install xbindkeys</pre><p>Create the default configuration file for xbindkeys.</p><pre>xbindkeys --defaults > /home/edent/.xbindkeysrc</pre><p>Edit the configuration file for xbindkeys.</p><pre>nano ~/.xbindkeysrc</pre><p>Add these lines:</p><pre>"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
XF86AudioPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
XF86AudioStop</pre><p>Run xbindkeys to see if it all works</p><pre>xbindkeys</pre><p>Now, when Spotify is running, pressing th eplay/pause key will make your music start or stop.</p><p>You will need to set xbindkeys to run automagically on startup.</p><p>On Ubuntu, System -> Preferences -> Startup Applications.</p><p>Done!</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4942&amp;md5=79de3cfd406ef0d14f032dc83720e2b4" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/12/linux-spotify-keybindings/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4942&amp;md5=79de3cfd406ef0d14f032dc83720e2b4" type="text/html" /> </item> <item><title>Watching and Simultaneously Saving Video in mplayer &#8211; is it possible?</title><link>http://shkspr.mobi/blog/index.php/2011/11/watching-and-simultaneously-saving-video-in-mplayer/</link> <comments>http://shkspr.mobi/blog/index.php/2011/11/watching-and-simultaneously-saving-video-in-mplayer/#comments</comments> <pubDate>Sun, 27 Nov 2011 09:00:41 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[camera]]></category> <category><![CDATA[dump]]></category> <category><![CDATA[mplayer]]></category> <category><![CDATA[save]]></category> <category><![CDATA[stream]]></category> <category><![CDATA[watch]]></category> <category><![CDATA[ycam]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=4841</guid> <description><![CDATA[This is a question I&#8217;ve posed in the Ubuntu forums, but I haven&#8217;t found the answer yet. I&#8217;ve got a great little IP security camera &#8211; the Y-Cam. It&#8217;s Internet accessible, so it can email me photos of any suspicious behaviour. It will also stream video and audio to a number of devices &#8211; including <a
href='http://shkspr.mobi/blog/index.php/2011/11/watching-and-simultaneously-saving-video-in-mplayer/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>This is <a
href="http://ubuntuforums.org/showthread.php?t=1886048">a question I&#8217;ve posed in the Ubuntu forums</a>, but I haven&#8217;t found the answer yet.</p><p>I&#8217;ve got a great little IP security camera &#8211; the <a
href="http://www.y-cam.com/">Y-Cam</a>. It&#8217;s Internet accessible, so it can email me photos of any suspicious behaviour.  It will also stream video and audio to a number of devices &#8211; including mobiles.</p><p>Under Linux, it&#8217;s very easy to get the video and audio via mplayer.</p><pre>mplayer http://username:password@example.com/stream.asf</pre><p>And we get this rather spiffy video playing.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/11/ycam-stream-mplayer.jpg" alt="ycam stream mplayer" title="ycam stream mplayer" width="512" height="202" class="aligncenter size-full wp-image-4842" /></p><p>In fact, there are a number of streams available (depending on camera), including RTSP and 3GP.  The ASF stream seems the most Linux friendly.</p><p>It&#8217;s also possible to save the video to a file &#8211; so if you catch a miscreant in the act of pilfering, you have video and audio evidence.</p><pre>mplayer http://user:password@example.com/stream.asf
    -dumpstream -dumpfile ycam.asf</pre><p>You now have a file which can be played back.</p><p>What I can&#8217;t seem to work out is how to do the two together.  I want a command which will show me the video and <em>at the same time</em> save it to disk.</p><p>So, fearless Internet commentors &#8211; any helpful suggestions?</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4841&amp;md5=868abff2f3e81ecc9bb6314c50bf46ac" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/11/watching-and-simultaneously-saving-video-in-mplayer/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <enclosure
url="http://username:password@example.com/stream.asf" length="0" type="video/asf" /> <enclosure
url="http://user:password@example.com/stream.asf" length="0" type="video/asf" /> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4841&amp;md5=868abff2f3e81ecc9bb6314c50bf46ac" type="text/html" /> </item> <item><title>Calibre PHP Patches</title><link>http://shkspr.mobi/blog/index.php/2011/11/calibre-php-patches/</link> <comments>http://shkspr.mobi/blog/index.php/2011/11/calibre-php-patches/#comments</comments> <pubDate>Wed, 23 Nov 2011 11:58:38 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[calibre]]></category> <category><![CDATA[ebooks]]></category> <category><![CDATA[php]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=4807</guid> <description><![CDATA[Two quick patches which should be in the next version of Calibre PHP. Adding File Size This shows the sizes of the eBook files. Screenshot shows a demonstration using the free &#8220;Hacking The BBC&#8221; eBook. &#8212; /data/web/calibre_php_server-V0.2.7/db.php 2011-11-20 10:19:00.000000000 +0000 +++ db.php 2011-11-20 10:24:16.000000000 +0000 @@ -571,7 +571,7 @@ &#160; &#160; &#125; &#160; &#160; &#160; <a
href='http://shkspr.mobi/blog/index.php/2011/11/calibre-php-patches/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>Two quick patches which should be in the next version of Calibre PHP.</p><h2>Adding File Size</h2><p>This shows the sizes of the eBook files.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/11/calibre-size.png" alt="" title="calibre size" width="440" height="220" class="aligncenter size-full wp-image-4808" /><br
/> Screenshot shows a demonstration using the free &#8220;<a
href="http://backstage.bbc.co.uk/">Hacking The BBC</a>&#8221; eBook.<br
/> <span
id="more-4807"></span></p><div
class="geshi no diff"><ol><li
class="li1"><div
class="de1"><span
class="re3">&#8212; /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/db.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">19</span>:<span
class="nu0">00.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re4">+++ db.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">24</span>:<span
class="nu0">16.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-571</span>,<span
class="nu0">7</span> <span
class="nu0">+571</span>,<span
class="nu0">7</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; // Formats</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; $data = $this-&gt;db-&gt;query<span
class="br0">&#40;</span>sprintf<span
class="br0">&#40;</span>&#39;SELECT format,name</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; $data = $this-&gt;db-&gt;query<span
class="br0">&#40;</span>sprintf<span
class="br0">&#40;</span>&#39;SELECT format,name,uncompressed_size</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM data WHERE book=%d&#39;, $id<span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $fmts = array<span
class="br0">&#40;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; while <span
class="br0">&#40;</span>$data and $row = $data-&gt;fetchArray<span
class="br0">&#40;</span><span
class="br0">&#41;</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-581</span>,<span
class="nu0">7</span> <span
class="nu0">+581</span>,<span
class="nu0">8</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;$fmts<span
class="br0">&#91;</span><span
class="br0">&#93;</span> = array</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; <span
class="br0">&#40;</span>&#39;format&#39; =&gt; $row<span
class="br0">&#91;</span>&#39;format&#39;<span
class="br0">&#93;</span>,</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp;&#39;name&#39; =&gt; $row<span
class="br0">&#91;</span>&#39;name&#39;<span
class="br0">&#93;</span>,</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp;&#39;URL&#39; =&gt; &quot;index.php/book_format/$id/$book_name&quot;<span
class="br0">&#41;</span>;</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp;&#39;URL&#39; =&gt; &quot;index.php/book_format/$id/$book_name&quot;,</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp;&#39;size&#39; =&gt; round<span
class="br0">&#40;</span> <span
class="br0">&#40;</span>$row<span
class="br0">&#91;</span>&#39;uncompressed_size&#39;<span
class="br0">&#93;</span> / <span
class="nu0">1024</span> / <span
class="nu0">1024</span><span
class="br0">&#41;</span>, <span
class="nu0">2</span><span
class="br0">&#41;</span> . &quot;MB&quot;<span
class="br0">&#41;</span>;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $book<span
class="br0">&#91;</span>&#39;formats&#39;<span
class="br0">&#93;</span> = $fmts;</div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-809</span>,<span
class="nu0">4</span> <span
class="nu0">+810</span>,<span
class="nu0">4</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp;<span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1"><span
class="re7">-?&gt;</span></div></li><li
class="li1"><div
class="de1"><span
class="kw1">\ No newline at end of file</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+?&gt;</span></div></li><li
class="li1"><div
class="de1"><span
class="re3">&#8212; /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/smarty/templates/books_section.tpl <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">19</span>:<span
class="nu0">01.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re4">+++ newTemplates/templates/books_section.tpl <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">12</span>:<span
class="nu0">04.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-15</span>,<span
class="nu0">13</span> <span
class="nu0">+15</span>,<span
class="nu0">13</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
class="br0">&#123;</span><span
class="br0">&#123;</span>if $books<span
class="br0">&#91;</span>book<span
class="br0">&#93;</span>.rating_url<span
class="br0">&#125;</span><span
class="br0">&#125;</span>&lt;br /&gt;<span
class="br0">&#123;</span><span
class="br0">&#123;</span>/if<span
class="br0">&#125;</span><span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;div style=&quot;font-size: &#39;<span
class="nu0">80</span>%&#39;;&quot;&gt;</div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
class="br0">&#123;</span><span
class="br0">&#123;</span>section name=format loop=$books<span
class="br0">&#91;</span>book<span
class="br0">&#93;</span>.formats<span
class="br0">&#125;</span><span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
class="br0">&#123;</span><span
class="br0">&#123;</span>$books<span
class="br0">&#91;</span>book<span
class="br0">&#93;</span>.formats<span
class="br0">&#91;</span>format<span
class="br0">&#93;</span>.format<span
class="br0">&#125;</span><span
class="br0">&#125;</span>&lt;br /&gt;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
class="br0">&#123;</span><span
class="br0">&#123;</span>$books<span
class="br0">&#91;</span>book<span
class="br0">&#93;</span>.formats<span
class="br0">&#91;</span>format<span
class="br0">&#93;</span>.format<span
class="br0">&#125;</span><span
class="br0">&#125;</span> <span
class="br0">&#123;</span><span
class="br0">&#123;</span>$books<span
class="br0">&#91;</span>book<span
class="br0">&#93;</span>.formats<span
class="br0">&#91;</span>format<span
class="br0">&#93;</span>.size<span
class="br0">&#125;</span><span
class="br0">&#125;</span>&lt;br /&gt;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
class="br0">&#123;</span><span
class="br0">&#123;</span>/section<span
class="br0">&#125;</span><span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/div&gt;</div></li></ol></div><h2>Escaping Ampersands</h2><p>Because I&#8217;m a nerd, I believe in making valid HTML.  That means that &amp; should properly be written as &amp;amp;</p><div
class="geshi no diff"><ol><li
class="li1"><div
class="de1"><span
class="re3">&#8212; /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/smarty/templates/index.tpl <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">19</span>:<span
class="nu0">01.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re4">+++ /data/www/calibre/newTemplates/templates/index.tpl <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-19</span> <span
class="nu0">23</span>:<span
class="nu0">31</span>:<span
class="nu0">17.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-6</span>,<span
class="nu0">7</span> <span
class="nu0">+6</span>,<span
class="nu0">7</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp;<span
class="br0">&#123;</span><span
class="br0">&#123;</span>include file=&quot;header.tpl&quot; title=&quot;Home&quot;<span
class="br0">&#125;</span><span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp;&lt;table&gt;&lt;tr&gt;&lt;td&gt;</div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp;&lt;div style=&quot;padding-right: 20px; float: left; width: 200px; font-family: &#39;Arial Rounded MT Bold&#39;;&quot;&gt;</div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &lt;a href=&quot;index.php?m=titles&amp;p=<span
class="nu0">1</span>&quot;&gt;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &lt;/a&gt;&lt;a href=&quot;index.php?m=titles&amp;amp;p=<span
class="nu0">1</span>&quot;&gt;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; &lt;span style=&quot;padding-left:10px&quot;&gt;Titles&lt;/span&gt;&lt;/a&gt;</div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; <span
class="br0">&#91;</span><span
class="br0">&#123;</span><span
class="br0">&#123;</span>$title_count<span
class="br0">&#125;</span><span
class="br0">&#125;</span><span
class="br0">&#93;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp;&lt;/div&gt;</div></li><li
class="li1"><div
class="de1">diff -rupN /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//book_base.php /data/www/calibre/modules//book_base.php</div></li><li
class="li1"><div
class="de1"><span
class="re3">&#8212; /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//book_base.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">19</span>:<span
class="nu0">01.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re4">+++ /data/www/calibre/modules//book_base.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-19</span> <span
class="nu0">23</span>:<span
class="nu0">29</span>:<span
class="nu0">37.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-34</span>,<span
class="nu0">10</span> <span
class="nu0">+34</span>,<span
class="nu0">10</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; // Get the books for page N</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; for <span
class="br0">&#40;</span>$i = min<span
class="br0">&#40;</span>$start, count<span
class="br0">&#40;</span>$books<span
class="br0">&#41;</span><span
class="br0">&#41;</span>; $i &lt; min<span
class="br0">&#40;</span>$end, count<span
class="br0">&#40;</span>$books<span
class="br0">&#41;</span><span
class="br0">&#41;</span>; $i++<span
class="br0">&#41;</span> <span
class="br0">&#123;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;$res<span
class="br0">&#91;</span><span
class="br0">&#93;</span> = $books<span
class="br0">&#91;</span>$i<span
class="br0">&#93;</span>;</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp;$res<span
class="br0">&#91;</span>count<span
class="br0">&#40;</span>$res<span
class="br0">&#41;</span><span
class="nu0">-1</span><span
class="br0">&#93;</span><span
class="br0">&#91;</span>&#39;cover&#39;<span
class="br0">&#93;</span> = &#39;index.php?m=cover&amp;id=&#39; . $books<span
class="br0">&#91;</span>$i<span
class="br0">&#93;</span><span
class="br0">&#91;</span>&#39;id&#39;<span
class="br0">&#93;</span>;</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp;$res<span
class="br0">&#91;</span>count<span
class="br0">&#40;</span>$res<span
class="br0">&#41;</span><span
class="nu0">-1</span><span
class="br0">&#93;</span><span
class="br0">&#91;</span>&#39;cover&#39;<span
class="br0">&#93;</span> = &#39;index.php?m=cover&amp;amp;id=&#39; . $books<span
class="br0">&#91;</span>$i<span
class="br0">&#93;</span><span
class="br0">&#91;</span>&#39;id&#39;<span
class="br0">&#93;</span>;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;if <span
class="br0">&#40;</span>$short_form<span
class="br0">&#41;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; $res<span
class="br0">&#91;</span>count<span
class="br0">&#40;</span>$res<span
class="br0">&#41;</span><span
class="nu0">-1</span><span
class="br0">&#93;</span><span
class="br0">&#91;</span>&#39;details_url&#39;<span
class="br0">&#93;</span> =</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &nbsp;&#39;index.php?m=book&amp;id=&#39; . $books<span
class="br0">&#91;</span>$i<span
class="br0">&#93;</span><span
class="br0">&#91;</span>&#39;id&#39;<span
class="br0">&#93;</span>;</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &nbsp;&#39;index.php?m=book&amp;amp;id=&#39; . $books<span
class="br0">&#91;</span>$i<span
class="br0">&#93;</span><span
class="br0">&#91;</span>&#39;id&#39;<span
class="br0">&#93;</span>;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;books&#39;, $res<span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $p_n_url = &#39;&#39;;</div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-47</span>,<span
class="nu0">7</span> <span
class="nu0">+47</span>,<span
class="nu0">7</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; if <span
class="br0">&#40;</span>$page &gt; <span
class="nu0">1</span><span
class="br0">&#41;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;$smarty-&gt;assign<span
class="br0">&#40;</span>&#39;page_back&#39;, &quot;index.php?<span
class="br0">&#123;</span>$p_n_url<span
class="br0">&#125;</span>p=&quot; . <span
class="br0">&#40;</span>$page<span
class="nu0">-1</span><span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; if <span
class="br0">&#40;</span>$end &lt; count<span
class="br0">&#40;</span>$books<span
class="br0">&#41;</span><span
class="br0">&#41;</span></div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp;$smarty-&gt;assign<span
class="br0">&#40;</span>&#39;page_forw&#39;, &quot;index.php?$p_n_url&amp;p=&quot; . <span
class="br0">&#40;</span>$page<span
class="nu0">+1</span><span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp;$smarty-&gt;assign<span
class="br0">&#40;</span>&#39;page_forw&#39;, &quot;index.php?$p_n_url&amp;amp;p=&quot; . <span
class="br0">&#40;</span>$page<span
class="nu0">+1</span><span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;page&#39;, $page<span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;maxpage&#39;, <span
class="br0">&#40;</span>int<span
class="br0">&#41;</span><span
class="br0">&#40;</span><span
class="br0">&#40;</span>count<span
class="br0">&#40;</span>$books<span
class="br0">&#41;</span><span
class="nu0">-1</span><span
class="br0">&#41;</span>/$config<span
class="br0">&#91;</span>&#39;books_page_count&#39;<span
class="br0">&#93;</span><span
class="br0">&#41;</span><span
class="nu0">+1</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;sortable_fields&#39;, $sortable_fields<span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-56</span>,<span
class="nu0">4</span> <span
class="nu0">+56</span>,<span
class="nu0">4</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;prev_next&#39;, $p_n_array<span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp;<span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1"><span
class="re7">-?&gt;</span></div></li><li
class="li1"><div
class="de1"><span
class="kw1">\ No newline at end of file</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+?&gt;</span></div></li><li
class="li1"><div
class="de1">diff -rupN /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//category.php /data/www/calibre/modules//category.php</div></li><li
class="li1"><div
class="de1"><span
class="re3">&#8212; /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//category.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">19</span>:<span
class="nu0">01.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re4">+++ /data/www/calibre/modules//category.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-19</span> <span
class="nu0">23</span>:<span
class="nu0">26</span>:<span
class="nu0">57.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-34</span>,<span
class="nu0">17</span> <span
class="nu0">+34</span>,<span
class="nu0">17</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; // item has a rating. Include the URL to display it.</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; $items<span
class="br0">&#91;</span><span
class="br0">&#93;</span> = array<span
class="br0">&#40;</span>&#39;icon&#39; =&gt; get_icon_path<span
class="br0">&#40;</span>$v-&gt;category, $db<span
class="br0">&#41;</span>,</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &#39;name&#39; &nbsp; =&gt; $v-&gt;name,</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &#39;href&#39; &nbsp; =&gt; &quot;index.php?m=catval&amp;id=$v-&gt;id&amp;p=<span
class="nu0">1</span>&amp;&amp;cat=&quot; .</span></div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlencode<span
class="br0">&#40;</span>$v-&gt;category<span
class="br0">&#41;</span> . &#39;&amp;v=&#39; . urlencode<span
class="br0">&#40;</span>$v-&gt;name<span
class="br0">&#41;</span>,</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &#39;href&#39; &nbsp; =&gt; &quot;index.php?m=catval&amp;amp;id=$v-&gt;id&amp;amp;p=<span
class="nu0">1</span>&amp;amp;cat=&quot; .</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlencode<span
class="br0">&#40;</span>$v-&gt;category<span
class="br0">&#41;</span> . &#39;&amp;amp;v=&#39; . urlencode<span
class="br0">&#40;</span>$v-&gt;name<span
class="br0">&#41;</span>,</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &#39;count&#39; &nbsp;=&gt; $v-&gt;count,</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &#39;rating&#39; =&gt; &quot;index.php?m=rating&amp;r=&quot; . round<span
class="br0">&#40;</span>$v-&gt;avg_rating, <span
class="nu0">2</span><span
class="br0">&#41;</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &#39;rating&#39; =&gt; &quot;index.php?m=rating&amp;amp;r=&quot; . round<span
class="br0">&#40;</span>$v-&gt;avg_rating, <span
class="nu0">2</span><span
class="br0">&#41;</span></span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;<span
class="br0">&#125;</span> else <span
class="br0">&#123;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; $items<span
class="br0">&#91;</span><span
class="br0">&#93;</span> = array<span
class="br0">&#40;</span>&#39;icon&#39; =&gt; get_icon_path<span
class="br0">&#40;</span>$v-&gt;category, $db<span
class="br0">&#41;</span>,</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &#39;name&#39; &nbsp; =&gt; $v-&gt;name,</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &#39;href&#39; &nbsp; =&gt; &quot;index.php?m=catval&amp;id=$v-&gt;id&amp;p=<span
class="nu0">1</span>&amp;cat=&quot; .</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &#39;href&#39; &nbsp; =&gt; &quot;index.php?m=catval&amp;amp;id=$v-&gt;id&amp;amp;p=<span
class="nu0">1</span>&amp;amp;cat=&quot; .</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; urlencode<span
class="br0">&#40;</span>$v-&gt;category<span
class="br0">&#41;</span> .</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;&amp;v=&#39; . urlencode<span
class="br0">&#40;</span>$v-&gt;name<span
class="br0">&#41;</span>,</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;&amp;amp;v=&#39; . urlencode<span
class="br0">&#40;</span>$v-&gt;name<span
class="br0">&#41;</span>,</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &#39;count&#39; &nbsp;=&gt; $v-&gt;count</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;<span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-60</span>,<span
class="nu0">4</span> <span
class="nu0">+60</span>,<span
class="nu0">4</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; $mod = new DoCategory<span
class="br0">&#40;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1"><span
class="re7">-?&gt;</span></div></li><li
class="li1"><div
class="de1"><span
class="kw1">\ No newline at end of file</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+?&gt;</span></div></li><li
class="li1"><div
class="de1">diff -rupN /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//catval.php /data/www/calibre/modules//catval.php</div></li><li
class="li1"><div
class="de1"><span
class="re3">&#8212; /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//catval.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">19</span>:<span
class="nu0">01.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re4">+++ /data/www/calibre/modules//catval.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-19</span> <span
class="nu0">23</span>:<span
class="nu0">29</span>:<span
class="nu0">01.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-44</span>,<span
class="nu0">7</span> <span
class="nu0">+44</span>,<span
class="nu0">7</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;category_name&#39;, $fm = $db-&gt;fm-&gt;name_for<span
class="br0">&#40;</span>$cat<span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;category_value&#39;, $_REQUEST<span
class="br0">&#91;</span>&#39;v&#39;<span
class="br0">&#93;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;up_url&#39;, &quot;index.php?m=category&amp;id=$id&amp;cat=&quot;.urlencode<span
class="br0">&#40;</span>$cat<span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; $smarty-&gt;assign<span
class="br0">&#40;</span>&#39;up_url&#39;, &quot;index.php?m=category&amp;amp;id=$id&amp;amp;cat=&quot;.urlencode<span
class="br0">&#40;</span>$cat<span
class="br0">&#41;</span><span
class="br0">&#41;</span>;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp;<span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp;function template<span
class="br0">&#40;</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-53</span>,<span
class="nu0">4</span> <span
class="nu0">+53</span>,<span
class="nu0">4</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp;</div></li><li
class="li1"><div
class="de1">&nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; $mod = new DoCatval<span
class="br0">&#40;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1"><span
class="re7">-?&gt;</span></div></li><li
class="li1"><div
class="de1"><span
class="kw1">\ No newline at end of file</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+?&gt;</span></div></li><li
class="li1"><div
class="de1">diff -rupN /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//home.php /data/www/calibre/modules//home.php</div></li><li
class="li1"><div
class="de1"><span
class="re3">&#8212; /data/web/calibre_php_server-V0<span
class="nu0">.2</span><span
class="nu0">.7</span>/modules//home.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-20</span> <span
class="nu0">10</span>:<span
class="nu0">19</span>:<span
class="nu0">01.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re4">+++ /data/www/calibre/modules//home.php <span
class="nu0">2011</span><span
class="nu0">-11</span><span
class="nu0">-19</span> <span
class="nu0">23</span>:<span
class="nu0">25</span>:<span
class="nu0">53.000000000</span> <span
class="nu0">+0000</span></span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-21</span>,<span
class="nu0">7</span> <span
class="nu0">+21</span>,<span
class="nu0">7</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;$m = $db-&gt;fm-&gt;metadata_for<span
class="br0">&#40;</span>$k<span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp;$items<span
class="br0">&#91;</span><span
class="br0">&#93;</span> = array<span
class="br0">&#40;</span> &#39;icon&#39; =&gt; get_icon_path<span
class="br0">&#40;</span>$k, $db<span
class="br0">&#41;</span>,</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;name&#39; =&gt; $m<span
class="br0">&#91;</span>&#39;name&#39;<span
class="br0">&#93;</span>,</div></li><li
class="li1"><div
class="de1"><span
class="re7">- &nbsp; &nbsp; &nbsp; &nbsp; &#39;href&#39; =&gt; &quot;index.php?m=category&amp;cat=&quot; . urlencode<span
class="br0">&#40;</span>$k<span
class="br0">&#41;</span>,</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+ &nbsp; &nbsp; &nbsp; &nbsp; &#39;href&#39; =&gt; &quot;index.php?m=category&amp;amp;cat=&quot; . urlencode<span
class="br0">&#40;</span>$k<span
class="br0">&#41;</span>,</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;count&#39;=&gt; count<span
class="br0">&#40;</span>$v<span
class="br0">&#41;</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1"><span
class="re6">@@ <span
class="nu0">-34</span>,<span
class="nu0">4</span> <span
class="nu0">+34</span>,<span
class="nu0">4</span> @@</span></div></li><li
class="li1"><div
class="de1">&nbsp; &nbsp;<span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; <span
class="br0">&#125;</span></div></li><li
class="li1"><div
class="de1">&nbsp; $mod = new DoHome<span
class="br0">&#40;</span><span
class="br0">&#41;</span>;</div></li><li
class="li1"><div
class="de1"><span
class="re7">-?&gt;</span></div></li><li
class="li1"><div
class="de1"><span
class="kw1">\ No newline at end of file</span></div></li><li
class="li1"><div
class="de1"><span
class="re8">+?&gt;</span></div></li><li
class="li1"><div
class="de1"><span
class="re1">&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</span></div></li></ol></div><h2>More</h2><p>Both patches should be <a
href="http://www.mobileread.com/forums/showthread.php?p=1841018#post1841018">in the official version soon</a>.  More to come!</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4807&amp;md5=df00caa3aeadf477f4f7d139380a9390" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/11/calibre-php-patches/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4807&amp;md5=df00caa3aeadf477f4f7d139380a9390" type="text/html" /> </item> <item><title>Installing Calibre PHP</title><link>http://shkspr.mobi/blog/index.php/2011/11/installing-calibre-php/</link> <comments>http://shkspr.mobi/blog/index.php/2011/11/installing-calibre-php/#comments</comments> <pubDate>Tue, 22 Nov 2011 11:56:20 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[books]]></category> <category><![CDATA[calibre]]></category> <category><![CDATA[dropbox]]></category> <category><![CDATA[ebooks]]></category> <category><![CDATA[php]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=4802</guid> <description><![CDATA[(These are mostly notes to myself!) I love Calibre, it&#8217;s the perfect eBook management tool. It comes with a built in WWW server so you can easily access your library on the go. The only problem is that this really only works if you have a single machine dedicated to Calibre. For various reasons, I <a
href='http://shkspr.mobi/blog/index.php/2011/11/installing-calibre-php/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>(These are mostly notes to myself!)</p><p>I love Calibre, it&#8217;s the perfect eBook management tool.  It comes with a built in WWW server so you can easily access your library on the go. The only problem is that this really only works if you have a single machine dedicated to Calibre.  For various reasons, I don&#8217;t have a single machine.</p><p>I have a desktop, laptop, and server.  The Calibre Library is just a database with a set of files and folders &#8211; so all three machines sync via DropBox.  As long as I don&#8217;t have the Calibre program open on my desktop and laptop at the same time, everything is hunky-dory.</p><p>However, having Calibre running on the server buggers everything up.  So, I&#8217;m using a separate program &#8211; <a
href="http://charles.the-haleys.org/calibre/">Calibre-PHP Content Server</a>.</p><p><img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/11/calibre-php.png" alt="" title="calibre php" width="469" height="341" class="aligncenter size-full wp-image-4804" /></p><p>Installation was relatively simple, assuming you&#8217;ve already got apache and PHP installed, you&#8217;ll also need GD, SQLite3, and Smarty.</p><p>This was how I installed them on Ubuntu</p><pre>
sudo apt-get install smarty php5-gd php5-sqlite php5-sqlite3sqlite3
</pre><p>Configuration is slightly confusing.  Copy the config_default.php to config_local.php and edit it.<br
/> <code><br
/> $config['library_dir'] = '/data/Dropbox/eBooks/Calibre Library';<br
/> $config['smarty_dir'] = '/data/smarty-cache';<br
/> $config['smarty'] = '/usr/share/php/smarty';<br
/> </code></p><p>The library directory must be readable to the webserver (chmod a+r) and all the directories above it have to be searchable (chmod a+x).</p><p>The &#8220;smarty_dir&#8221; is where the cache is stored. It needs two sub-folders, smarty_cache and smarty_templates_c. Both of these directories must be writable by the webserver.</p><p>That <em>should</em> be it.  There&#8217;s help available at the <a
href="http://www.mobileread.com/forums/showthread.php?t=104188">official help thread</a>.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4802&amp;md5=ab2157f11a58c8096e1a2997436b305d" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/11/installing-calibre-php/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4802&amp;md5=ab2157f11a58c8096e1a2997436b305d" type="text/html" /> </item> <item><title>Linux support for the AuthenTec AES2810</title><link>http://shkspr.mobi/blog/index.php/2011/11/linux-support-for-the-authentec-aes2810/</link> <comments>http://shkspr.mobi/blog/index.php/2011/11/linux-support-for-the-authentec-aes2810/#comments</comments> <pubDate>Sat, 12 Nov 2011 08:00:13 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[authentec]]></category> <category><![CDATA[hardware]]></category> <category><![CDATA[nablopomo]]></category> <category><![CDATA[open source]]></category> <category><![CDATA[thinkpad]]></category> <category><![CDATA[ubuntu]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=4557</guid> <description><![CDATA[Every so often I find a device which &#8211; inexplicably &#8211; doesn&#8217;t include Linux support. I&#8217;ve been very impressed with how well Ubuntu runs on the Lenovo ThinkPad X200. Everything worked out of the box &#8211; with the exception of the fingerprint reader (AuthenTec AES2810). Now, I know that fingerprint readers can easily be defeated <a
href='http://shkspr.mobi/blog/index.php/2011/11/linux-support-for-the-authentec-aes2810/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>Every so often I find a device which &#8211; inexplicably &#8211; doesn&#8217;t include Linux support.</p><p>I&#8217;ve been very impressed with how well <a
href="http://www.thinkwiki.org/wiki/ThinkWiki">Ubuntu runs on the Lenovo ThinkPad X200</a>. Everything worked out of the box &#8211; with the exception of the fingerprint reader (AuthenTec AES2810).</p><p>Now, I know that <a
href="http://www.zdnet.com.au/jelly-babies-dupe-fingerprint-security-120265318.htm">fingerprint readers can easily be defeated by jelly-babies</a>, but it annoys me when something doesn&#8217;t work.</p><p>The manufacturer of the fingerprint reader has a <a
href="http://developers.authentec.com/">great developer community</a>, so I contacted them.  Here&#8217;s their response:</p><blockquote><p>Linux support for AES devices is not yet available.</p><p>But based on the increasing number of requests we are currently considering to release the technical specification to the Linux community to be able to integrate selected AES sensor devices to the Open Source projects.</p><p>We still need to finalize the related discussions with our legal team regarding NDA requirement for the particular developers and clarify all remaining concerns.</p><p>I will make a note to let you know once we come to a conclusion and will be ready to move forward.</p><p>Another plan is to extend our BSAPI SDK (currently supporting our TC devices under Windows/Linux/Mac) with AES devices support. The BSAPI is available for free download in it&#8217;s Lite version.</p></blockquote><p>However, it&#8217;s not all good news:</p><blockquote><p>since it is hard to predict how exactly and when we will decide to provide the support at the end I would suggest to be careful when blogging about it to avoid false expectations in the community.</p></blockquote><p>I realise that Linux is currently a niche OS &#8211; but lack of open software support is a serious omission from any hardware manufacturer.  I learned this to my cost when Creative stopped supporting the Hollywood DXR3 card &#8211; it was a cracking bit of hardware, but Creative decided that they didn&#8217;t care about pissing off customers who had Windows XP.</p><p>If a hardware manufacturer won&#8217;t allow you to use their hardware with any software you choose &#8211; guess what; it&#8217;s not your hardware.  You may have thought you bought it from them, but you didn&#8217;t. You are only renting it until they decide they no longer want to support you.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4557&amp;md5=d10ed6eb8a2b544d3ca2e66f58a873a3" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/11/linux-support-for-the-authentec-aes2810/feed/</wfw:commentRss> <slash:comments>4</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4557&amp;md5=d10ed6eb8a2b544d3ca2e66f58a873a3" type="text/html" /> </item> <item><title>Fixing Spotify In Wine &#8211; Remove Facebook</title><link>http://shkspr.mobi/blog/index.php/2011/11/fixing-spotify-in-wine-remove-facebook/</link> <comments>http://shkspr.mobi/blog/index.php/2011/11/fixing-spotify-in-wine-remove-facebook/#comments</comments> <pubDate>Sat, 05 Nov 2011 08:00:03 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[facebook]]></category> <category><![CDATA[spotify]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[wine]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=4611</guid> <description><![CDATA[For the last few weeks I&#8217;ve been unable to run Spotify in Linux using WINE. I was continually getting a crash with this error message: Unhandled page fault on read access to 0x00000068 at address 0x7bc34e57 After lots of fruitless digging around, I discovered that the issue is with the Facebook integration! The fix is <a
href='http://shkspr.mobi/blog/index.php/2011/11/fixing-spotify-in-wine-remove-facebook/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>For the last few weeks I&#8217;ve been unable to run Spotify in Linux using WINE.  I was continually getting a crash with this error message:</p><pre>Unhandled page fault on read access to 0x00000068 at address 0x7bc34e57</pre><p>After lots of fruitless digging around, I discovered that the issue is with the Facebook integration!</p><p>The fix is simple.  Visit the <a
href="https://www.facebook.com/settings?tab=applications">Facebook Applications Page</a>, remove Spotify.</p><p>I&#8217;ve noted this error on <a
href="http://appdb.winehq.org/objectManager.php?sClass=version&#038;iId=24444">the WINE Site</a>.</p><p>If you&#8217;re a premium Spotify user, you can run their <a
href="https://www.spotify.com/uk/download/previews/">Linux Preview of Spotify</a></p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4611&amp;md5=23454a009ad6acc994efc9ee584e01d6" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/11/fixing-spotify-in-wine-remove-facebook/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4611&amp;md5=23454a009ad6acc994efc9ee584e01d6" type="text/html" /> </item> <item><title>Review: Evoluent Vertical Mouse 4 (and how to make it work in Ubuntu)</title><link>http://shkspr.mobi/blog/index.php/2011/06/review-evoluent-vertical-mouse-4-and-how-to-make-it-work-in-ubuntu/</link> <comments>http://shkspr.mobi/blog/index.php/2011/06/review-evoluent-vertical-mouse-4-and-how-to-make-it-work-in-ubuntu/#comments</comments> <pubDate>Sat, 18 Jun 2011 16:53:42 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[/etc/]]></category> <category><![CDATA[ergonomic]]></category> <category><![CDATA[evoluent]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[mouse]]></category> <category><![CDATA[mouse buttons]]></category> <category><![CDATA[review]]></category> <category><![CDATA[ubuntu]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=4161</guid> <description><![CDATA[The Evoluent Vertical Mouse 4 costs close to £100. Let&#8217;s get that out of the way. This is a pretty expensive mouse. Considering they give away basic USB mice with cornflakes, why would anyone spend the cost of a Kindle on a pointing device? Let me explain&#8230; &#8220;The two things you&#8217;ve got to spend your <a
href='http://shkspr.mobi/blog/index.php/2011/06/review-evoluent-vertical-mouse-4-and-how-to-make-it-work-in-ubuntu/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>The <a
href="http://evoluent.com/vm4r.htm">Evoluent Vertical Mouse 4</a> costs close to <a
href="http://www.amazon.co.uk/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.co.uk%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb_sb_noss%26y%3D0%26field-keywords%3Devoluent%26url%3Dsearch-alias%253Daps%23%3Furl%3Dsearch-alias%3Daps&#038;tag=shkspr-21&#038;linkCode=ur2&#038;camp=1634&#038;creative=19450">£100</a><img
src="https://www.assoc-amazon.co.uk/e/ir?t=shkspr-21&#038;l=ur2&#038;o=2" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  Let&#8217;s get that out of the way.  This is a pretty expensive mouse.  Considering they give away basic USB mice with cornflakes, why would anyone spend the cost of a Kindle on a pointing device?</p><p>Let me explain&#8230;</p><blockquote><p>&#8220;The two things you&#8217;ve got to spend your money on in life are your bed and your shoes; if you&#8217;re not in one, you&#8217;re in the other.&#8221;<br
/> Ancient proverb</p></blockquote><p>I have been prone to RSI in my hands and wrists.  Seeing as I make my living using my hands to make computers do magical things, I think it&#8217;s wise to spend money to protect my hands.</p><blockquote><p>&#8220;The two peripherals you&#8217;ve got to spend your money on in life are your keyboard and your mouse; if your hands aren&#8217;t on one, they&#8217;re on the other.&#8221;<br
/> Terence Eden</p></blockquote><p>I may detail my love of my keyboard &#8211; the Microsoft 4000 &#8211; in another post.  For now, let&#8217;s talk mice!<br
/> <a
href="http://www.evoluent.com/hi-res.htm"><img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/Evoluent-Vertical-Mouse-4.jpg" alt="Evoluent Vertical Mouse 4" title="Evoluent Vertical Mouse 4" width="512" height="412" class="aligncenter size-full wp-image-4171" /></a><br
/> Or, skip straight to the <a
href="#linux">Linux install instructions</a>.<br
/> <span
id="more-4161"></span></p><h2>Three Generations of Mice</h2><p>I&#8217;m in love with the <a
href="http://www.evoluent.com/">Evoluent Vertical Mouse</a>.  I got my first (the generation 2) in 2007. A few years later I got a 3rd generation so I could use one at home and one at work.<br
/> Enter the 4th generation &#8211; the VM4R.  There&#8217;s a <a
href="http://evoluent.com/vm4l.htm">VM4L</a> for those sinister south-paws, and a <a
href="http://evoluent.com/vm4s.htm">VM4S</a> for those with smaller hands.</p><p>Here&#8217;s all three of my mice playing together.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/3-mice.jpg" alt="3 mice" title="3 mice" width="512" height="489" class="aligncenter size-full wp-image-4195" /><br
/> The VM4R is similar in size and shape to the previous versions.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/3-in-a-row.jpg" alt="3 in a row" title="3 in a row" width="512" height="268" class="aligncenter size-full wp-image-4194" /><br
/> It has a wider base and a larger lip to stop your finger from dragging along the desk.</p><h2>Unboxing</h2><p>No tech review is complete without an unboxing.  Here&#8217;s mine.<br
/> <br
/> Impressively, Evoluent use &#8220;environmentally-responsible&#8221; packaging.  Essentially a cardboard box and some bubble wrap.  I was nervous that this wouldn&#8217;t be enough to protect it in transit &#8211; but the mouse is pretty tough.<br
/> The box contains some brief instructions and a mini-cd containing <a
href="http://www.evoluent.com/download.htm">Windows drivers</a>.</p><h2>The Good</h2><p>There&#8217;s just <em>so much</em> to love about this mouse!  I&#8217;ll contain myself to a few points.</p><h3>Vertical = Less Pain</h3><p>Pain and comfort are subjective.  But since using the Vertical Mouse range, my wrists have been free of pain.<br
/> There are <a
href="http://evoluent.com/user_reviews.htm">a vast number of reviews on the Evoluent website</a>, including this one:</p><blockquote><p>&#8220;The vertical mouse received very good feedback from the product testing. Our product testing team of physical therapists, ergonomists, MD&#8217;s and administrators found the mouse to be comfortable, easily adaptable and promoted a neutral wrist/forearm postures.&#8221;<br
/> Greg Ryan, University Health Services, University of California at Berkeley</p></blockquote><p>I can&#8217;t say that this will fix your health problems &#8211; and you should certainly see a doctor immediately if you&#8217;re experiencing RSI &#8211; but this device has bought back the joy of computing for me.</p><h3>Thumb Buttons</h3><p>My index finger is near worn out from 3 decades of clicking crappy mice.  I&#8217;m now able to map the buttons so that my thumb can click.  A lifesaver for me.  As a bonus &#8211; anyone who sits at my desk finds themselves unable to fiddle with anything because they can&#8217;t work out how to click!</p><p>The VM4R now comes with two thumb buttons.  I&#8217;m not sure what use I&#8217;ll put the other one to yet!</p><h3>The Need For Speed</h3><p>The VM4R comes with a dedicated button for switching the speed of the mouse pointer.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/Evoluent-Pointer-Speed.jpg" alt="Evoluent Pointer Speed" title="Evoluent Pointer Speed" width="256" height="480" class="aligncenter size-full wp-image-4182" /><br
/> A simple click sets the speed which can easily be seen via the LEDs.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/Evoluent-Speed-LEDs.jpg" alt="Evoluent Speed LEDs" title="Evoluent Speed LEDs" width="512" height="738" class="aligncenter size-full wp-image-4180" /><br
/> This is a <em>vast</em> improvement on the 3rd gen model where the button was underneath the device.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/Evoluent-3-speed-bottom.jpg" alt="Evoluent 3 speed bottom" title="Evoluent 3 speed bottom" width="256" height="420" class="aligncenter size-full wp-image-4185" /><br
/> The advantage is that you can use a high-speed mouse so you don&#8217;t have to move your wrist or arm very far as you go from one end of the screen to the other.  It also means you can rapidly change to a lower sensitivity when you&#8217;re working on something which needs very fine grained control &#8211; like pushing pixels in Photoshop.   I imagine this mouse is great for gamers who require a fast reacting device.</p><h2>The Bad</h2><p>There&#8217;s very little that I would change with this mouse.  I note three minor quibbles.</p><h3>Scroll Wheel Clicking</h3><p>Scrolling with the wheel makes a really loud clicking sound.  With the 2nd generation mouse there was no clicking.  The third generation lightly clicks as you scroll.  The clicking on the VM4R is loud and, to my fingers, slightly stiff.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/Evoluent-scroll-wheel.jpg" alt="Evoluent scroll wheel" title="Evoluent scroll wheel" width="256" height="237" class="aligncenter size-full wp-image-4183" /><br
/> Personally, I prefer a free-spinning wheel.  But it&#8217;s not the end of the world.</p><h3>Suitability of Chrome</h3><p>Fingers sweat.  It&#8217;s not pretty, but there it is.  Human skin leaks all kinds of gunk &#8211; some of which is corrosive.  I found the surface of my 2nd generation mouse was gently worn away over time.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/worn-thumb.jpg" alt="worn thumb" title="worn thumb" width="512" height="384" class="aligncenter size-full wp-image-4197" /><br
/> The 3rd gen mouse is made from a different material which doesn&#8217;t seem to suffer from this problem.</p><p>The chrome on the VM4R looks lovely &#8211; but I wonder how long it will remain pristine.  It&#8217;s already picking up fingerprints.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/shiney-chrome.jpg" alt="shiney chrome" title="shiney chrome" width="512" height="384" class="aligncenter size-full wp-image-4196" /></p><h3>LED</h3><p>There&#8217;s no way to turn off the glowing Evoluent LED.  I doubt it&#8217;s much of a power drain, but it&#8217;s the sort of thing that might get a bit annoying in the dark.<br
/> <img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/Evoluent-Bight-LED.jpg" alt="Evoluent Bight LED" title="Evoluent Bight LED" width="512" height="656" class="aligncenter size-full wp-image-4179" /></p><h2>&#8230;and The Beautiful</h2><blockquote><p>It looks like a spaceship!</p></blockquote><p>This is a gorgeous mouse.  The lights, the chrome, the shape, all conspire to make it an eye-catcher.  Expect to get lots of questions about it if you&#8217;re in a busy office.</p><h2>Buy It Now</h2><p>I have absolutely no hesitation in recommending the Evoluent line of pointing devices.<br
/> <a
href="http://www.amazon.co.uk/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.co.uk%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb_sb_noss%26y%3D0%26field-keywords%3Devoluent%26url%3Dsearch-alias%253Daps%23%3Furl%3Dsearch-alias%3Daps&#038;tag=shkspr-21&#038;linkCode=ur2&#038;camp=1634&#038;creative=19450">You can buy the Evoluent VM4R from Amazon</a><img
src="https://www.assoc-amazon.co.uk/e/ir?t=shkspr-21&#038;l=ur2&#038;o=2" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> (affiliate link) or <a
href="http://evoluent.com/ergonomic/index.php">directly from Evoluent</a> (although international shipping is expensive).<br
/> The upgrades in VM4R are impressive &#8211; but if you don&#8217;t often need to change pointer speed, or use thumb buttons, buy the VM3.<br
/> <a
name="linux"></a></p><h2>Linux Geekyness</h2><p>The basic mouse functions work automagically in Linux (tested on Ubuntu 9.10 and higher).  The buttons are responsive, the wheel scrolls, changing the pointer speed works, etc.  A point to note is that the the wheel click does not paste &#8211; to get that, you&#8217;ll need to remap the buttons.</p><p>Remapping the buttons is slightly trickier, however.  Not least because of Ubuntu&#8217;s seemingly random changes to how it handles pointing devices.  If you&#8217;re happy with the buttons just as they are, you&#8217;ll be fine.  If you need to remap the buttons due to mobility issues, read on&#8230;.</p><p>A quick &#8220;xinput list&#8221; gives us the device name.</p><pre>"Evoluent VerticalMouse 4"	id=8	[XExtensionPointer]
	Type is MOUSE
	Num_buttons is 14
	Num_axes is 2
	Mode is Relative
	Motion_buffer is 256</pre><p>Despite reporting 14 buttons, there are only 6 physical buttons available.<br
/> Running</p><pre>xinput query-state "Evoluent VerticalMouse 4"</pre><p>tells us which buttons are being pressed down.  Here are the results (the brackets signify the action, if any, that happens when you click the button).</p><ol><li>Index Finger (Left click)</li><li>Ring Finger (Middle click)</li><li>Little Finger (Right click)</li><li>Scroll Up</li><li>Scroll Down</li><li>-</li><li>-</li><li>Top Thumb</li><li>Wheel Click</li><li>Bottom Thumb</li><li>-</li><li>-</li><li>-</li><li>-</li></ol><p><img
src="http://shkspr.mobi/blog/wp-content/uploads/2011/06/Evoluent-Labeled-Buttons.jpg" alt="Evoluent Labeled Buttons" title="Evoluent Labeled Buttons" width="256" height="284" class="aligncenter size-full wp-image-4186" /></p><h3>Remapping The Buttons</h3><p>There are two ways of remapping buttons.  The lazy way and the correct way.</p><h4>The &#8220;Lazy Way&#8221; &#8211; xinput</h4><p>We can use <a
href="http://www.digipedia.pl/man/doc/view/xinput.1x/">xinput</a> to set which buttons do what.  The command is pretty simple</p><pre>xinput set-button-map "Evoluent VerticalMouse 4" 1 2 3 4 5 6 7 8 9 10 11 12 13 14
                                      Button 1---| | |
                                        Button 2---| |
                                          Button 3---|
</pre><p>So the first number is what you want Button 1 to do.  So, if you want your index finger to be the wheel-click, and all other buttons to stay the same, the command is</p><pre>xinput set-button-map "Evoluent VerticalMouse 4" 9 2 3 4 5 6 7 8 9 10</pre><p>I like to have my thumb be the clicker, the wheel click paste, my ring finger right click, the index finger and little finger do nothing. So I use</p><pre>xinput set-button-map "Evoluent VerticalMouse 4" 0 3 0 4 5 6 7 1 2</pre><p>You can get that command to ruin at start-up.  Different versions of Linux will do it differently &#8211; <a
href="http://ubuntuforums.org/showthread.php?t=993073">I&#8217;ve detailed some of the ways you can do this in Ubuntu in the forums</a>.</p><h4>The &#8220;Correct Way&#8221; &#8211; Xorg.conf.d</h4><p>Ubuntu has an annoying habit of switching around how you configure the mouse &#8211; and no easy way to configure it graphically!  This method should work on Ubuntu 10.10 and 11.04.</p><p>Running <a
href="http://linuxcommand.org/man_pages/lsusb8.html">lsusb</a> tells us that the USB ID is</p><pre>1a7c:0191</pre><p>Create a new conf file</p><pre>sudo nano /usr/share/X11/xorg.conf.d/90-evoluent.conf</pre><p>Use the following as a template</p><pre>Section "InputClass"
        Identifier      "Evoluent"
        MatchUSBID      "1a7c:0191"
        Option "ButtonMapping" "0 2 3 4 5 6 7 8 1 10 11"
EndSection
</pre><p>Substitute your own USB ID and preferred button mapping.</p><p>Hey presto! Your buttons are mapped.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4161&amp;md5=cf52f1e594d705735215ece2d29808bf" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2011/06/review-evoluent-vertical-mouse-4-and-how-to-make-it-work-in-ubuntu/feed/</wfw:commentRss> <slash:comments>8</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=4161&amp;md5=cf52f1e594d705735215ece2d29808bf" type="text/html" /> </item> <item><title>EXCLUSIVE! Nokia Phones *WILL* Have Android!</title><link>http://shkspr.mobi/blog/index.php/2010/07/exclusive-nokia-phones-will-have-android/</link> <comments>http://shkspr.mobi/blog/index.php/2010/07/exclusive-nokia-phones-will-have-android/#comments</comments> <pubDate>Sat, 24 Jul 2010 09:34:33 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[android]]></category> <category><![CDATA[Apple]]></category> <category><![CDATA[firmware]]></category> <category><![CDATA[google]]></category> <category><![CDATA[iphone]]></category> <category><![CDATA[meego]]></category> <category><![CDATA[n810]]></category> <category><![CDATA[n900]]></category> <category><![CDATA[nitdroid]]></category> <category><![CDATA[nokia]]></category> <category><![CDATA[os]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=2196</guid> <description><![CDATA[Sauntering down Oxford Street, Mauricio Reyes spotted Nokia&#8217;s secret Android plans. Is this just a hapless Photoshop mistake &#8211; or a sign of things to come?!?!?!?! It&#8217;s a daft graphic designer &#8211; obviously. But that doesn&#8217;t mean we shouldn&#8217;t take the possibility of Nokia devices running Android seriously. Oh, don&#8217;t get me wrong, Nokia will <a
href='http://shkspr.mobi/blog/index.php/2010/07/exclusive-nokia-phones-will-have-android/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>Sauntering down Oxford Street, <a
href="http://reyes.posterous.com/spot-the-mistake-three-mobile-poster-on-oxfor">Mauricio Reyes spotted Nokia&#8217;s secret Android plans</a>.</p><div
id="attachment_2197" class="wp-caption aligncenter" style="width: 219px"><a
href="http://shkspr.mobi/blog/wp-content/uploads/2010/07/2010-07-22_13.29.19.jpg"><img
class="size-medium wp-image-2197" title="Nokia phones &quot;running&quot; Android" src="http://shkspr.mobi/blog/wp-content/uploads/2010/07/2010-07-22_13.29.19-209x300.jpg" alt="Nokia phones &quot;running&quot; Android" width="209" height="300" /></a><p
class="wp-caption-text">Nokia phones &quot;running&quot; Android</p></div><p>Is this just a hapless Photoshop mistake &#8211; or a sign of things to come?!?!?!?!<br
/> <span
id="more-2196"></span><br
/> It&#8217;s a daft graphic designer &#8211; obviously.  But that doesn&#8217;t mean we shouldn&#8217;t take the possibility of Nokia devices running Android seriously.  Oh, don&#8217;t get me wrong, Nokia will <em>never</em> ship and Android powered phone &#8211; they&#8217;ve invested too much in Symbian and MeeGo for that.  But Nokia devices will run Android.</p><p>A few years ago, <a
href="http://shkspr.mobi/blog/?p=18">I coaxed my Nokia N810 into running a prototype version of Android</a> &#8211; NitDroid.  The project has been resurrected by <a
href="http://twitter.com/DMonsterProd">Stephen Hyde</a> at <a
href="http://nitdroid.com/" class="broken_link">NITDroid.com</a>.</p><p>This latest video shows the Nokia N900 running Android&#8217;s FroYo.<br
/></p><h2>Why Is This Useful?</h2><p>Nokia coined the term &#8220;Mobile Computer&#8221; for its range of phones.  Computers aren&#8217;t hermetically sealed consumer devices.  They allow the customer to modify both hardware and software.  You would be understandably upset if the computer you bought last year wouldn&#8217;t let you install the latest version of Windows, MacOS, or Linux.  But that&#8217;s the situation mobile phone customers are faced with today.</p><p>The Android G1 has been abandoned by HTC and T-Mobile &#8211; <a
href="http://www.consumingexperience.com/2010/07/nokia-n900-mobile-phone-review-for.html">much to the chagrin of customers</a>.<br
/> The HTC Hero has only been grudgingly updated to Android 2.1.<br
/> Nokia left the N800 and N810 to rot.  Nokia regularly stops development of its &#8220;mobile computer&#8221; software even when the devices are in active use.</p><p>Mobile phone manufacturers exist to sell phones.  They don&#8217;t get any extra revenue for releasing new firmware.  Indeed, the cost of developing, testing, and shipping new firmware is prohibitively expensive.  Not to mention dealing with customer complaints when things inevitably go wrong.</p><p>We are finally in a position to change that mindset.  Hackers (in the original sense of the word) are now able to create custom firmware for new phones.  Take a look at the <a
href="http://forum.xda-developers.com/">XDA Developer Forums</a>.  Almost every Android phone released can have an improved firmware running on it.</p><p>True, a significantly older phone may not have hardware capable of running bleeding edge code &#8211; but it&#8217;s enough to give it a new lease of life.</p><p>I&#8217;d love it if Nokia updated the N95 8GB firmware.  The hardware is still incredibly capable.</p><p>In these tough economic times, it makes perfect sense to focus efforts on software, rather than hardware.</p><p>Look at the PS3 or the Xbox 360.  A single model with firmware updates to increase its functionality.</p><p>Rather than tooling up a factory for a 6 month run of hardware &#8211; phone manufacturers should be looking to keep churning out a limited number of models of high spec phones for <em>years</em>.  As manufacturing efficiencies improve, the hardware becomes cheaper and &#8211; like the PS3 and Xbox &#8211; cheaper models can be produced.</p><p>The PS3 came out in November 2006.  Nearly 4 years ago.  Can you think of a phone released four years ago which is still in production &#8211; let alone receiving firmware updates?  The original iPhone was released in 2007 &#8211; it got a firmware update earlier this year but won&#8217;t be receiving iOS4.  Also, you can&#8217;t buy a new iPhone 2G.  Apple aren&#8217;t in the business of selling inexpensive hardware.</p><h2>The Future</h2><p>I predict &#8211; or rather, I hope &#8211; we will see the following pattern emerge.  Either from Google or Nokia.</p><ul><li>An insanely expensive and over-spec&#8217;d phone will be released.  I expect in the £500 &#8211; £1,000 range.</li><li>A public roadmap for its OS will be released &#8211; new features promised every 3-6 months.</li><li>A guarantee that official firmware development will continue for at least 3 years.</li><li>The OS will be sufficiently open to allow &#8220;homebrew&#8221; firmware to run.  Hackers will jump at it.</li><li>The hardware will sell &#8211; poorly at first.</li><li>As production efficiencies are found, the price will come down.  The hardware capabilities will stay compatible with older models.</li><li>The firmware will progress based upon consumer need, manufacturer desire and what hackers manage to achieve.</li><li>At around the 18 month mark, major new features in the firmware will be announced.  This keeps the MNO happy as they don&#8217;t have to subsidise the cost of new hardware for customers coming to the end of their contracts.</li><li>At the 2 year mark, the next hardware revision will be launched.  More memory and megapixels &#8211; cheaper price.</li><li>If the hardware is still selling, expect others to follow.</li></ul><p>The fly in the ointment for this is continuous manufacturer profitability.  Apple, I understand, gets a cut of call and text revenue.  Google gets a cut of apps sold.  Microsoft and Sony sell licences for releasing games on their platform.</p><p>Would this &#8220;super phone&#8221; have to sell firmware updates?  Would MNOs subsidise firmware rather than hardware?  Would customers part-exchange  an unfashionably old phone for the latest model?</p><p>Or will we be stuck with phones that are thrown on the scrap-heap by their creator in order to force us into buying the latest model?</p><p>One thing&#8217;s for certain.  Where there are hackers &#8211; there will always be updates.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=2196&amp;md5=f0e1ea23f2b8332c0dd004290f3c9f48" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2010/07/exclusive-nokia-phones-will-have-android/feed/</wfw:commentRss> <slash:comments>6</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=2196&amp;md5=f0e1ea23f2b8332c0dd004290f3c9f48" type="text/html" /> </item> <item><title>iplayer-dl on Xbox Xebian</title><link>http://shkspr.mobi/blog/index.php/2010/04/iplayer-dl-on-xbox-xebian/</link> <comments>http://shkspr.mobi/blog/index.php/2010/04/iplayer-dl-on-xbox-xebian/#comments</comments> <pubDate>Sun, 11 Apr 2010 09:58:46 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[iplayer]]></category> <category><![CDATA[iplayer-dl]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[xebian]]></category> <category><![CDATA[xNAS]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=1992</guid> <description><![CDATA[I&#8217;m a huge fan of Paul Battley&#8217;s iplayer-dl. In brief, it downloads videos from iPlayer by pretending to be an iPhone. The .MP4 files it grabs are suitable for playback on most mobile devices (480 x 272 and stereo audio). It also downloads radio programmes as .MP3 files. I was having a bit of trouble <a
href='http://shkspr.mobi/blog/index.php/2010/04/iplayer-dl-on-xbox-xebian/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>I&#8217;m a huge fan of Paul Battley&#8217;s <a
href="http://po-ru.com/projects/iplayer-downloader/">iplayer-dl</a>.  In brief, it downloads videos from iPlayer by pretending to be an iPhone.  The .MP4 files it grabs are suitable for playback on most mobile devices (480 x 272 and stereo audio).  It also downloads radio programmes as .MP3 files.</p><p>I was having a bit of trouble installing it on my <a
href="http://shkspr.mobi/blog/index.php/2008/11/building-the-ultimate-xbox-server/">XNAS</a> &#8211; running <a
href="http://www.xbox-linux.org/wiki/Xebian_HOWTO" class="broken_link">Xebian Linux</a>, so I&#8217;ve written this as an <em>aide-mémoire</em>.  I hope you find it useful.</p><p>Install Ruby and Ruby Gems</p><pre>apt-get install ruby rubygems
</pre><p>Download and install the latest version of <a
href="http://rubygems.org/gems/rake">Rake</a></p><pre>wget http://rubygems.org/downloads/rake-0.8.7.gem
gem install rake
</pre><p>Download and install the latest version of <a
href="http://rubygems.org/gems/mocha">Mocha</a></p><pre>wget http://rubygems.org/downloads/mocha-0.9.8.gem
gem install mocha-0.9.8.gem
</pre><p>Download and install the latest version of <a
href="http://rubygems.org/gems/iplayer-dl">iplayer-dl</a></p><pre>wget http://rubygems.org/downloads/iplayer-dl-0.1.19.gem
gem install iplayer-dl-0.1.19.gem </pre><p>Done!</p><p>To download a show,</p><pre>iplayer-dl [pid]</pre><p>To find the pid, visit an iPlayer page like</p><pre>http://www.bbc.co.uk/iplayer/episode/b00s0vs1/Doctor_Who_Confidential_Series_5_All_about_the_Girl/</pre><p>The pid is the weird string of letters and numbers before the episode name.  So, in this case, to download the video, you just type</p><pre>iplayer-dl b00s0vs1</pre><p>If you want to download several files using only one command, you would type</p><pre>iplayer-dl b00s0vs1 b123abc bdef456</pre><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=1992&amp;md5=5f286e915004afde6cf04601f73a0a14" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2010/04/iplayer-dl-on-xbox-xebian/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=1992&amp;md5=5f286e915004afde6cf04601f73a0a14" type="text/html" /> </item> <item><title>Microsoft&#8217;s New Marketing Campaign</title><link>http://shkspr.mobi/blog/index.php/2009/12/microsofts-new-marketing-campaign/</link> <comments>http://shkspr.mobi/blog/index.php/2009/12/microsofts-new-marketing-campaign/#comments</comments> <pubDate>Wed, 09 Dec 2009 13:07:44 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[badvertising]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[advertising]]></category> <category><![CDATA[BSOD]]></category> <category><![CDATA[cbs]]></category> <category><![CDATA[crash]]></category> <category><![CDATA[microsoft]]></category> <category><![CDATA[tfl]]></category> <category><![CDATA[ThisIsBroken]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=1340</guid> <description><![CDATA[I wander around the world in a perpetual state of confusion. Why is the world the way it is? Why do people make bad decisions? Why &#8211; when there are so many better alternatives &#8211; do people choose the worst of all possible worlds? Rather than getting bogged down in philosophy, I refer to the <a
href='http://shkspr.mobi/blog/index.php/2009/12/microsofts-new-marketing-campaign/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>I wander around the world in a perpetual state of confusion.  Why is the world the way it is?  Why do people make bad decisions?  Why &#8211; when there are so many better alternatives &#8211; do people choose the worst of all possible worlds?</p><p>Rather than getting bogged down in philosophy, I refer to the reason people choose Microsoft Windows to do anything public facing.</p><p><a
title="Broken Windows Advertising Screens on the Tube by terenceeden, on Flickr" href="http://www.flickr.com/photos/edent/4155903292/"><img
src="http://farm3.static.flickr.com/2636/4155903292_a62635f3c1.jpg" alt="Broken Windows Advertising Screens on the Tube" width="500" height="334" /></a></p><p>Advertisers obviously care enough about their message to craft 30 second videos, they invest millions on infrastructure to support showing them.  Then they take a totally unsuitable and unstable method for playing them back &#8211; why?</p><p><a
title="Broken Windows Advertising Screens on the Tube by terenceeden, on Flickr" href="http://www.flickr.com/photos/edent/4155141169/"><img
src="http://farm3.static.flickr.com/2765/4155141169_cb33242122.jpg" alt="Broken Windows Advertising Screens on the Tube" width="500" height="334" /></a></p><p>It&#8217;s a phenomena I repeatedly see.  Advertising screens around the world which are really only displaying one message.</p><p><a
title="12122007046 by terenceeden, on Flickr" href="http://www.flickr.com/photos/edent/2104834677/"><img
src="http://farm3.static.flickr.com/2164/2104834677_f4a125b487.jpg" alt="12122007046" width="375" height="500" /></a></p><p>They&#8217;re saying &#8220;Windows &#8211; The Worst Way To Get Your Message Across&#8221;.</p><p>However, it&#8217;s not just Windows which has the problem &#8211; each of these three photos show a PC which has failed to <a
href="http://en.wikipedia.org/wiki/Power-on_self-test">POST</a> correctly.  So they are stuck &#8211; forever displaying their inadequacies to thousands of passers-by.  (Click to embiggen)</p><p><a
title="The *real* reason the Bakerloo line was suspended this morning! on Twitpic" href="http://twitpic.com/1nx9t"><img
src="http://twitpic.com/show/thumb/1nx9t.jpg" alt="The *real* reason the Bakerloo line was suspended this morning! on Twitpic" width="150" height="150" /></a><a
title="CBS advertising @ Waterloo, FAIL yet again #ThisIsBroken on Twitpic" href="http://twitpic.com/1oku6"><img
src="http://twitpic.com/show/thumb/1oku6.jpg" alt="CBS advertising @ Waterloo, FAIL yet again #ThisIsBroken on Twitpic" width="150" height="150" /></a><a
title="&quot;Disk Error. Press Any Key To Continue&quot; this advertising scre... on Twitpic" href="http://twitpic.com/14rp5"><img
src="http://twitpic.com/show/thumb/14rp5.jpg" alt="&quot;Disk Error. Press Any Key To Continue&quot; this advertising scre... on Twitpic" width="150" height="150" /></a></p><p>My real rant isn&#8217;t about Windows &#8211; it&#8217;s about the design and thinking behind such advertising screens.  It would appear that each screen is driven by its own PC.  What madness!  The cost of hardware &#8211; let alone software &#8211; must be phenomenal.</p><p>At the moment, each screen displays exactly the same content as its neighbour.  There&#8217;s no reason why a single computer couldn&#8217;t be used to drive all the screens.</p><p>I say exactly the same &#8211; the screens get progressively out of sync as the day goes on.  Presumably the separate PCs don&#8217;t communicate with one and other.</p><p>The next thing that bothers me is the use of Windows.</p><p>These screens aren&#8217;t using an embedded version of Windows &#8211; they&#8217;re using XP.  Now, XP is a fine OS &#8211; but it is bloated in terms of what is needed. All that is needed is a small embedded device which can be loaded with video files and set to play back.</p><p>It doesn&#8217;t need a desktop OS.  It doesn&#8217;t need anything more complicated than a display, video codecs and an Ethernet port.  This is the sort of thing for which Linux is perfect.</p><p>So, why?  Why has this system been allowed to develop?  Every day I see another screen which is broken, out of sync, or crashed.  Why has such a fragile and expensive solution become so prevalent?</p><p>The majority of these photos show <a
href="http://www.tfl.gov.uk/businessandpartners/commercialopportunities/5559.aspx" class="broken_link">TFL advertising screens</a> managed by <a
href="http://www.cbsoutdoor.co.uk/">CBS Outdoor</a>.  I really do wonder if they ever wander through the tube and see what a shoddy experience they are delivering.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=1340&amp;md5=deeae1c855e8b464632709e62d951fe7" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2009/12/microsofts-new-marketing-campaign/feed/</wfw:commentRss> <slash:comments>3</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=1340&amp;md5=deeae1c855e8b464632709e62d951fe7" type="text/html" /> </item> <item><title>Armadillo Roll &#8211; Open GL Game for Android</title><link>http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/</link> <comments>http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/#comments</comments> <pubDate>Tue, 28 Jul 2009 12:23:51 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[3d]]></category> <category><![CDATA[android]]></category> <category><![CDATA[games]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=318</guid> <description><![CDATA[Feast your eyes on these beauties. Amarillo Roll is a 3D game in the same style as Super Monkey Ball. You tip your phone to move the armadillo around the course. The graphics are stunning. Reminiscent of early Xbox games. The one thing the photos don&#8217;t do is convey the speed of gameplay &#8211; it&#8217;s <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>Feast your eyes on these beauties.</p><p>Amarillo Roll is a 3D game in the same style as Super Monkey Ball.  You tip your phone to move the armadillo around the course.  The graphics are stunning. Reminiscent of early Xbox games. The one thing the photos don&#8217;t do is convey the speed of gameplay &#8211; it&#8217;s fast!</p><a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar1/' title='ar1'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar1-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar1" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar2/' title='ar2'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar2-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar2" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar3/' title='ar3'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar3-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar3" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar4/' title='ar4'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar4-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar4" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar5/' title='ar5'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar5-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar5" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar6/' title='ar6'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar6-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar6" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar7/' title='ar7'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar7-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar7" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar8/' title='ar8'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar8-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar8" /></a> <a
href='http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/ar9/' title='ar9'><img
width="150" height="150" src="http://shkspr.mobi/blog/wp-content/uploads/2009/07/ar9-150x150.png" class="attachment-thumbnail" alt="Armadillo Roll" title="ar9" /></a><p>The game is a tech demo from Qualcomm.  You can <a
href="http://market.android.com/search?q=pname:com.qualcomm.qx.dillo">download Armadillo Roll directly from the Marketplace to your phone</a> or <a
href="http://www.cyrket.com/package/com.qualcomm.qx.dillo">view more information about it</a>.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=318&amp;md5=581bbafa09853740b3011af442ad5abe" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2009/07/armadillo-roll-open-gl-game-for-android/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=318&amp;md5=581bbafa09853740b3011af442ad5abe" type="text/html" /> </item> <item><title>Prime &#8211; My New Addiction</title><link>http://shkspr.mobi/blog/index.php/2009/06/prime-my-new-addiction/</link> <comments>http://shkspr.mobi/blog/index.php/2009/06/prime-my-new-addiction/#comments</comments> <pubDate>Wed, 10 Jun 2009 11:04:00 +0000</pubDate> <dc:creator>Terence Eden</dc:creator> <category><![CDATA[linux]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[android]]></category> <category><![CDATA[games]]></category> <category><![CDATA[stats]]></category><guid
isPermaLink="false">http://shkspr.mobi/blog/?p=135</guid> <description><![CDATA[My new gaming addiction is Prime by 59Pixels. The premise is very simple.  There are blocks bouncing around the screen. You have a limited number of shots to remove a set number of them. Each shot creates an explosion which, if it touches another block, causes that to explode. This can cause a helpful chain <a
href='http://shkspr.mobi/blog/index.php/2009/06/prime-my-new-addiction/'>[...]</a>]]></description> <content:encoded><![CDATA[<p>My new gaming addiction is <a
href="http://www.cyrket.com/package/com.PrimeFullNew">Prime</a> by <a
href="http://59pixels.com/wordpress/" class="broken_link">59Pixels</a>.</p><p><img
class="alignnone size-full wp-image-139" title="prime-start" src="http://shkspr.mobi/blog/wp-content/uploads/2009/06/prime-start.png" alt="prime-start" width="480" height="320" /></p><p>The premise is very simple.  There are blocks bouncing around the screen. You have a limited number of shots to remove a set number of them.</p><p><img
class="alignnone size-full wp-image-138" title="prime-screen" src="http://shkspr.mobi/blog/wp-content/uploads/2009/06/prime-screen.png" alt="prime-screen" width="480" height="320" /></p><p>Each shot creates an explosion which, if it touches another block, causes that to explode.</p><p>This can cause a helpful chain reaction.</p><p><img
class="alignnone size-full wp-image-136" title="prime-chain-reaction" src="http://shkspr.mobi/blog/wp-content/uploads/2009/06/prime-chain-reaction.png" alt="prime-chain-reaction" width="480" height="320" /></p><p>One of the many wonderful things about this game is how it pits you against other players.  Rather than posting high scores, it shows you how many other people have reached the level.</p><p><img
class="alignnone size-full wp-image-137" title="prime-other-people" src="http://shkspr.mobi/blog/wp-content/uploads/2009/06/prime-other-people.png" alt="prime-other-people" width="480" height="320" /></p><p>Being the massive geek that I am, I&#8217;ve graphed how player levels drop off.  I&#8217;m only skilled enough to get to level 89. Must try harder.</p><p><img
class="alignnone size-full wp-image-140" title="Player Drop Off" src="http://shkspr.mobi/blog/wp-content/uploads/2009/06/prime.png" alt="Player Drop Off" width="729" height="608" /></p><p>What I find fascinating is how steady the player numbers are until each big drop-off. Obviously, at least 50,000 people have downloaded the game, but only 371 players who&#8217;ve made it as far as I have.</p><p>Anyway, if you have an Android device, <a
href="http://59pixels.com/wordpress/?p=76" class="broken_link">have a play with Prime &#8211; it&#8217;s a great little game</a>.</p><p><a
href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=135&amp;md5=ea33c35f9da6aaa771b56c52bdef00f8" title="Flattr" target="_blank"><img
src="http://shkspr.mobi/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded> <wfw:commentRss>http://shkspr.mobi/blog/index.php/2009/06/prime-my-new-addiction/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <atom:link rel="payment" href="http://shkspr.mobi/blog/?flattrss_redirect&amp;id=135&amp;md5=ea33c35f9da6aaa771b56c52bdef00f8" type="text/html" /> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (Requested URI is rejected)

Served from: www.shkspr.mobi @ 2012-02-08 06:50:44 -->
