<?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>Alex Sleat &#187; 10.04</title>
	<atom:link href="http://alexsleat.co.uk/tag/10-04/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexsleat.co.uk</link>
	<description>/home/alex</description>
	<lastBuildDate>Sat, 04 Feb 2012 22:11:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Switching Between Two Resolutions in Linux</title>
		<link>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/</link>
		<comments>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 19:56:06 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[resolution]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[settings]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[xorg]]></category>
		<category><![CDATA[xrandr]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=22690</guid>
		<description><![CDATA[<br/><p>I have a TV and my monitor connected to my PC by a VGA switch box but what&#8217;s annoying is they aren&#8217;t the same resolution. This causes problems because I can&#8217;t see what I&#8217;m doing when I have switched to TV and usually have to leave the setting manager open so that when I [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I have a TV and my monitor connected to my PC by a VGA switch box but what&#8217;s annoying is they aren&#8217;t the same resolution. This causes problems because I can&#8217;t see what I&#8217;m doing when I have switched to TV and usually have to leave the setting manager open so that when I change between them I just have to hit return and the resolution changes. That&#8217;s great and all but it&#8217;s far more effort than I want for something I do fairly often.</p>
<p>My plan was initially to create two xorg.conf files and switch between them using a script, I figured this would be the easiest way even though I haven&#8217;t messed around with xorg stuff for a few years ever since things just started working better in Linux. Turns out I couldn&#8217;t even find where they keep the xorg.conf file, it sure isn&#8217;t in /etc/X11 where it was the last time I looked..</p>
<p>On the search for this file though I came across another useful tool called xrandr, which essentially allows you to change the resolution from the command line.</p>
<blockquote>
<p style="text-align: left;">Xrandr is used to set the size, orientation and/or reflection of the outputs for a<br />
screen. It can also set the screen size.</p>
<p style="text-align: left;">If invoked without any option, it will dump the state of the outputs, showing the<br />
existing modes for each of them, with a &#8216;+&#8217; after the preferred mode and a &#8216;*&#8217;<br />
after the current mode.</p>
<p style="text-align: left;">There are a few global options. Other options modify the last output that is spec‐<br />
ified in earlier parameters in the command line. Multiple outputs may be modified<br />
at the same time by passing multiple &#8211;output options followed immediately by<br />
their corresponding modifying options.</p>
</blockquote>
<p style="text-align: right;">For more information on xrandr check out the <a href="http://linux.die.net/man/1/xrandr">manual page</a> (or type <em>man xrandr</em> in terminal).</p>
<p style="text-align: left;">It turns out it&#8217;s an extremely easy tool to use, with a command as simple as the following changing the resolution:</p>
<div class="dean_ch" style="white-space: wrap;">xrandr &#8211;output VGA1 &#8211;mode 1440&#215;900</div>
<p>So the next thing I did was create the following script which allows the resolution to switch between 1440&#215;900 and 1360&#215;768 (my monitor and my TV native resolutions).</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span></p>
<p><span class="re2">TV=</span><span class="st0">&quot;1360 x 768&quot;</span><br />
<span class="re2">MONITOR=</span><span class="st0">&quot;1440 x 900&quot;</span></p>
<p><span class="re2">TEST=</span><span class="st0">&quot;$(xrandr | grep current | sed -e &#8216;s/.*current //;s/, maximum.*//&#8217;)&quot;</span></p>
<p><span class="re3">#echo <span class="re1">$TEST</span></span></p>
<p><span class="kw1">if</span> <span class="br0">&#91;</span> <span class="st0">&quot;$TEST&quot;</span> == <span class="st0">&quot;$MONITOR&quot;</span> <span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xrandr &#8211;output VGA1 &#8211;mode 1360&#215;768</p>
<p><span class="kw1">elif</span> <span class="br0">&#91;</span> <span class="st0">&quot;$TEST&quot;</span> == <span class="st0">&quot;$TV&quot;</span> <span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xrandr &#8211;output VGA1 &#8211;mode 1440&#215;900</p>
<p><span class="kw1">else</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">exit</span></p>
<p><span class="kw1">fi</span></div>
<p>This script simply checks what the current resolution is being used and then toggles between the two set resolutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/10/24/switching-between-two-resolutions-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenShot, libmp3lame and Ubuntu</title>
		<link>http://alexsleat.co.uk/2011/04/28/openshot-libmp3lame-and-ubuntu/</link>
		<comments>http://alexsleat.co.uk/2011/04/28/openshot-libmp3lame-and-ubuntu/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 22:36:18 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[12.04]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[codecs]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[h.264]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[libavformat]]></category>
		<category><![CDATA[libmp3lame]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[mov]]></category>
		<category><![CDATA[mpeg]]></category>
		<category><![CDATA[openshot]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=15424</guid>
		<description><![CDATA[<br/><p></p> <p>If you&#8217;re getting the following error while trying export a video under several different codecs in OpenShot including AVI, MOV and MPEG using (mpeg2, mpeg4 or h.264) chances are this might help you with that error.</p> <p>The following formats/codecs are missing from your system:</p> <p>libmp3lame</p> <p>You will not be able to use the [...]]]></description>
			<content:encoded><![CDATA[<br/><p><a href="http://alexsleat.co.uk/wp-content/uploads/2011/04/Screenshot-26.png"><img class="aligncenter size-full wp-image-15425" title="Screenshot-26" src="http://alexsleat.co.uk/wp-content/uploads/2011/04/Screenshot-26.png" alt="" width="478" height="214" /></a></p>
<p>If you&#8217;re getting the following error while trying export a video under several different codecs in OpenShot including AVI, MOV and MPEG using (mpeg2, mpeg4 or h.264) chances are this might help you with that error.</p>
<blockquote><p>The following formats/codecs are missing from your system:</p>
<p>libmp3lame</p>
<p>You will not be able to use the selected export profile. You will need to install the missing formats/codecs or choose a different export profile.</p></blockquote>
<p><strong>This is a simple fix:</strong></p>
<ul>
<li>Open up Synaptic Package Manager</li>
<li>Search &#8220;libavformat&#8221;,</li>
<ul>
<li>If the current package installed is <em>&#8220;libavformat52&#8243;</em> select <em>&#8220;libavformat-extra-52&#8243;</em> (alternativly <em>&#8220;libavformat-unstripped-52&#8243;</em> should also work).</li>
<li>Else the package might be <em>&#8220;libavformat53&#8243;</em> so simply change to<em> &#8220;libavformat-extra-53&#8243;, </em>basically it might end in different numbers, it should work the same.</li>
</ul>
<li>Hit Apply and approve the changes.</li>
</ul>
<div><a href="http://alexsleat.co.uk/wp-content/uploads/2011/04/Screenshot-261011-092555.png"><img class="aligncenter size-full wp-image-22763" title="Screenshot - 261011 - 09:25:55" src="http://alexsleat.co.uk/wp-content/uploads/2011/04/Screenshot-261011-092555.png" alt="" width="1019" height="688" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/04/28/openshot-libmp3lame-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Realtek RTL8191S in Ubuntu 10.10</title>
		<link>http://alexsleat.co.uk/2011/02/15/realtek-rtl8191s-in-ubuntu-10-10/</link>
		<comments>http://alexsleat.co.uk/2011/02/15/realtek-rtl8191s-in-ubuntu-10-10/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 22:09:22 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[card]]></category>
		<category><![CDATA[dongle]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[realtek]]></category>
		<category><![CDATA[rtl8191s]]></category>
		<category><![CDATA[rtl819xU]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=12248</guid>
		<description><![CDATA[<br/><p>Errors:</p> $ sudo ifconfig wlan1 up SIOCSIFFLAGS: Resource temporarily unavailable</p> <p>$ dmesg usb rtl819xU:FirmwareDownload92S&#40;&#41;: failed with TCR-Status: a rtl819xU:ERR!!! _rtl8192_up&#40;&#41;: initialization is failed! <p>Solution 1:</p> <p>To get this wifi dongle working I simply had to download the above firmware and place it in /lib/firmware/RTL8192SU/ and then reboot my computer. You should check that location [...]]]></description>
			<content:encoded><![CDATA[<br/><p><strong>Errors:</strong></p>
<div class="dean_ch" style="white-space: wrap;">$ <span class="kw2">sudo</span> ifconfig wlan1 up<br />
SIOCSIFFLAGS: Resource temporarily unavailable</p>
<p>$ <span class="kw2">dmesg</span> usb<br />
rtl819xU:FirmwareDownload92S<span class="br0">&#40;</span><span class="br0">&#41;</span>: failed with TCR-Status: a<br />
rtl819xU:ERR!!! _rtl8192_up<span class="br0">&#40;</span><span class="br0">&#41;</span>: initialization is failed!</div>
<p><strong>Solution 1:</strong></p>
<p>To get this wifi dongle working I simply had to download the above firmware and place it in /lib/firmware/RTL8192SU/ and then reboot my computer. You should check that location before hand and make a backup of anything inside of it if you&#8217;re not sure what you are doing. If it&#8217;s empty you can use the following commands to make the directory and then download the firmware directly.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> <span class="kw2">mkdir</span> /lib/firmware/RTL8192SU/<br />
<span class="kw3">cd</span> /lib/firmware/RTL8192SU/<br />
<span class="kw2">sudo</span> <span class="kw2">wget</span> http://svn.debian.org/wsvn/kernel/dists/trunk/firmware-nonfree/realtek/RTL8192SU/rtl8192sfw.bin</div>
<p><strong>Solution 2:</strong></p>
<p>Alternatively download the source and build it:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">wget</span> http://launchpadlibrarian.net/<span class="nu0">33927923</span>/rtl8192se_linux_2<span class="nu0">.6</span><span class="nu0">.0010</span><span class="nu0">.1012</span><span class="nu0">.2009</span>.<span class="kw2">tar</span>.gz<br />
<span class="kw2">tar</span> -zxvf rtl8192se_linux_2<span class="nu0">.6</span><span class="nu0">.0010</span><span class="nu0">.1012</span><span class="nu0">.2009</span>.<span class="kw2">tar</span>.gz<br />
<span class="kw3">cd</span> rtl8192se_linux_2<span class="nu0">.6</span><span class="nu0">.0010</span><span class="nu0">.1012</span><span class="nu0">.2009</span><br />
<span class="kw2">make</span><br />
<span class="kw2">sudo</span> <span class="kw2">make</span> <span class="kw2">install</span></div>
<p><strong>Downloads:</strong><br />
Firmware: http://svn.debian.org/wsvn/kernel/dists/trunk/firmware-nonfree/realtek/RTL8192SU/rtl8192sfw.bin</p>
<p>Source: http://launchpadlibrarian.net/33927923/rtl8192se_linux_2.6.0010.1012.2009.tar.gz</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/02/15/realtek-rtl8191s-in-ubuntu-10-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Auto Sync Kindle in Ubuntu</title>
		<link>http://alexsleat.co.uk/2011/01/17/auto-sync-kindle-in-ubuntu/</link>
		<comments>http://alexsleat.co.uk/2011/01/17/auto-sync-kindle-in-ubuntu/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 12:23:21 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[diy kindle stand]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[kindle]]></category>
		<category><![CDATA[kindle 3]]></category>
		<category><![CDATA[kindle 3 stand]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[reader]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[rules.d]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[udev]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=11625</guid>
		<description><![CDATA[<br/><p></p> <p>For Christmas I got a Kindle 3 and it was instantly filled with Free eBooks (http://www.gutenberg.org/wiki/Main_Page) and research papers (PDFs). I found myself wanting to be able to automatically synchronize it with a folder on my desktop when it was plugged in and found no one else had posted online how to do [...]]]></description>
			<content:encoded><![CDATA[<br/><p><a href="http://alexsleat.co.uk/wp-content/uploads/2011/01/2010-12-27-14.11.38.jpg"><img class="size-large wp-image-11639 alignleft" title="DIY Kindle Stand" src="http://alexsleat.co.uk/wp-content/uploads/2011/01/2010-12-27-14.11.38-1024x614.jpg" alt="" width="368" height="221" /></a></p>
<p>For Christmas I got a Kindle 3 and it was instantly filled with Free eBooks (http://www.gutenberg.org/wiki/Main_Page) and research papers (PDFs). I found myself wanting to be able to automatically synchronize it with a folder on my desktop when it was plugged in and found no one else had posted online how to do this, so I began researching into udev and rsync to get something working.</p>
<p><strong>Setting up udev rules to run a script when the Kindle is plugged in.</strong></p>
<p>Firstly, we need to find some parameters of the Kindle which are unique to it so that udev can identify that it is the Kindle being plugged in and not another USB mass storage device. We&#8217;ll need to find out where the device is mounted in /dev/ which can be a little tricky because this folder is pretty full.</p>
<p>An easier way to do this is to first, without the Kindle plugged in do the following command (list the directory and pipe the output to a file called dev1 in the home dir):</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">ls</span> /dev/ &gt; ~/dev1</div>
<p>Now plug the Kindle in and redo the command, changing the destination output:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">ls</span> /dev/ &gt; ~/dev2</div>
<p>The difference between the two files will show what has changed in the /dev/ directory:</p>
<div class="dean_ch" style="white-space: wrap;"> sdiff ~/dev1 ~/dev2</div>
<p>The output for mine (<em>show in the image below</em>) shows that 3 things changed when I plugged in the Kindle, sdb, sdb1 and sg2 directorys were added (shown by the &gt; sign to the left). The folder I am looking for is the sdb1, this is where the mass storage device is found.<br />
<a href="http://alexsleat.co.uk/wp-content/uploads/2011/01/Screenshot-alex@icarus-Desktop-.png"><img class="aligncenter size-full wp-image-11630" title="sdiff /dev/" src="http://alexsleat.co.uk/wp-content/uploads/2011/01/Screenshot-alex@icarus-Desktop-.png" alt="" width="953" height="488" /></a></p>
<p>Write down where it&#8217;s found in /dev/ and then you can clean up those two files you previously made:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">rm</span> ~/dev1 | <span class="kw2">rm</span> ~/dev2</div>
<p>The next thing we want to do is use udevadm to collect some useful information about the device which we can do by the following command (I have chosen to pipe the output to a file called kindle in the home dir, because the output was pretty big. If you don&#8217;t want to remove the &gt; ~/kindle from the end of the command):</p>
<div class="dean_ch" style="white-space: wrap;">udevadm info -a -p $<span class="br0">&#40;</span>udevadm info -q path -n /dev/sdb1<span class="br0">&#41;</span> &gt; ~/kindle</div>
<p><strong>WARNING:</strong> This can look pretty daunting but, (in the words of Douglas Adams) <strong>Don&#8217;t Panic.</strong></p>
<div style="overflow: auto; height: 350px; border: 1px solid black;">
<div class="dean_ch" style="white-space: wrap;"> &nbsp;looking at device <span class="st0">&#8216;/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/host21/target21:0:0/21:0:0:0/block/sdb/sdb1&#8242;</span>:<br />
&nbsp; &nbsp; <span class="re2">KERNEL=</span>=<span class="st0">&quot;sdb1&quot;</span><br />
&nbsp; &nbsp; <span class="re2">SUBSYSTEM=</span>=<span class="st0">&quot;block&quot;</span><br />
&nbsp; &nbsp; <span class="re2">DRIVER=</span>=<span class="st0">&quot;&quot;</span><br />
&nbsp; &nbsp; ATTR<span class="br0">&#123;</span>partition<span class="br0">&#125;</span>==<span class="st0">&quot;1&quot;</span><br />
&nbsp; &nbsp; ATTR<span class="br0">&#123;</span>start<span class="br0">&#125;</span>==<span class="st0">&quot;16&quot;</span><br />
&nbsp; &nbsp; ATTR<span class="br0">&#123;</span><span class="kw2">size</span><span class="br0">&#125;</span>==<span class="st0">&quot;6410672&quot;</span><br />
&nbsp; &nbsp; ATTR<span class="br0">&#123;</span>alignment_offset<span class="br0">&#125;</span>==<span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; ATTR<span class="br0">&#123;</span>discard_alignment<span class="br0">&#125;</span>==<span class="st0">&quot;4294959104&quot;</span><br />
&nbsp; &nbsp; ATTR<span class="br0">&#123;</span><span class="kw2">stat</span><span class="br0">&#125;</span>==<span class="st0">&quot; &nbsp; &nbsp; 151 &nbsp; &nbsp; 3389 &nbsp; &nbsp; 4239 &nbsp; &nbsp; 3776 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; 2424 &nbsp; &nbsp; 3776&quot;</span><br />
&nbsp; &nbsp; ATTR<span class="br0">&#123;</span>inflight<span class="br0">&#125;</span>==<span class="st0">&quot; &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp;0&quot;</span></p>
<p>&nbsp; looking at parent device <span class="st0">&#8216;/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/host21/target21:0:0/21:0:0:0/block/sdb&#8217;</span>:<br />
&nbsp; &nbsp; <span class="re2">KERNELS=</span>=<span class="st0">&quot;sdb&quot;</span><br />
&nbsp; &nbsp; <span class="re2">SUBSYSTEMS=</span>=<span class="st0">&quot;block&quot;</span><br />
&nbsp; &nbsp; <span class="re2">DRIVERS=</span>=<span class="st0">&quot;&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>range<span class="br0">&#125;</span>==<span class="st0">&quot;16&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>ext_range<span class="br0">&#125;</span>==<span class="st0">&quot;256&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>removable<span class="br0">&#125;</span>==<span class="st0">&quot;1&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>ro<span class="br0">&#125;</span>==<span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span><span class="kw2">size</span><span class="br0">&#125;</span>==<span class="st0">&quot;6410688&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>alignment_offset<span class="br0">&#125;</span>==<span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>discard_alignment<span class="br0">&#125;</span>==<span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>capability<span class="br0">&#125;</span>==<span class="st0">&quot;51&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span><span class="kw2">stat</span><span class="br0">&#125;</span>==<span class="st0">&quot; &nbsp; &nbsp; 156 &nbsp; &nbsp; 3389 &nbsp; &nbsp; 4279 &nbsp; &nbsp; 3808 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; 2456 &nbsp; &nbsp; 3808&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>inflight<span class="br0">&#125;</span>==<span class="st0">&quot; &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp;0&quot;</span></p>
<p>&nbsp; looking at parent device <span class="st0">&#8216;/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/host21/target21:0:0/21:0:0:0&#8242;</span>:<br />
&nbsp; &nbsp; <span class="re2">KERNELS=</span>=<span class="st0">&quot;21:0:0:0&quot;</span><br />
&nbsp; &nbsp; <span class="re2">SUBSYSTEMS=</span>=<span class="st0">&quot;scsi&quot;</span><br />
&nbsp; &nbsp; <span class="re2">DRIVERS=</span>=<span class="st0">&quot;sd&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>device_blocked<span class="br0">&#125;</span>==<span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span><span class="kw3">type</span><span class="br0">&#125;</span>==<span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>scsi_level<span class="br0">&#125;</span>==<span class="st0">&quot;3&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>vendor<span class="br0">&#125;</span>==<span class="st0">&quot;Kindle &nbsp;&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>model<span class="br0">&#125;</span>==<span class="st0">&quot;Internal Storage&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span><span class="kw2">rev</span><span class="br0">&#125;</span>==<span class="st0">&quot;0100&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>state<span class="br0">&#125;</span>==<span class="st0">&quot;running&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>timeout<span class="br0">&#125;</span>==<span class="st0">&quot;30&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>iocounterbits<span class="br0">&#125;</span>==<span class="st0">&quot;32&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>iorequest_cnt<span class="br0">&#125;</span>==<span class="st0">&quot;0xe1&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>iodone_cnt<span class="br0">&#125;</span>==<span class="st0">&quot;0xe1&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>ioerr_cnt<span class="br0">&#125;</span>==<span class="st0">&quot;0&#215;1&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>modalias<span class="br0">&#125;</span>==<span class="st0">&quot;scsi:t-0&#215;00&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>evt_media_change<span class="br0">&#125;</span>==<span class="st0">&quot;0&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>dh_state<span class="br0">&#125;</span>==<span class="st0">&quot;detached&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>queue_depth<span class="br0">&#125;</span>==<span class="st0">&quot;1&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>queue_type<span class="br0">&#125;</span>==<span class="st0">&quot;none&quot;</span><br />
&nbsp; &nbsp; ATTRS<span class="br0">&#123;</span>max_sectors<span class="br0">&#125;</span>==<span class="st0">&quot;240&quot;</span></div>
</div>
<p>While this many look daunting, what you want to do if find some attributes from the output which mean only your Kindle will be found when looking for them all, the problem I have found is that, with udev rules you cannot go too far down in the parent tree which stops me being able to use the Kindles serial to identify it. This could mean that my computer will sync any Kindle that&#8217;s plugged into it but I don&#8217;t have 2 to check. The following are the attributes I chose:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re2">KERNEL=</span>=<span class="st0">&quot;sd?&quot;</span>, ATTRS<span class="br0">&#123;</span>vendor<span class="br0">&#125;</span>==<span class="st0">&quot;Kindle &nbsp;&quot;</span>, ATTRS<span class="br0">&#123;</span>modalias<span class="br0">&#125;</span>==<span class="st0">&quot;scsi:t-0&#215;00&quot;</span></div>
<p>Now you&#8217;ll want to write the udev rule in /etc/udev/rules.d/</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw3">cd</span> /etc/udev/rules.d/</div>
<p>According to the readme the numbers represent the priority of the rule (higher overriding lower) followed by a descriptive name and it must end in .rules eg (xx-description.rules).</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> gedit <span class="nu0">81</span>-kindle-<span class="kw2">sync</span>.rules</div>
<p>The following is the whole line I used for the udev rule, the only addition to the above is the RUN+=&#8221;/home/alex/.scripts/kindlesync.sh&#8221; which will run the script in that directory, this script contains the rsync command.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re2">KERNEL=</span>=<span class="st0">&quot;sd?&quot;</span>, ATTRS<span class="br0">&#123;</span>vendor<span class="br0">&#125;</span>==<span class="st0">&quot;Kindle &nbsp;&quot;</span>, ATTRS<span class="br0">&#123;</span>modalias<span class="br0">&#125;</span>==<span class="st0">&quot;scsi:t-0&#215;00&quot;</span>, RUN+=<span class="st0">&quot;/home/alex/.scripts/./kindlesync.sh&quot;</span></div>
<p>Save and close the file and then restart the udev service:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">sudo</span> service udev restart</div>
<p><strong>Writing a script to sync a folder on the Desktop with a folder on the Kindle using rsync:</strong><br />
Change the first directory from &#8220;/home/alex/ebooks/kindle_sync&#8221; to the directory on your computer where you want to keep the files that will be synced onto your Kindle and the second from &#8220;/media/Kindle/documents/sync/&#8221; to the location on your mounted Kindle where you want the files to be stored, save this file as kindlesync.sh. This is the script you call from the udev rules so for mine it&#8217;s saved as &#8220;/home/alex/.scripts/kindlesync.sh&#8221;.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span></p>
<p><span class="re3">#Sync</span><br />
rsync -av /home/alex/eBooks/kindle_sync/ /media/Kindle/documents/<span class="kw2">sync</span>/</div>
<p>Go to the location of the script and make it executable with the following command:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">chmod</span> +x kindlesync.<span class="kw2">sh</span></div>
<p>Now try plugging in your Kindle and make sure it syncs up!</p>
<p><strong>Problems</strong></p>
<p>In the udev rule, ACTION==&#8221;add&#8221; can be used to specify when the Kindle is first plugged in, however when trying to use this Ubuntu&#8217;s auto-mounting service mounts the drive after the script is ran so the sync becomes useless. Without this it runs the script 3 times, twice before it has mounted and then once it has mounted &#8211; this is currently the best I have found but it&#8217;s extremely messy.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/01/17/auto-sync-kindle-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A More Elegant Solution to Ubuntu Wi-Fi Reconnecting Issue</title>
		<link>http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/</link>
		<comments>http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 23:25:52 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[drop wifi]]></category>
		<category><![CDATA[failing to reconnect]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[init.d]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[network-manager]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[rc.local]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script on login]]></category>
		<category><![CDATA[script on startup]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wifi doesnt reconnect]]></category>
		<category><![CDATA[wifi not connecting]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=11358</guid>
		<description><![CDATA[<br/><p>Previously I was having problems with Ubuntu dropping wifi connections and failing to reconnect, to solve this I wrote a script which would kill the network-manager and then connect using iwconfig commands (here). While this works fine, it felt a little hacky, having to have a script running as sudo constantly in the background [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Previously I was having problems with Ubuntu dropping wifi connections and failing to reconnect, to solve this I wrote a script which would kill the network-manager and then connect using iwconfig commands (<a href="http://alexsleat.co.uk/2010/11/05/ubuntu-disconnecting-from-wifi-and-failing-to-reconnect/">here</a>). While this works fine, it felt a little hacky, having to have a script running as sudo constantly in the background checking for a dropped connection. After a little searching I came across cron (the time based job scheduler ) and /etc/rc.local (a script which is run after all other initialization scripts have ran, allowing for scripts to be ran on startup) so from this I decided to split the old script up into connection and checking scripts which could be ran from init.d/local and cron, respectively.</p>
<p>Firstly my startup script in /etc/init.d/local which sets up and connects to the wireless network, open the file as sudo:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> gedit /etc/rc.<span class="kw3">local</span></div>
<p>Paste in the following:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#! /bin/sh</span></p>
<p>service network-manager stop &amp;&amp; service networking stop</p>
<p>iwconfig wlan0 essid NETWORKNAME<br />
iwconfig wlan0 key WEPKEY<br />
ifconfig wlan0 up<br />
dhclient3 wlan0</p>
<p><span class="kw2">sleep</span> <span class="nu0">10</span></p>
<p><span class="kw1">if</span> iwconfig wlan0 | <span class="kw2">grep</span> -o <span class="st0">&quot;Access Point: Not-Associated&quot;</span><br />
<span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 down<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">sleep</span> <span class="nu0">10</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 up</p>
<p><span class="kw1">fi</span></p>
<p><span class="kw3">exit</span> <span class="nu0">0</span><br />
&nbsp;</div>
<p>Next the script for checking the network is still connected, if not attempt to reconnect (named wirelesscheck.sh):</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span></p>
<p><span class="kw1">if</span> iwconfig wlan0 | <span class="kw2">grep</span> -o <span class="st0">&quot;Access Point: Not-Associated&quot;</span><br />
<span class="kw1">then</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 down<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">sleep</span> <span class="nu0">10</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan0 up<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<span class="kw1">fi</span></div>
<p>Make sure this script is executable (from the directory of the script):</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">chmod</span> +x wirelesscheck.<span class="kw2">sh</span></div>
<blockquote><p>Note: This is setup in the sudo crontab, only because this command needs root privileges &#8211; other commands could be added to a user crontab (by removing sudo from the following.)</p></blockquote>
<p>Now, edit (-e) the crontab for sudo:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> crontab -e</div>
<p>If crontab has not previously been used choose an editor (I used nano &#8211; 2) and append this line to the bottom of the file and change the frequency and directory of the script. The current settings will run it every 5 minutes (*/5) every hour, day, month and year and the file is located in &#8220;/path/to/script/wirelesscheck.sh&#8221;.</p>
<div class="dean_ch" style="white-space: wrap;">*/<span class="nu0">5</span> * * * * /path/to/script/wirelesscheck.<span class="kw2">sh</span></div>
<p>If you have any issues, leave a comment and I will help if I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To: Fix &#8220;Failed to download repository information Check your Internet connection.&#8221;</title>
		<link>http://alexsleat.co.uk/2011/01/07/how-to-fix-failed-to-download-repository-information-check-your-internet-connection/</link>
		<comments>http://alexsleat.co.uk/2011/01/07/how-to-fix-failed-to-download-repository-information-check-your-internet-connection/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 23:11:05 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[404 not found]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[failed]]></category>
		<category><![CDATA[Failed to download repository information]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[ppa]]></category>
		<category><![CDATA[sources]]></category>
		<category><![CDATA[sources.list]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=11274</guid>
		<description><![CDATA[<br/><p>﻿﻿﻿If you&#8217;re getting this error but you&#8217;re still connected to the internet this page might help. This error is sometimes caused by repository&#8217;s which are down or broken.</p> Failed to download repository information Check your Internet connection. <p style="text-align: center;"></p> <p>From terminal run the following command:</p> sudo apt-get update <p>If the output runs through a few [...]]]></description>
			<content:encoded><![CDATA[<br/><p>﻿﻿﻿If you&#8217;re getting this error but you&#8217;re still connected to the internet this page might help. This error is sometimes caused by repository&#8217;s which are down or broken.</p>
<blockquote>
<div id="_mcePaste">Failed to download repository information</div>
<div id="_mcePaste">Check your Internet connection.</div>
</blockquote>
<p style="text-align: center;"><a href="http://alexsleat.co.uk/wp-content/uploads/2011/01/failed-to-download-repository-information.png"><img class="size-full wp-image-11260  aligncenter" title="failed to download repository information" src="http://alexsleat.co.uk/wp-content/uploads/2011/01/failed-to-download-repository-information.png" alt="" width="455" height="246" /></a></p>
<p>From terminal run the following command:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> apt-get update</div>
<p>If the output runs through a few repositorys but ends with something similar to the below (most probably with different repositorys failing) and ultimately stopping your updating process then there is a good chance you can fix it by just removing those failing sources from the software sources.</p>
<blockquote><p>Err http://ppa.launchpad.net maverick/main Sources<br />
404  Not Found<br />
Err http://ppa.launchpad.net maverick/main amd64 Packages<br />
404  Not Found<br />
W: Failed to fetch http://ppa.launchpad.net/bugs-sehe/gparted/ubuntu/dists/maverick/main/source/Sources.gz  404  Not Found<br />
W: Failed to fetch http://ppa.launchpad.net/bugs-sehe/gparted/ubuntu/dists/maverick/main/binary-amd64/Packages.gz  404  Not Found<br />
E: Some index files failed to download, they have been ignored, or old ones used instead.</p></blockquote>
<p>Software Sources can be found under either:</p>
<p style="padding-left: 30px;"><em>Applications &gt; Ubuntu Software Centre &gt; Edit &gt; Software Sources..</em><br />
OR<br />
<em>System &gt; Administrator &gt; Synaptic Package Manager &gt; Settings &gt; Repositorys</em></p>
<p style="text-align: left;">Click the Other Software tab.</p>
<p style="text-align: left;">Nnow find the repositories which caused the failure on the update and uncheck them and then close the Software Centre.</p>
<p style="text-align: left;">Re-run the update command and hopefully everything will work!</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> apt-get update</div>
</p>
<p style="text-align: left;">Check the example below where gparted was causing the error:</p>
<p style="text-align: center;"><a href="http://alexsleat.co.uk/wp-content/uploads/2011/01/sudo-apt-get-update-2.png"><img class="size-medium wp-image-11282 aligncenter" title="sudo apt get update 2" src="http://alexsleat.co.uk/wp-content/uploads/2011/01/sudo-apt-get-update-2-300x147.png" alt="" width="300" height="147" /></a></p>
<p style="text-align: center;"><a href="http://alexsleat.co.uk/wp-content/uploads/2011/01/Screenshot-Software-Sources2.png"><img class="size-medium wp-image-11281 aligncenter" title="Screenshot-Software Sources2" src="http://alexsleat.co.uk/wp-content/uploads/2011/01/Screenshot-Software-Sources2-300x177.png" alt="" width="300" height="177" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/01/07/how-to-fix-failed-to-download-repository-information-check-your-internet-connection/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>How To: Restore Default sources.list</title>
		<link>http://alexsleat.co.uk/2011/01/07/how-to-restore-default-sources-list/</link>
		<comments>http://alexsleat.co.uk/2011/01/07/how-to-restore-default-sources-list/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 22:39:15 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[apt line]]></category>
		<category><![CDATA[broken sources]]></category>
		<category><![CDATA[Check your Internet connection.]]></category>
		<category><![CDATA[Failed to download repository information]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[repogen]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[sources.list]]></category>
		<category><![CDATA[sources.list generator]]></category>
		<category><![CDATA[ubuntu source list generator]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=11259</guid>
		<description><![CDATA[<br/><p>Having gone through several upgrades and countless repository&#8217;s added to the software sources, things can begin to get really messy really quickly and often begin to screw up when updating the system if you&#8217;re not careful. You may find yourself, like I have, wanting to restore your sources.list file back to its default in [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Having gone through several upgrades and countless repository&#8217;s added to the software sources, things can begin to get really messy really quickly and often begin to screw up when updating the system if you&#8217;re not careful. You may find yourself, like I have, wanting to restore your sources.list file back to its default in order to get things working again.</p>
<p>In order to do this there is a pretty handy webapp available called the &#8220;<strong>Ubuntu Sources List Generator</strong>&#8221; - <a href="http://repogen.simplylinux.ch/">http://repogen.simplylinux.ch/</a></p>
<p>By moving through each section it enables you to select your country, release and then check each repository you want to add, not only does it support all the official ones for things like security and updates, it also allows for 3rd party repos such as Banshee, Chromium, Conky and VLC amongst a bunch others. Once you have what you want hit generate and it&#8217;ll create a nice, comment, new sources.list file ready for you to replace your old one with.</p>
<p>You may want to backup your old sources.list just in case with the following command:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> <span class="kw2">cp</span> /etc/apt/sources.list /etc/apt/sources.list.bkup</div>
<p>Once you have that you can open the sources.list and simply paste the new one in from the repogen:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> gedit /etc/apt/sources.list</div>
<p>Paste, Save and Close the file and now you should paste the generated GPG keys, found just below the generated sources.list file, into your terminal.</p>
<p>Everything should be back to default and allow you to once again update everything.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2011/01/07/how-to-restore-default-sources-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Install Pyrobot in Ubuntu</title>
		<link>http://alexsleat.co.uk/2010/11/30/how-to-install-pyrobot-in-ubuntu/</link>
		<comments>http://alexsleat.co.uk/2010/11/30/how-to-install-pyrobot-in-ubuntu/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 14:30:53 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[pyrobot install]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sh]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=8122</guid>
		<description><![CDATA[<br/><p>A quick guide for getting pyrobot running in Ubuntu, I&#8217;ve managed to get it running on 32bit and 64bit Ubuntu (10.10) so follow the guide accordingly to whichever architecture you&#8217;re using (64bit is about half way down the post).</p> 32-bit <p>1. Download this file, or copy the below into a file and save it [...]]]></description>
			<content:encoded><![CDATA[<br/><p>A quick guide for getting pyrobot running in Ubuntu, I&#8217;ve managed to get it running on 32bit and 64bit Ubuntu (10.10) so follow the guide accordingly to whichever architecture you&#8217;re using (64bit is about half way down the post).</p>
<h2><span style="text-decoration: underline;">32-bit</span></h2>
<p><strong>1. </strong>Download <a href="http://dl.dropbox.com/u/307455/pyroinstall.sh">this file</a>, or copy the below into a file and save it as <em>pyroinstall.sh </em>to your home dir.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/sh</span></p>
<p><span class="re2">currentdir=</span>$<span class="br0">&#40;</span><span class="kw3">pwd</span><span class="br0">&#41;</span></p>
<p><span class="kw2">sudo</span> apt-get <span class="kw2">install</span> build-essential python2<span class="nu0">.6</span> python2<span class="nu0">.6</span>-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig</p>
<p><span class="kw2">wget</span> http://pyrorobotics.org/download/pyrobot-latest.tgz</p>
<p><span class="kw2">tar</span> -zxvf pyrobot-latest.tgz</p>
<p><span class="kw3">cd</span> pyrobot</p>
<p>python configure.py</p>
<p><span class="kw2">make</span></p>
<p><span class="kw2">sed</span> -ie <span class="st0">&#8216;s/-e #!/#!/g&#8217;</span> <span class="re1">$currentdir</span>/pyrobot/bin/pyrobot<br />
<span class="kw2">sed</span> -ie <span class="st0">&#8216;s/-e # /# /g&#8217;</span> <span class="re1">$currentdir</span>/pyrobot/system/version.py</p>
<p><span class="kw3">echo</span> <span class="st0">&#8216;export PATH=${PATH}:&#8217;</span><span class="re1">$currentdir</span><span class="st0">&#8216;/pyrobot/bin&#8217;</span> &gt;&gt; <span class="re1">$currentdir</span>/.bashrc</div>
<p><em>Note: The &#8216; in the code highlighter I have above won&#8217;t work in terminal, there isn&#8217;t much I can do about it so you&#8217;ll have to re-write it. Also if you&#8217;re doing this manually change the &#8220;$currentdir&#8221; to &#8220;~&#8221; if you are doing it in your home directory.</em></p>
<p><strong>2.</strong> Make sure this file is in your home directory (e.g /home/alex/pyroinstall.sh) and make it executable:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">chmod</span> +x pyroinstall.<span class="kw2">sh</span></div>
<p><strong>3.</strong> Run the usual way (as super user because it has to install stuff etc):</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> ./pyroinstall.<span class="kw2">sh</span></div>
<p><strong>4.</strong> It&#8217;ll ask you some questions, below are the answers I used &#8211; you can use other configurations if you know what you need. I also put the full output in pastebin &#8217;cause it was bunging up the guide - <a href="http://pastebin.com/Kc5jyhja">http://pastebin.com/Kc5jyhja</a></p>
<div class="dean_ch" style="white-space: wrap;"><span class="nu0">1</span>. &nbsp; &nbsp; &nbsp;<span class="nu0">2.6</span><br />
<span class="nu0">2</span>. &nbsp; &nbsp; &nbsp;/usr/include/python2<span class="nu0">.6</span><br />
<span class="nu0">3</span>. &nbsp; &nbsp; &nbsp;/usr/bin/python2<span class="nu0">.6</span><br />
<span class="nu0">4</span>. &nbsp; &nbsp; &nbsp;/etc/X11<br />
<span class="nu0">5</span>. &nbsp; &nbsp; &nbsp;none<br />
<span class="nu0">6.01</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.02</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.03</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.04</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.05</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.06</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.07</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.08</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.09</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.10</span>&nbsp; &nbsp; n<br />
<span class="nu0">6.11</span>&nbsp; &nbsp; y<br />
<span class="nu0">6.12</span>&nbsp; &nbsp; y</div>
<p><strong>5.</strong> Once it&#8217;s done reboot or run:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw3">source</span> ~/.bashrc</div>
<p><strong>6.</strong> Allow read/write/execute permissions for the pyrobot folder:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> <span class="kw2">chmod</span> -R <span class="nu0">777</span> ~/pyrobot</div>
<p>You should all be done, try typing the following to get it running!</p>
<div class="dean_ch" style="white-space: wrap;"> pyrobot</div>
<h2><span style="text-decoration: underline;">64-bit</span></h2>
<p>In order to get pyrobot running on 64bit, you basically need to add -fPIC to CFLAGS in all the relative Makefiles as explained in this mailing list post &#8211; <a href="http://www.mail-archive.com/pyro-users@pyrorobotics.org/msg00344.html">http://www.mail-archive.com/pyro-users@pyrorobotics.org/msg00344.html</a> - Lucky for you I&#8217;ve already gone through the effort of doing it and compressed it (<a href="http://dl.dropbox.com/u/307455/pyrobot-5.0.0_64bit.tar">download here</a> you won&#8217;t need to if you are going to run the script though, it&#8217;ll do it for you..).</p>
<p>This script should download the file, configure and make and output the path to the .bashrc file for you (similar to the 32bit one does) so download this file, or copy and paste the script below into a file in your home directory:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/sh</span></p>
<p><span class="re2">currentdir=</span>$<span class="br0">&#40;</span><span class="kw3">pwd</span><span class="br0">&#41;</span></p>
<p><span class="kw2">sudo</span> apt-get <span class="kw2">install</span> build-essential python2<span class="nu0">.6</span> python2<span class="nu0">.6</span>-dev python-tk python-numeric libjpeg62-dev libncurses5-dev swig</p>
<p><span class="kw2">wget</span> http://dl.dropbox.com/u/<span class="nu0">307455</span>/pyrobot<span class="nu0">-5.0</span>.0_64bit.<span class="kw2">tar</span></p>
<p><span class="kw2">tar</span> -zxvf pyrobot<span class="nu0">-5.0</span>.0_64bit.<span class="kw2">tar</span></p>
<p><span class="kw3">cd</span> pyrobot</p>
<p>python configure.py</p>
<p><span class="kw2">make</span></p>
<p><span class="kw3">echo</span> <span class="st0">&#8216;export PATH=${PATH}:&#8217;</span><span class="re1">$currentdir</span><span class="st0">&#8216;/pyrobot/bin&#8217;</span> &gt;&gt; <span class="re1">$currentdir</span>/.bashrc</div>
<p>2. Make sure this file is in your home directory (e.g /home/alex/pyroinstall64.sh) and make it executable:</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">chmod</span> +x pyroinstall64.<span class="kw2">sh</span></div>
<p>3. Run the usual way (as super user because it has to install stuff etc):</p>
<div class="dean_ch" style="white-space: wrap;"> <span class="kw2">sudo</span> ./pyroinstall64.<span class="kw2">sh</span></div>
<p>Steps 4. 5. and 6. are the same as above..</p>
<h2><span style="text-decoration: underline;">Change Default Editor</span></h2>
<p>If you want to change the default editor from emacs to anything else (this will change the default editor used in other terminal applications too..) use the following commands, just change gedit to whatever you&#8217;d like (vi, vim, kedit etc):</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw3">echo</span> <span class="st0">&quot;export EDITOR=/usr/bin/gedit&quot;</span> &gt;&gt; ~/.bashrc<br />
<span class="kw3">source</span> ~/.bashrc</div>
<p>Any problems leave a comment and I&#8217;ll try and help as best as I can..</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2010/11/30/how-to-install-pyrobot-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How To: Fix &#8220;Unknown keyword in configuration file.&#8221; Ubuntu USB Boot</title>
		<link>http://alexsleat.co.uk/2010/11/27/how-to-fix-unknown-keyword-in-configuration-file-ubuntu-usb-boot/</link>
		<comments>http://alexsleat.co.uk/2010/11/27/how-to-fix-unknown-keyword-in-configuration-file-ubuntu-usb-boot/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 10:44:52 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[9.10]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[configuration file]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[Maverick Meerkat]]></category>
		<category><![CDATA[syslinux.cfg]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[unknown keyword]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[usb device]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=7614</guid>
		<description><![CDATA[<br/><p style="text-align: center;"></p> <p>Attempting Boot From USB Device</p> <p>SYSLINUX 3.63 Debian-2008-07-15 EBIOS Copyright (C) 1994-2008 H. Peter Anvin Unknown keyword in configuration file. boot: _</p> <p></p> <p>After creating a USB bootable version of Ubuntu from the Startup Disk Creator (or usb-creator-gtk) and attempting to boot, I was greeted by the error above. It might [...]]]></description>
			<content:encoded><![CDATA[<br/><p style="text-align: center;"><a href="http://alexsleat.co.uk/wp-content/uploads/2010/11/2010-11-26-14.20.40.jpg"><img class="aligncenter size-large wp-image-7789" title="USB boot fail" src="http://alexsleat.co.uk/wp-content/uploads/2010/11/2010-11-26-14.20.40-1024x614.jpg" alt="" width="614" height="368" /></a></p>
<blockquote><p>Attempting Boot From USB Device</p>
<p>SYSLINUX 3.63 Debian-2008-07-15 EBIOS Copyright (C) 1994-2008 H. Peter Anvin<br />
Unknown keyword in configuration file.<br />
boot:<br />
_</p></blockquote>
<p></p>
<p>After creating a USB bootable version of Ubuntu from the Startup Disk Creator (or usb-creator-gtk) and attempting to boot, I was greeted by the error above. It might look a bit scary but it&#8217;s really easy to fix, just plug the USB flash drive into a computer (windows or linux, mac too probably but I haven&#8217;t tried that.)</p>
<h5>Solution 1:</h5>
<ol>
<li>Open the the syslinux folder in the root of the flash drive.</li>
<li>Inside is a file called syslinux.cfg you&#8217;ll want to edit that.</li>
<li>Find the line &#8220;ui gfxboot bootlogo&#8221; and simply remove the &#8220;ui &#8220;.</li>
<li>Save and try booting again.</li>
</ol>
<p>Below is how my syslinux.cfg file looks after editing:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3"># D-I config version <span class="nu0">2.0</span></span><br />
include menu.cfg<br />
default vesamenu.c32<br />
prompt <span class="nu0">0</span><br />
timeout <span class="nu0">50</span><br />
gfxboot bootlogo</div>
<p></p>
<hr />
<h5>Solution 2</h5>
<p>Alternatively it looks as though there is another way of fixing this issue if there is no &#8220;ui&#8221; in the file, this is to do as followed (as pointed out in the comments below):</p>
<ol>
<li> Type &#8220;help&#8221; and press enter </li>
<li> Hit Enter again </li>
</ol>
<p>This should boot correctly and shouldn&#8217;t need to be done every time.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2010/11/27/how-to-fix-unknown-keyword-in-configuration-file-ubuntu-usb-boot/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>Ubuntu Disconnecting from Wi-Fi and Failing to Reconnect.</title>
		<link>http://alexsleat.co.uk/2010/11/05/ubuntu-disconnecting-from-wifi-and-failing-to-reconnect/</link>
		<comments>http://alexsleat.co.uk/2010/11/05/ubuntu-disconnecting-from-wifi-and-failing-to-reconnect/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 09:43:57 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blog1]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[10.10]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[disconnected]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[isadora]]></category>
		<category><![CDATA[julia]]></category>
		<category><![CDATA[katya]]></category>
		<category><![CDATA[linux mint]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://alexsleat.co.uk/?p=6456</guid>
		<description><![CDATA[<br/><p> I have an updated fix for this issue using a startup script to connect and a time scheduled script for checking the connection, rather than having one constantly running in the background, avalible here &#8211; http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/ </p> <p>I&#8217;ve been having some trouble with my wifi on Ubuntu recently but I think it&#8217;s because [...]]]></description>
			<content:encoded><![CDATA[<br/><blockquote><p> I have an updated fix for this issue using a startup script to connect and a time scheduled script for checking the connection, rather than having one constantly running in the background, avalible here &#8211; <a href="http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/">http://alexsleat.co.uk/2011/01/09/a-more-elegant-solution-to-ubuntu-wi-fi-reconnecting-issue/</a> </p></blockquote>
<p>I&#8217;ve been having some trouble with my wifi on Ubuntu recently but I think it&#8217;s because I&#8217;m almost out of range of the access point. The problem is that once it disconnects it never seems to be able to reconnect unless wireless is disabled and re-enabled. No doubt there is another way of fixing this issue but it gives me a chance to write my first shell script.</p>
<p>In short the script disables network-manager (it was trying to do things auto which was screwing with things), sets up the connection and connects then checks for a string in the wireless card parameters which will only occur if it&#8217;s disconnected, if the string appears it&#8217;ll disable and re-enable the wireless device which seems to allow it to connect again. If it&#8217;s connected it&#8217;ll wait 3 minutes (180 seconds) before checking again where as if it does disconnect it&#8217;ll check again 30 seconds after it&#8217;s tired rebooting the device. </p>
<p>Here&#8217;s the script, be sure to try it if you&#8217;re having the same problem (you might need to change the wireless device &#8216;wlan1&#8242; to yours) and comment if I&#8217;m doing something wrong or there&#8217;s another way around this, cheers.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re3">#!/bin/bash</span></p>
<p>service network-manager stop</p>
<p>iwconfig wlan1 essid NETWORKNAME<br />
iwconfig wlan1 key NETWORKKEY<br />
ifconfig wlan1 up<br />
dhclient3 wlan1</p>
<p><span class="kw1">while</span> <span class="kw2">true</span>;<br />
<span class="kw1">do</span></p>
<p><span class="kw1">if</span> <span class="br0">&#40;</span>iwconfig wlan1<span class="br0">&#41;</span> | <span class="kw2">grep</span> -o <span class="st0">&quot;Access Point: Not-Associated&quot;</span><br />
<span class="kw1">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan1 down<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;not connected, rebooting Wifi&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ifconfig wlan1 up<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">sleep</span> <span class="nu0">30</span><br />
<span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;connected&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">sleep</span> <span class="nu0">180</span><br />
<span class="kw1">fi</span></p>
<p><span class="kw1">done</span></div>
]]></content:encoded>
			<wfw:commentRss>http://alexsleat.co.uk/2010/11/05/ubuntu-disconnecting-from-wifi-and-failing-to-reconnect/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

