<?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>Principia Labs</title>
	<atom:link href="http://principialabs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://principialabs.com</link>
	<description>design, build, test, iterate.</description>
	<lastBuildDate>Thu, 07 Apr 2011 04:04:20 +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>Solder Paste Stenciling Tutorial</title>
		<link>http://principialabs.com/solder-paste-stenciling-tutorial/</link>
		<comments>http://principialabs.com/solder-paste-stenciling-tutorial/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 03:44:36 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=371</guid>
		<description><![CDATA[When it&#8217;s time to mass produce your PCBs, you&#8217;ll no doubt want to start working with SMCs &#8212; surface mount components &#8212; as a replacement for the through-hole components you&#8217;ve been using. The most effective way to solder SMCs to your PCB is through the use of a reflow oven. Before any of that happens, [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;"><iframe title="YouTube video player" width="570" height="360" src="http://www.youtube.com/embed/WDIqtGMROjM" frameborder="0" allowfullscreen></iframe></div>

<p>When it&#8217;s time to mass produce your PCBs, you&#8217;ll no doubt want to start working with SMCs &#8212; <a href="http://en.wikipedia.org/wiki/Surface-mount_technology">surface mount components</a> &#8212; as a replacement for the through-hole components you&#8217;ve been using.  The most effective way to solder SMCs to your PCB is through the use of a <a href="http://en.wikipedia.org/wiki/Reflow_soldering">reflow oven</a>.</p>

<p>Before any of that happens, though, you gotta get the solder paste on those tiny pads!  Bob from SparkFun Electronics shows you how in this short tutorial video.</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/solder-paste-stenciling-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino-Processing Serial Communication</title>
		<link>http://principialabs.com/arduino-processing-serial-communication/</link>
		<comments>http://principialabs.com/arduino-processing-serial-communication/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 01:36:09 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[serial]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=318</guid>
		<description><![CDATA[Over the last few weeks I&#8217;ve been messing around quite a bit with the Processing programming language. I was drawn to it initially because it is a close cousin to the Arduino language and programming environment (which is based on Processing), so naturally I wanted to find a way to combine the two in a [...]]]></description>
			<content:encoded><![CDATA[<div class="video">
<iframe src="http://player.vimeo.com/video/22055593?byline=0&amp;portrait=0" width="380" height="280" frameborder="0"></iframe>
</div>

<p>Over the last few weeks I&#8217;ve been messing around quite a bit with the <a href="http://processing.org/">Processing</a> programming language.  I was drawn to it initially because it is a close cousin to the <a href="http://arduino.cc/">Arduino</a> language and programming environment (which is based on Processing), so naturally I wanted to find a way to combine the two in a project.</p>

<p><strong>Background</strong></p>

<p>What I had in mind, of course, was an outlandishly-complicated, full-screen Processing user interface, with dials and button and knobs and sliders and big maps and graphs of data readouts and a little videoport showing the view from the Kinect-based eyes of some hardy Arduino-powered robot as it trundled bravely into the caldera of a smoking volcano.</p>

<div class="help" style="margin: 10px 6px 24px 6px;">
<strong>Rip and Burn Checklist &#8212; </strong> Already know your way around Processing and Arduino?  Here you go.
<ol>
  <li>Download  and install <a href="http://www.sojamo.de/libraries/controlP5/#installation">controlP5 GUI Library</a> for Processing.</li>
  <li>Download <a href='http://principialabs.com/wp-content/uploads/SliderSerial_Arduino.zip'>SliderSerial_Arduino</a>.</li>
  <li>Download <a href='http://principialabs.com/wp-content/uploads/SliderSerial_Processing.zip'>SliderSerial_Processing</a>.</li>
</ol>
</div>

<p>But alas, I thought it would be better to start small &#8212; with one little graphical slider control, one Arduino, and one LED.  The slider would command a brightness level for the LED, serial communication would do the talking, and pulse-width modulation (PWM) would do the legwork.  In my quest for the ultimate ready-made user interface, however, I did stumble across the awesome-looking and fully-featured <a href="http://www.sojamo.de/libraries/controlP5/">controlP5 GUI library</a> for Processing.</p>

<p><span id="more-318"></span></p>

<p><a href="http://principialabs.com/wp-content/uploads/controlP5.jpg"><img src="http://principialabs.com/wp-content/uploads/controlP5.jpg" alt="controlP5 GUI Library" title="controlP5 GUI Library" width="300"  class="aligncenter size-full wp-image-347" /></a></p>

<p><strong>Arduino Setup</strong></p>

<p>As you can see in the video, I used an <a href="http://www.adafruit.com/index.php?main_page=index&#038;cPath=19">Adafruit Boarduino</a> and a breadboard for this little experiment, and both are great!, but neither are necessary.  You need to have your Arduino plugged into your PC&#8217;s USB port (or serial, if you&#8217;re old school), and you need to have an LED and an appropriate resistor plugged into Pin 9 (or any PWM pin) and GND on the board (pictured below).  That&#8217;s it!</p>

<p><a href="http://principialabs.com/wp-content/uploads/arduino-led-setup.png"><img src="http://principialabs.com/wp-content/uploads/arduino-led-setup.png" alt="Arduino LED Setup" title="Arduino LED Setup" width="521" height="519" class="aligncenter size-full wp-image-336" /></a></p>

<p><strong>Software Setup</strong></p>

<p>You&#8217;re going to be running both the Arduino and Processing development environments side-by-side, so be careful not to confuse one for the other.  Open the <code>SliderSerial_Arduino</code> sketch (download it below) in the Arduino environment, and open <code>SliderSerial_Processing</code> in Processing.</p>

<p><a href="http://principialabs.com/wp-content/uploads/screenshot-1-880.png"><img src="http://principialabs.com/wp-content/uploads/screenshot-1-880-550x375.png" alt="Arduino and Processing" title="Arduino and Processing" width="550" height="375" class="aligncenter size-medium wp-image-337" /></a></p>

<p>If you don&#8217;t already have the controlP5 GUI library for Processing, download that as well and install it in your Processing <code>Libraries</code> folder (should be in the same directory where all your sketches are saved &#8212; see below for help installing libraries).</p>

<p>Upload the Arduino sketch to your Arduino board, then run the Processing sketch.  A small window should open, revealing the slider control, which should control the brightness of the LED.</p>

<p><strong>Serial Communication</strong></p>

<p>If the Processing sketch doesn&#8217;t work the first time, you may need to make a small adjustment to properly locate the port to which your Arduino is connected.  In the Processing sketch, look for this code block and follow the instructions in the comments:</p>

<pre name="code" class="arduino">
  // =======================================================
  //            SERIAL COMMUNICATION SETUP:
  // =======================================================
  
  // CHANGE THE FOLLOWING VARIABLE to match the port
  // to which your Arduino is connected.
  
  // SEE THE LIST of available ports in the black debugging
  // section at the bottom of the Processing window. (It will
  // appear after the first time you run the sketch.
  
  // THE LIST LOOKS LIKE THIS on Windows:
  //   [0] "COM1"
  //   [1] "COM3"
  //   [2]  etc...
  // or like this on a Mac:
  //   [0] "/dev/tty.usbserial-somenumbers"
  //   [1] "/dev/tty.usbserial-othernumbers"
  //   [3]  etc... 
  
  // TYPE THE NUMBER (inside the brackets) of the desired
  // port after the equals sign.
  
  int serialPortNumber = 0;
    
  // =======================================================
</pre>

<p><strong>Quick Reference Checklist</strong></p>

<ol>
  <li>Download and install the <a href="http://arduino.cc/en/Main/Software">Arduino software</a>.</li>
  <li>Download and install <a href="http://processing.org/download/">Processing</a>.</li>
  <li>Download  the <a href="http://www.sojamo.de/libraries/controlP5/#installation">controlP5 GUI Library</a> for Processing.</li>
  <li>Install the controlP5 library. (<a href="http://www.learningprocessing.com/tutorials/libraries">Here&#8217;s how</a>.)</li>
  <li>Download and unzip the <a href='http://principialabs.com/wp-content/uploads/SliderSerial_Arduino.zip'>SliderSerial_Arduino</a> sketch.</li>
  <li>Download and unzip  the <a href='http://principialabs.com/wp-content/uploads/SliderSerial_Processing.zip'>SliderSerial_Processing</a> sketch.</li>
  <li>Configure your Arduino and LED as pictured above.</li>
  <li>Open <code>SliderSerial_Arduino</code> in your Arduino software environment.</li>
  <li>Open <code>SliderSerial_Processing</code> in your Processing environment.</li>
  <li>Upload <code>SliderSerial_Arduino</code> to your Arduino.</li>
  <li>Run <code>SliderSerial_Processing</code> and make sure the LED will dim with the slider.</li>
  <li>If it works, congratulations!  If not, try changing the <code>serialPortNumber</code> variable as described above.</li>
</ol>

<p>I hope this little project helps people get Arduino and Processing working together.  This code could be the jumping off point for bigger things and I think Processing is a natural choice for interfacing Arduinos with PCs.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/arduino-processing-serial-communication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Winter Rocket Launch Operations</title>
		<link>http://principialabs.com/winter-rocket-launch-operations/</link>
		<comments>http://principialabs.com/winter-rocket-launch-operations/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 00:08:27 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[rocketry]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=247</guid>
		<description><![CDATA[I dug up some old Principia Aerospace footage for my first foray into iMovie (yeah, I just got my first Mac since OS 8), and put together this little 3-minute video chronicling a launch and CATO event from January, 2007. Lots more information and some extended video footage related to this project can be found [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;"><iframe title="YouTube video player" class="youtube-player" type="text/html" width="560" height="345" src="http://www.youtube.com/embed/3Vs-e5w9Svo" frameborder="0"></iframe></div>

<p>I dug up some old Principia Aerospace footage for my first foray into iMovie (yeah, I just got my first Mac since OS 8), and put together this little 3-minute video chronicling a launch and CATO event from January, 2007.</p>

<p>Lots more information and some extended video footage related to this project can be found in the following articles:</p>

<ul>
<li><p><a href="http://principialabs.com/rocket-mounted-digital-video-camera/">Rocket-Mounted Digital Video Camera</a></p></li>
<li><p><a href="http://principialabs.com/rocket-stability-and-performance/">Rocket Stability and Performance</a></p></li>
<li><p><a href="http://principialabs.com/cato-catastrophic-engine-failure/">CATO: Catastrophic Engine Failure</a></p></li>
</ul>

<p>Hope you enjoy it!</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/winter-rocket-launch-operations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The New Industrial Revolution</title>
		<link>http://principialabs.com/the-new-industrial-revolution/</link>
		<comments>http://principialabs.com/the-new-industrial-revolution/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 00:32:45 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=235</guid>
		<description><![CDATA[For the past few days, I&#8217;ve been jumping-out-of-my-shoes excited from reading the cover story of the February 2010 issue of Wired magazine entitled &#8220;The New Industrial Revolution,&#8221; by long-tail theorist Chris Anderson, and the related issue of Make magazine, the theme of which is &#8220;Desktop Manufacturing.&#8221; The Wired article is simply a must-read for anyone [...]]]></description>
			<content:encoded><![CDATA[<p><a style="background: none; padding: 0;" href="http://makezine.com/21/"><img src="http://media.aeropunk.com/uploads/MAKE-vol-21.jpg" alt="Make Magazine" title="Make Magazine" width="590" height="344" class="aligncenter size-full wp-image-2872" /></a></p>

<p>For the past few days, I&#8217;ve been jumping-out-of-my-shoes excited from reading the cover story of the February 2010 issue of <em>Wired</em> magazine entitled &#8220;<a href="http://www.wired.com/magazine/2010/01/ff_newrevolution/all/1">The New Industrial Revolution</a>,&#8221; by long-tail theorist Chris Anderson, and the related issue of <em>Make</em> magazine, the theme of which is &#8220;<a href="http://makezine.com/21/">Desktop Manufacturing</a>.&#8221;</p>

<p><span id="more-235"></span></p>

<p><a href="http://www.wired.com/magazine/2010/01/ff_newrevolution/all/1"><img src="http://media.aeropunk.com/uploads/wired.jpg" alt="Wired Magazine" title="Wired Magazine" width="191" height="257" class="alignright size-full wp-image-2875" /></a></p>

<p>The <em>Wired</em> article is simply a must-read for anyone interested in making things &#8212; in turning ideas into physical reality.</p>

<p><strong>The basic premise is this:</strong>  <em>The tools of digital design and fabrication &#8212; which traditionally were high-priced, closed-source, corporate-entity terrain &#8212; are now becoming cheap enough to find their way into the hands of small startups, <a href="http://en.wikipedia.org/wiki/Hackerspace">hackerspaces</a>, and even individuals.</em></p>

<h3>Digital Fabrication and the MakerBot</h3>

<p>What is digital fabrication?  <a href="http://100kgarages.com/">100kGarages</a> says it best:</p>

<blockquote>Digital fabrication allows a precise design to be created using computer software and then passed to another computer attached to a fabrication or CNC tool, which are capable of producing the 3D design with high precision and detail. This fidelity to the design means that the parts or components are cut, drilled, or machined exactly as expected and exactly the same each time.</blockquote>

<p>Both <em>Make</em> and <em>Wired</em> profile <a href="http://www.makerbot.com/">MakerBot Industries</a>, and their associated physical and virtual communities, NYC Resistor and Thingiverse.  MakerBot is a three-person startup in NYC which sells kits for their &#8220;Cupcake CNC&#8221; 3D printers &#8212; computer-controlled devices that can take a digital file of a 3D object and &#8220;print&#8221; the real thing right on your desktop &#8212; all for under $1000.</p>

<p><a href="http://www.nycresistor.com/">NYC Resistor</a> is a Brooklyn hackerspace where the MakerBot founders met and tested ideas for their prototype device, and <a href="http://www.thingiverse.com/">Thingiverse</a> is their online repository of downloadable and printable objects &#8212; all created and uploaded by their community of MakerBot users.</p>

<p>You can learn more about MakerBot and Thingiverse from the video below:</p>

<div style="text-align: center; padding: 5px 5px 10px 5px;"><object id="bbg_player" width="590" height="351" data="http://www.babelgum.com/embed/4020782" type="application/x-shockwave-flash"> <param name="movie" value="http://www.babelgum.com/embed/4020782" />    <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="never" /> </object></div>

<h3>Open-Source Hardware and the Long Tail</h3>

<p>What this means is that more and more garage and basement hackers are going to be able to bring their ideas to marketplace.  They&#8217;ll be able to create the &#8220;<a href="http://en.wikipedia.org/wiki/Long_Tail">long tail</a>&#8221; of products that the big corporations can&#8217;t, while retaining the flexibility to change direction swiftly and iterate more often.</p>

<p>What&#8217;s more, the shared nature of what Tom Igoe calls &#8220;<a href="http://www.tigoe.net/blog/category/environment/295/">open fabrication</a>&#8221; will allow makers from all over the world to collaborate on open-source <em>hardware</em> projects, just like they do with software today.</p>

<p><em>Big changes are coming.</em></p>

<h3>Cool Links</h3>

<p>Some popular 3D <abbr title="Computer-Aided Design">CAD</abbr> software:</p>

<ul>
<li><a href="http://www.solidworks.com/">SolidWorks</a> The (pricey) real deal.</li>
<li><a href="http://www.rhino3d.com/">Rhino 3D</a> Free trial.</li>
<li><a href="http://www.alibre.com/">Alibre Design</a> Free (Xpress version).</li>
<li><a href="http://sketchup.google.com/">Google SketchUp</a> Free.</li>
</ul>

<p>Some Personal CNC tools:</p>

<ul>
<li><a href="http://lumenlab.com/">Lumenlab</a> &#8220;micRo&#8221; universal fabricator.</li>
<li><a href="http://www.shopbottools.com/">ShopBot</a> Shop-sized mill/router.</li>
<li><a href="http://www.tormach.com/">Tormach</a> Bench-top CNC mills. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/the-new-industrial-revolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetHogs: Bandwidth Stats by Process</title>
		<link>http://principialabs.com/nethogs-bandwidth-stats-by-process/</link>
		<comments>http://principialabs.com/nethogs-bandwidth-stats-by-process/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 17:27:31 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=196</guid>
		<description><![CDATA[Have you ever been messing around on your Ubuntu box, only to notice some sluggishness or some suspicious spikes in your internet connection, and wondered, &#8220;What the hell is using up all that bandwidth?&#8221; Or worse, &#8220;Have I been hacked?&#8221; If so, then NetHogs might be the program for you. NetHogs is a lightweight Linux [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever been messing around on your Ubuntu box, only to notice some sluggishness or some suspicious spikes in your internet connection, and wondered, &#8220;What the hell is using up all that bandwidth?&#8221;  Or worse, &#8220;Have I been hacked?&#8221;  If so, then <a href="http://nethogs.sourceforge.net/">NetHogs</a> might be the program for you.</p>

<div style="text-align: center;"><a href="http://nethogs.sourceforge.net/" target="_blank" style="background: none;"><img src="http://principialabs.com/wp-content/uploads/nethogs.png" alt="NetHogs" title="NetHogs" width="484" height="345" class="aligncenter size-full wp-image-197" /></a></div>

<p>NetHogs is a lightweight Linux terminal-based tool that monitors bandwidth usage, then groups it <em>by process</em>, so you can see which PIDs are using the most bandwidth, and if necessary, kill them with System Monitor.</p>

<p>To install NetHogs on Ubuntu (tested on 9.10 Karmic), you can either use Synaptic or simply <code>apt-get</code>, like so:</p>

<pre><code>sudo apt-get install nethogs
</code></pre>

<p>To run NetHogs, simply feed it the internet connection you wish to examine, and sit back.</p>

<pre><code>sudo nethogs eth0
</code></pre>

<p>For more information and the full list of options, visit the NetHogs man page.</p>

<pre><code>man nethogs
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/nethogs-bandwidth-stats-by-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bootsplash Resolution in Kubuntu</title>
		<link>http://principialabs.com/bootsplash-resolution-in-kubuntu/</link>
		<comments>http://principialabs.com/bootsplash-resolution-in-kubuntu/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 15:11:16 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=66</guid>
		<description><![CDATA[One of the annoying little setup items on my list of things to do every time I reinstall Kubuntu is changing the bootsplash screen resolution from 800&#215;600 to something more appropriate for my monitor, specifically, 1280&#215;1024. Here&#8217;s how it&#8217;s done: sudo nano /etc/usplash.conf The file should be altered to read: # Usplash configuration file # [...]]]></description>
			<content:encoded><![CDATA[<p>One of the annoying little setup items on my list of things to do every time I reinstall Kubuntu is changing the bootsplash screen resolution from 800&#215;600 to something more appropriate for my monitor, specifically, 1280&#215;1024. Here&#8217;s how it&#8217;s done:</p>

<pre><code>sudo nano /etc/usplash.conf
</code></pre>

<p>The file should be altered to read:</p>

<pre><code># Usplash configuration file
# These parameters will only apply after running update-initramfs.

xres=1280
yres=1024
</code></pre>

<p>The final step is to update <code>initramfs</code>, the initial RAM disk used by the kernel when Linux first boots up:</p>

<pre><code>sudo update-initramfs -u
</code></pre>

<p>If you skip the last step, you will probably only see your new <code>usplash</code> resolution during shutdown and not when your computer boots up.</p>

<p>That&#8217;s it! </p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/bootsplash-resolution-in-kubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Web Search Agent</title>
		<link>http://principialabs.com/python-web-search-agent/</link>
		<comments>http://principialabs.com/python-web-search-agent/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 21:27:09 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=165</guid>
		<description><![CDATA[So there was this web page, nothing more than a text file in fact, which I was compelled to check regularly. I had ordered something online from a company whose web-store design was still in the dark ages, and their &#8220;method&#8221; of letting customers know whether or not their products had shipped was to periodically [...]]]></description>
			<content:encoded><![CDATA[<p>So there was this web page, nothing more than a text file in fact, which I was compelled to check regularly.  I had ordered something online from a company whose web-store design was still in the dark ages, and their &#8220;method&#8221; of letting customers know whether or not their products had shipped was to periodically update a web-viewable text file with a public list of <em>all</em> the order numbers that had recently shipped.  Very private and secure, I know.</p>

<p>No, no, they couldn&#8217;t <em>possibly</em> email this information to you &#8212; you had to check the page manually.  And if your products were backordered, as mine were, you&#8217;d be checking often.</p>

<p>Well, that&#8217;s just stupid, I thought, and since I had a computer sitting right in front of me, I thought it might be a good idea to automate the process.</p>

<p>So I cobbled together a little Python script on my Ubuntu box, which uses the <a href="http://pycurl.sourceforge.net/">pycURL interface</a> to grab the URL in question, parse it, search it for my order number, and then fire me off an email (using <code>sendmail</code>) if and when it finds anything.</p>

<p>I automated the script to run hourly using <code>cron</code>, like so:</p>

<pre><code>crontab -e
</code></pre>

<p>and then included the following line in my crontab file:</p>

<pre><code># m h  dom mon dow   command
7 * * * * /path/to/searchagent.py
</code></pre>

<p>Seven minutes after the hour (for luck), every hour, every day.</p>

<p>On the hunch that this script might be useful to somebody else, I decided to post it here.  Fair warning to all: this is a <em>huge hack</em>, and I&#8217;m sure it needs work.  Also, there&#8217;s probably a better method that I&#8217;ve completely overlooked.  Comments, corrections, and suggestions are welcome, as always.</p>

<p>Here&#8217;s the script:</p>

<p><span id="more-59"></span></p>

<div><pre name="code" class="python">

#!/usr/bin/env python

#############################
# Module:   searchagent.py
# Author:   Brian D. Wendt
# Date:     2008/08/15
# Version:  Draft 0.3
'''
Searches for a specified string in a supplied webpage,
then sends an email when found.

Requires Linux 'sendmail' and 'pycurl' module.
On Ubuntu, try 'sudo apt-get install sendmail python-pycurl'
'''
################################

import sys, os
import pycurl

#####################################################
### Edit these variables! ###########################
#####################################################

# webpage to search
url = 'http://reddit.com/'

# string to find in the webpage
query_string = "LOLcats"

# email message particulars
to_name    = "Harry S. Noob"
to_email   = "hsnoob@example.com"
from_name  = "Python Search Agent"
from_email = "searchagent@example.com"
subject    = "We've Found Something!"
body       = "Your search query %s was found in a scan of %s." % (query_string, url)

#####################################################
### The mail-sending function (requires sendmail) ###
#####################################################

def sendmail(to_name, to_email, from_name, from_email, subject, body):
    # full path to sendmail
    mailerdaemon = "/usr/sbin/sendmail"
    # logfile when email sent (so you only send once!)
    email_log = "searchagent.log"
    # format the message
    mail = "To: \"%s\" <%s>\nFrom: \"%s\" <%s>\nSubject: %s\n\n%s" % (to_name, to_email, from_name, from_email, subject, body)
    # check to see if the email logfile exists
    try:
        logfile = open(email_log, 'r')
        email_sent = logfile.readline()
    except:
        email_sent = ""
    # if no mail's been sent, send one
    if email_sent == "":
        # open a pipe to sendmail and write message to the pipe
        print "Sending email..."
        p = os.popen("%s -t" % mailerdaemon, 'w')
        p.write(mail)
        exitcode = p.close()
        if exitcode:
            print "Oops! There was an error: %s" % exitcode
        else:
            print "Mail sent!"
            # log the sending, so you don't send again
            log = open(email_log, 'w')
            log.write("MAIL SENT")
    else:
        print "Email already sent!  Exiting..."

#####################################################
### Read the webpage using pyCURL ###################
#####################################################

# some CURL options (pose as a Mozilla browser)
USER_AGENT = 'Mozilla/4.0 (compatible; MSIE 6.0)'
headers = ['Cache-control: max-age=0', 'Pragma: no-cache', 'Connection: Keep-Alive']

# create temporary textfile for results
tempfile = "TEMP-HTML.txt"
outputfile = open(tempfile, "w")

# keep track of the result count and results list
results_count = 0
results_list = []

# set up CURL object
c = pycurl.Curl()
c.setopt(pycurl.URL, url)
c.setopt(pycurl.HEADER, 1)
c.setopt(pycurl.USERAGENT, USER_AGENT)
c.setopt(pycurl.FOLLOWLOCATION, 1)
c.setopt(pycurl.CONNECTTIMEOUT, 40)
c.setopt(pycurl.TIMEOUT, 300)
c.setopt(pycurl.FILE, outputfile);
c.perform()
outputfile.close()

# now search the file line by line
file = open(tempfile, "r")
for line in file.readlines():
    search = line.find(query_string)
    if search != -1:
        # store results in a list, if desired
        # results_list.append(line.strip())
        results_count += 1

# if there's any result, send an email
if results_count > 0:
    print "Found a match.  ",
    sendmail(to_name, to_email, from_name, from_email, subject, body)
else:
    print "No matches found."

# delete temporary textfile
os.remove(tempfile)
</pre></div> 
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/python-web-search-agent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oshkosh: The Spirit of Aviation</title>
		<link>http://principialabs.com/oshkosh-the-spirit-of-aviation/</link>
		<comments>http://principialabs.com/oshkosh-the-spirit-of-aviation/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 01:06:22 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[aviation]]></category>
		<category><![CDATA[eaa]]></category>
		<category><![CDATA[homebuilding]]></category>
		<category><![CDATA[oshkosh]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=131</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><embed src="http://services.brightcove.com/services/viewer/federated_f8/1119669386" bgcolor="#FFFFFF" flashVars="videoId=1381694270&#038;playerId=1119669386&#038;viewerSecureGatewayURL=https://console.brightcove.com/services/amfgateway&#038;servicesURL=http://services.brightcove.com/services&#038;cdnURL=http://admin.brightcove.com&#038;domain=embed&#038;autoStart=false&#038;" base="http://admin.brightcove.com" name="flashObj" width="600" height="470" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed> </p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/oshkosh-the-spirit-of-aviation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beginning SSH on Ubuntu</title>
		<link>http://principialabs.com/beginning-ssh-on-ubuntu/</link>
		<comments>http://principialabs.com/beginning-ssh-on-ubuntu/#comments</comments>
		<pubDate>Fri, 30 May 2008 01:49:02 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=102</guid>
		<description><![CDATA[So let&#8217;s say you have a private LAN running in your secret underground lab. Maybe you&#8217;ve got a Linux box hardwired to a WiFi router, and maybe a Mac or Linux laptop floating around somewhere, and you need a quick way to transfer files or execute shell commands remotely. What you need is SSH, the [...]]]></description>
			<content:encoded><![CDATA[<p>So let&#8217;s say you have a private <acronym title="Local Area Network">LAN</acronym> running in your secret underground lab.  Maybe you&#8217;ve got a Linux box hardwired to a WiFi router, and maybe a Mac or Linux laptop floating around somewhere, and you need a quick way to transfer files or execute shell commands remotely.</p>

<p>What you need is <a href="http://en.wikipedia.org/wiki/Secure_Shell">SSH</a>, the Secure Shell.  SSH is a powerful tool which allows secure remote login over insecure networks. It provides an encrypted terminal session with strong authentication of both the server and client using public-key cryptography.  This tutorial will cover the basics of SSH&#8217;s most useful features:</p>

<ul>
<li>Logging into a remote computer over a secure connection.</li>
<li>Transferring files and directories between computers over a secure connection.</li>
<li>Enabling public-key authentication.</li>
<li>Passwordless authentication for use with scripts and cron jobs.</li>
</ul>

<p>The following assumptions are made about the reader:</p>

<ul>
<li>You know what a terminal/command line/shell is and how to start a session.</li>
<li>You have at least a basic familiarity with Linux/Mac command-line syntax.</li>
<li>You&#8217;re on a private LAN with access to at least two Linux/Mac computers (or, you have a user account on a remote server that accepts SSH connections).</li>
</ul>

<p>As always, comments, corrections, and suggestions for improvement are appreciated.</p>

<h3>Installing OpenSSH</h3>

<p>The Ubuntu (and MacOS X) flavor of SSH is called <a href="http://www.openssh.org/">OpenSSH</a>, a free, open-source implementation of the <code>ssh</code> protocol.  It consists of two basic components, an <code>openssh-client</code> and an <code>openssh-server</code>.  SSH clients communicate with SSH servers over encrypted network connections.</p>

<p><span id="more-56"></span></p>

<p>The <code>openssh-client</code> software should already be installed by default on Ubuntu.  If you want to be able to accept SSH connections as well as request them, you&#8217;ll need the server software as well.  The easiest way to ensure you have both is simply to run:</p>

<pre><code>sudo apt-get install openssh-client openssh-server
</code></pre>

<h3>Using SSH to Log into a Remote Computer</h3>

<p>Once OpenSSH is installed, you can login to a remote SSH server by using the <code>ssh</code> command:</p>

<pre><code>ssh remoteuser@remotebox
</code></pre>

<p>where <code>remoteuser</code> is the username of the remote account you&#8217;re trying to access, and <code>remotebox</code> is the remote server&#8217;s hostname or IP address.</p>

<p>For example, if you know that your Kubuntu desktop box (now running <code>openssh-server</code>) has a user account named <code>joebanks</code> and that the IP address of that computer on your private LAN is <code>192.168.0.12</code>, you could login remotely to that account from your Linux/Mac laptop by typing:</p>

<pre><code>ssh joebanks@192.168.0.12
</code></pre>

<div class="help">
If you&#8217;re unsure of a computer&#8217;s local IP address, try running <code>ifconfig</code> on that machine.  This will display the status of the active network interfaces, and the local IP address of that device will be listed after <code>inet addr</code>.  It will most likely be in the form of <code>192.168.0.xx</code>.
</div>

<p>Or, if you&#8217;ve got a web hosting account that allows shell access (e.g., <a href="http://dreamhost.com/">DreamHost</a>) with a domain name like <code>cooldomain.com</code>, your syntax might look like:</p>

<pre><code>ssh joebanks@cooldomain.com
</code></pre>

<p>Now, the first time an SSH client encounters a new remote server, it will report that it&#8217;s never seen the machine before, by printing the following message:</p>

<pre><code>The authenticity of host 'remotebox (192.168.0.12)' can't be established.
RSA key fingerprint is 53:b4:ad:c8:51:17:99:4b:c9:08:ac:c1:b6:05:71:9b.
Are you sure you want to continue connecting (yes/no)?
</code></pre>

<p>This is just an extra security measure to ensure that you&#8217;re actually connecting to the machine you think you are.  If you type <code>yes</code> (the most common response), you&#8217;ll see the following:</p>

<pre><code>Warning: Permanently added 'remotebox' (RSA) to the list of known hosts.
</code></pre>

<p>Subsequent login attempts to this machine will omit the warning message.  You&#8217;ll then be asked for the <code>remoteuser</code>&#8216;s password:</p>

<pre><code>remoteuser@remotebox's password:
</code></pre>

<p>And after correctly entering it, like magic, you&#8217;ll be logged into the remote machine, and instead of your local machine&#8217;s command prompt, you&#8217;ll see the following:</p>

<pre><code>remoteuser@remotebox:~$
</code></pre>

<p>And, voila!  You can execute commands on the remote machine just as you would on your local box.  To close the connection to the remote server, type <code>exit</code>, or use <code>Ctrl-D</code>.</p>

<h3>Copying Files</h3>

<p>To transfer files and directories from your local machine to the remote server and vice-versa, you&#8217;ll use SSH&#8217;s &#8220;secure copy&#8221; command, or <code>scp</code>.  To copy a single file from your local machine to the server, use the following syntax:</p>

<pre><code>scp file.txt remoteuser@remotebox:/directory
</code></pre>

<p>where <code>file.txt</code> is the name of a file in the current directory of your local machine, <code>remoteuser@remotebox</code> is the username and hostname or IP address of the server (just like in the above <code>ssh</code> examples, and <code>/directory</code> is the directory path on the server where you want your file copied.</p>

<p>For example, if you want to copy the local <code>file.txt</code> to the <code>/home/joebanks/docs</code> directory on the server you logged into above, you&#8217;ll run the following command from a <em>local terminal session:</em></p>

<pre><code>scp file.txt joebanks@192.168.0.12:/home/joebanks/docs
</code></pre>

<div class="help">
By &#8220;local terminal session,&#8221; I mean that you DO NOT first <code>ssh</code> in to the remote computer and <i>then</i> run the <code>scp</code> command.  Secure copy opens the <code>ssh</code> tunnel on its own.  Since secure copy uses the <code>ssh</code> protocol for a secure connection, whenever you run the <code>scp</code> command, you&#8217;ll be prompted for a password (or passphrase) if the <code>ssh</code> connection requires it.
</div>

<p>You can be as verbose as you want with the local and remote filenames and directories, even changing the filename in the process, like so:</p>

<pre><code>scp ~/docs/oldfile.txt joebanks@192.168.0.12:/home/joebanks/docs/newfile.txt
</code></pre>

<p>To copy a file from the server to your local machine, use the following syntax:</p>

<pre><code>scp remoteuser@remotebox:file.txt /local/directory
</code></pre>

<p>where <code>remoteuser@remotebox</code> is the username and hostname or IP address of the server, <code>file.txt</code> is a file in the /home/remoteuser directory, and <code>/local/directory</code> is the local directory path into which the file will be copied.</p>

<p>Again, you can be as verbose as necessary, for example:</p>

<pre><code>scp joebanks@192.168.0.12:~/docs/newfile.txt /home/joe/downloads
</code></pre>

<h3>Copying Directories</h3>

<p>To copy an entire directory (and all of its contents) from the local machine to the remote server, use the recursive <code>-r</code> switch, like so:</p>

<pre><code>scp -r /local/directory remoteuser@remotebox:/remote/directory
</code></pre>

<p>where <code>/local/directory</code> is the path to the local directory you want copied, and <code>/remote/directory</code> is the remote directory <em>into which</em> you want the directory to be copied.</p>

<p>To copy an entire directory (and all of its contents) from the remote server to the local machine, use the following:</p>

<pre><code>scp -r remoteuser@remotebox:/remote/directory /local/directory
</code></pre>

<p>where <code>/remote/directory</code> is the path to the remote directory you want copied, and <code>/local/directory</code> is the local directory <em>into which</em> you want the directory to be copied.</p>

<h3>Stop Typing the Stupid IP Address All Day, Will You?</h3>

<p>By now you&#8217;re no doubt getting sick of typing <code>joebanks@192.168.0.12</code> or whatever. It sure would be nice to type something shorter. Let&#8217;s fix that.</p>

<p>OpenSSH uses a client configuration file, located at <code>~/.ssh/config</code>, to simplify some of the tedious typing associated with logging into remote machines.  To edit (or create) that file, we&#8217;ll use the nano text editor, but you can use vi, emacs, kate or whatever:</p>

<pre><code>nano ~/.ssh/config
</code></pre>

<p>The simplest configuration file might look something like this:</p>

<pre>
Host volcano
  HostName 192.168.0.12
</pre>

<p>This associates the Host <code>volcano</code> with the HostName (or IP address) <code>192.168.0.12</code>, so now to login you&#8217;ll only need to type:</p>

<pre><code>ssh joebanks@volcano
</code></pre>

<p>That&#8217;s cool, but let&#8217;s get a little more lazy, shall we?  How about this:</p>

<pre>
Host BigWoo
  HostName 192.168.0.12
  User joebanks
</pre>

<p>Now all we need to type is:</p>

<pre><code>ssh BigWoo
</code></pre>

<p>Far out!  You can add as much configuration data as you need to this Host, and as many different Hosts as you like.  And this shorthand will also work with all the <code>scp</code> examples:</p>

<pre><code>scp file.txt BigWoo:
</code></pre>

<p>To learn more visit the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config">OpenSSH docs</a>, or run <code>man ssh_config</code>.</p>

<h3>Public-Key Authentication</h3>

<p>To increase the security of your SSH session, or to set up passwordless authentication, you can enable SSH&#8217;s built-in <a href="http://en.wikipedia.org/wiki/Public-key_cryptography">public-key cryptography</a>.  Then, instead of entering the <code>remoteuser</code>&#8216;s password on each login attempt, SSH will initiate a challenge-and-response protocol which attempts to match an encrypted public key (stored on the server) with a protected private key (stored on the local machine).  This completely eliminates the need to send sensitive information (like a password) over the network, encrypted or not.</p>

<p>To generate a public/private key pair on your local machine, open a terminal and type:</p>

<pre><code>ssh-keygen -t dsa
</code></pre>

<p>You&#8217;ll see the following message:</p>

<pre><code>Generating public/private dsa key pair.
Enter file in which to save the key (~/.ssh/id_dsa):
</code></pre>

<p>Hit <code>Enter</code>.  This selects the default location.  Next you&#8217;ll see:</p>

<pre><code>Enter passphrase (empty for no passphrase):
</code></pre>

<p>Enter a secure passphrase, ideally something unique and unguessable.  Unlike a password, a passphrase is usually a phrase or complete sentence, with spaces and punctuation if you like.  The longer and more obscure the phrase, the stronger it is.</p>

<div class="help">
<b>Note:</b> It is also acceptable to just hit <code>Enter</code> at this point, thereby selecting <i>no passphrase.</i>  This can be appropriate in some instances (see below), but you should be aware that it is <i>not</i> as secure.  While <code>ssh</code> will still use an encrypted public/private keypair  (which is almost certainly more secure than typing the remote user&#8217;s password like you&#8217;ve been doing), anyone gaining access to your local account will thereby also gain unfettered access to any remote hosts which recognize your public key.
</div>

<p>After typing a passphrase and hitting <code>Enter</code>, you&#8217;ll see:</p>

<pre><code>Enter same passphrase again:
</code></pre>

<p>Enter the same passphrase again.  And finally:</p>

<pre><code>Your identification has been saved in ~/.ssh/id_dsa.
Your public key has been saved in ~/.ssh/id_dsa.pub.
The key fingerprint is:
42:ac:8a:81:31:81:e5:7b:d2:01:42:2d:64:32:0f:dd localuser@localbox
</code></pre>

<p>Now copy your public key, which is stored in the local file <code>~/.ssh/id_dsa.pub</code> to the remote machine, by running the following command from a <em>local terminal session:</em></p>

<pre><code>ssh-copy-id -i ~/.ssh/id_dsa.pub remoteuser@remotebox
</code></pre>

<p>You&#8217;ll be prompted for the <code>remoteuser</code>&#8216;s password one last time, and then you&#8217;ll see the message:</p>

<pre><code>Now try logging into the machine, with "ssh 'remoteuser@remotebox'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.
</code></pre>

<div class="help">
<b>MacOSX Users:</b>  If the <code>ssh-copy-id</code> method doesn&#8217;t work with your version of OpenSSH, try the following command:
<p>
<code>cat ~/.ssh/id_dsa.pub | ssh remoteuser@remotebox 'cat >> .ssh/authorized_keys'</code>
</p>
Or, if the <code>~/.ssh</code> directory doesn&#8217;t yet exist on the remote machine, you can create the directory <i>and</i> copy the public key all in one swell foop, like so:
<p>
<code>cat ~/.ssh/id_dsa.pub | ssh remoteuser@remotebox 'mkdir .ssh; cat >> .ssh/authorized_keys'</code>
</p>
</div>

<p>Once the <code>~/.ssh/authorized_keys</code> file on the remote machine contains your public key, you&#8217;ll be prompted for your passphrase at each login attempt, rather than the <code>remoteuser</code>&#8216;s system password, like so:</p>

<pre><code>Enter passphrase for key '~/.ssh/id_dsa':
</code></pre>

<p>Finally, it&#8217;s a good idea to change the permissions of the <code>~/.ssh</code> directory and the <code>~/.ssh/id_dsa</code> file on your local machine, to disable any outside access to your private key.</p>

<pre><code>chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_dsa
</code></pre>

<h3>Passwordless Authentication for Automated Tasks</h3>

<p>You can use <code>ssh</code> and <code>scp</code> in shell scripts and cron jobs to automate repetitive tasks, such as remote backups of critical files.  To do so, however, you&#8217;ll need to implement some sort of passwordless authentication scheme, so that scripts can run without human intervention.</p>

<p>Two methods are presented below, the first is the easiest to implement (and possibly the most prevalent), while the second is the most secure.</p>

<h4>Method 1:  Sans Passphrase</h4>

<p>If you want your scripts to have access to the <code>ssh</code> command without requiring a password or passphrase, simply go through the steps outlined above for enabling public-key authentication, but instead of entering a passphrase when prompted, simply press <code>Enter</code>.</p>

<p>The <code>ssh-keygen</code> program will generate a public/private key pair for you that will allow password- and passphrase-less access to any remote server which has your public key stored in its <code>authorized_keys</code> file.</p>

<p><strong>Is this secure?</strong>  Well, no.  And yes.  It&#8217;s probably more secure than typing in the <code>remoteuser</code>&#8216;s password and sending it over the network.  Sure it&#8217;s encrypted, but it could still be intercepted.</p>

<p>Public-key authentication sends no password or passphrase data over the network.  The &#8220;challenge&#8221; sent by the server is encrypted with your public key, and can only be decrypted with your private key, which only you have.</p>

<p>However, as mentioned above, if someone gains access to your local computer, they&#8217;ll also have access to every remote server with your public key.</p>

<p>So, you&#8217;ll need to decide the level of security required.  In my opinion, if you&#8217;re only communicating with machines on a private LAN, under your control, behind a router&#8217;s firewall, then this method is adequate.  Others may disagree.</p>

<h4>Method 2: Using ssh-agent and keychain</h4>

<p>The &#8220;proper&#8221; and secure way to achieve passwordless authentication is by using the <code>ssh-agent</code> and <code>keychain</code> daemons to store your passphrase between terminal sessions, so you don&#8217;t need to type it every time.</p>

<p>Setup of this method is beyond the scope of this article, but the following tutorials will walk you through the entire process, as well as the theory behind it:</p>

<ul>
<li><a href="http://www.ibm.com/developerworks/library/l-keyc.html">OpenSSH key management, Part 1</a></li>
<li><a href="http://www.ibm.com/developerworks/library/l-keyc2/">OpenSSH key management, Part 2</a></li>
</ul>

<h3>Go Forth and SSHify!</h3>

<p>I hope this tutorial serves as a gentle introduction to the Secure Shell.  For further reading and advanced topics, check out the references listed below, and browse the <a href="http://www.openssh.org/manual.html">OpenSSH Documentation</a>.  Thanks for reading.</p>

<h3>References</h3>

<ol>
<li><a href="http://www.suso.org/docs/shell/ssh.sdf">SSH Tutorial for Linux</a></li>
<li><a href="https://help.ubuntu.com/community/SSHHowto">SSH: Ubuntu Community Documentation</a></li>
<li><a href="http://www.kuro5hin.org/story/2001/10/21/134817/35">Secure Communications with OpenSSH</a></li>
<li><a href="http://kimmo.suominen.com/docs/ssh/">Getting Started with SSH</a></li>
<li><a href="http://kb.iu.edu/data/agye.html">Indiana University Knowledge Base: SCP</a></li>
<li><a href="http://www.hypexr.org/linux_scp_help.php">Example Syntax for Secure Copy</a></li>
<li><a href="http://tiswww.case.edu/php/chet/bash/bashref.html">Bash Reference Manual</a> </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/beginning-ssh-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>LightScribe on Ubuntu</title>
		<link>http://principialabs.com/lightscribe-on-ubuntu/</link>
		<comments>http://principialabs.com/lightscribe-on-ubuntu/#comments</comments>
		<pubDate>Sat, 17 May 2008 22:33:31 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[lightscribe]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=92</guid>
		<description><![CDATA[LightScribe is an innovative technology that uses a special disc drive, special media, and label-making software to burn labels directly onto CDs and DVDs. The labels are laser-etched, not printed, so there&#8217;s no ink, no smudging, and no peeling. LightScribe lets you create one-of-a-kind designs with your own photos, text, and artwork. The days of [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.lightscribe.com/'><img src="http://principialabs.com/wp-content/uploads/lightscribe-logo.jpg" alt="LightScribe Logo" title="lightscribe-logo" width="150" height="132" class="alignleft size-full wp-image-95" /></a></p>

<p><strong><a href="http://www.lightscribe.com/">LightScribe</a></strong> is an innovative technology that uses a special disc drive, special media, and label-making software to burn labels <em>directly</em> onto CDs and DVDs.  The labels are laser-etched, not printed, so there&#8217;s no ink, no smudging, and no peeling.</p>

<p>LightScribe lets you create one-of-a-kind designs with your own photos, text, and artwork.  The days of hand-labeling or printing stickers for your CDs and DVDs are over.</p>

<p><img src="http://principialabs.com/wp-content/uploads/lightscribe-martini.jpg" alt="" title="lightscribe-martini" width="140" height="140" style="float:right; padding-left: 10px;" /></p>

<p>This short tutorial will describe how to install and run LightScribe software on Ubuntu.  These instructions are tailored specifically for Ku/Xu/Ubuntu 64-bit users, since the LightScribe software is designed for the 32-bit architecture.  Where necessary, alterations for 32-bit users are included.</p>

<h3>What You Need</h3>

<p>Before downloading anything, make sure you have the necessary hardware and materials at hand, or you may have to make an emergency trip to your local big-box electronics store.</p>

<p><strong>LightScribe hardware</strong></p>

<p>LightScribe-enabled disc drives do double duty. The same laser that burns your data will also laser-etch your customized CD/DVD labels.   <a href="http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&amp;N=40000005&amp;Description=lightscribe&amp;name=CD+%2f+DVD+Burners">LightScribe-enabled CD/DVD burners</a> are ubiquitous these days.  You may already have one.</p>

<p><span id="more-55"></span></p>

<p>Just look for the LightScribe logo on the drive bay door:</p>

<div style="text-align: center;">
<img src="http://principialabs.com/wp-content/uploads/lightscribe-burner.jpg" alt="LightScribe Burner" title="lightscribe-burner" width="190" height="198" class="alignnone size-full wp-image-98" />
</div>

<p><strong>LightScribe media</strong></p>

<p><a href="http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&amp;N=+40000071&amp;Configurator=&amp;Subcategory=-1&amp;description=lightscribe&amp;Ntk=&amp;srchInDesc=">LightScribe CDs and DVDs</a> have a special coating that interacts with the laser in your LightScribe-enabled disc drive. You must use LightScribe CDs and DVDs in order to burn a label onto your discs.</p>

<div style="text-align: center;">
<img src="http://principialabs.com/wp-content/uploads/lightscribe-cd-r.jpg" alt="LightScribe CD-R" title="lightscribe-cd-r" width="300" height="166" class="alignnone size-full wp-image-97" />
</div>

<p><strong>LightScribe software</strong></p>

<p>LightScribe software may have come packaged with your CD/DVD burner, and different flavors are available from a variety of vendors online.  Unfortunately, they&#8217;re all for Windows.  For Linux, we&#8217;ll be using basically two programs: (1) the LightScribe System Software, which handles the low-level system tasks like communicating with your disc drive, and; (2) the Lacie LightScribe Labeler for Linux, or <code>4L</code> for short.</p>

<div style="text-align: center;">
<img src="http://principialabs.com/wp-content/uploads/4l-gui.jpg" alt="4L-gui" title="4l-gui" width="300" height="338" class="alignnone size-full wp-image-99" />
</div>

<h3>Installing the Software</h3>

<p><strong>1.  Download</strong> the LightScribe System Software using the following command, or get the most current version from the <a href="http://lightscribe.com/downloadSection/linux/">LightScribe Downloads</a> page.  Open a terminal and paste the following code:</p>

<pre>
wget http://download.lightscribe.com/ls/lightscribe-1.12.37.1-linux-2.6-intel.deb
</pre>

<p><strong>2. Download</strong> the Lacie LightScribe Labeler for Linux (4L).</p>

<p>from here:</p>

<pre>
wget http://principialabs.com/files/4l_1.0-r6_i386.deb
</pre>

<p>or here:</p>

<pre>
wget http://uploads.mitechie.com/lightscribe/4l_1.0-r6_i386.deb
</pre>

<p><strong>3.  Install</strong> the LightScribe System Software.  <em>Important: You must install this first, before installing 4L!</em>  Open a terminal and paste the following code, but be sure the package name matches the one you downloaded from the LightScribe website (e.g. <code>lightscribe-1.12.37.1-linux-2.6-intel.deb</code>).  [Note:  For 32-bit users, simply remove the <code>--force-architecture</code> switch from the command.]
<pre>
sudo dpkg --force-architecture -i lightscribe-1.12.37.1-linux-2.6-intel.deb
</pre></p>

<p><strong>4.  Install</strong> 4L, the Lacie LightScribe Labeler for Linux.  <em>Important: You must install the LightScribe System Software first, or this won&#8217;t work!</em>  [Note:  For 32-bit users, simply remove the <code>--force-architecture</code> switch from the command.]
<pre>
<code>sudo dpkg --force-architecture -i 4l_1.0-r6_i386.deb</code>
</pre></p>

<h3>Running the Lacie LightScribe Labeler</h3>

<p>The graphical user interface to 4L is called <code>4L-gui</code> and can be run from the command line.  It must be run as the root user, like so:</p>

<pre>
sudo 4L-gui
</pre>

<p>This will launch the 4L GUI pictured above.  The interface is fairly intuitive, but the basic procedure is:</p>

<ol>
<li>Insert LightScribe media into your disc drive, <em>label side down!</em></li>
<li>Select an image to burn onto the CD or DVD by using the &#8220;Import Image&#8221; button.</li>
<li>Adjust the image size and alignment as necessary using the scale slider.</li>
<li>Preview the finished product by pressing the &#8220;Print&#8221; button and then selecting &#8220;Preview.&#8221;</li>
<li>Press &#8220;Print&#8221; to burn the label to the disc.  A full-size image should take about 20 minutes.</li>
<li>Remove the CD/DVD media and FLIP!</li>
<li>Use K3b (or your favorite burner program) to burn data on your new hella-cool custom disc!</li>
</ol>

<p><strong>Burn &#8211; Flip &#8211; Burn!</strong></p>

<p>One final technical note:  Unfortunately, the installation process above does not create a new item in your programs menu.    If you&#8217;d like to create an item in your program menu for the LightScribe labeler, check out <a href="http://ubuntuforums.org/showthread.php?t=520317">this thread on the Ubuntu Forums</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/lightscribe-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.184 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-04 11:32:35 -->
<!-- Compression = gzip -->
