<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">

<channel>
<title>Hackszine: Linux</title>
<link>http://www.hackszine.com/blog/archive/linux/</link>
<description>O&apos;Reilly&apos;s Hacks Series reclaims the term &apos;hacking&apos; for the good guys--innovators who explore and experiment, unearth shortcuts, create useful tools, and come up with fun things to try on their own</description>
<language>en-us</language>
<copyright>Copyright 2008, O'Reilly Media, Inc.</copyright>
<lastBuildDate>Fri, 14 Nov 2008 20:40:18 -0800</lastBuildDate>
<pubDate>Sun, 16 Nov 2008 15:50:13 -0800</pubDate>
<generator>http://www.movabletype.org/?v=4.1</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<itunes:author>O'Reilly Media, Inc.</itunes:author>
<itunes:subtitle>Clever solutions to interesting problems.</itunes:subtitle>
<itunes:summary>Hackszine Podcast</itunes:summary>
<itunes:owner>
<itunes:email>webmaster@makezine.com</itunes:email>
</itunes:owner>
<category>Technology</category>
<itunes:category text="Technology">
</itunes:category>
<itunes:category text="Technology">
  <itunes:category text="Gadgets" />
</itunes:category>
<itunes:category text="Games &amp; Hobbies" >
</itunes:category>
<itunes:category text="Science">
</itunes:category>
<itunes:image href="http://makezine.com/images/hackszine/rss_icon.jpg" />
<itunes:explicit>no</itunes:explicit>


<item>
<title>Linux Tip: super-fast network file copy</title>
<itunes:summary>If you&apos;ve ever had to move a huge directory containing many files from one server to another, you may have encountered a situation where the copy rate was significantly less that what you&apos;d expect your network could support. Rsync does...</itunes:summary>
<description>
<![CDATA[<p>If you've ever had to move a huge directory containing many files from one server to another, you may have encountered a situation where the copy rate was significantly less that what you'd expect your network could support. Rsync does a fantastic job of quickly  syncing two relatively similar directory structures, but the initial clone can take quite a while, especially as the file count increases.</p>

<p>The problem is that there is a certain amount of per-file overhead when using scp or rsync to copy files from one machine to the other. This is not a problem under most circumstances, but if you are attempting to duplicate tens of thousands of files (think, server or database backup), this per-file overhead can really add up. The solution is to copy the files over in a single stream, which normally means tarring them up on one server, copying the tarball, then untarring on the destination. Unless you are under 50% disk utilization on the source server, this could cause you to run out of space.</p>

<p>Brett Jones has an alternative solution, which uses the handy netcat utility:</p>

<blockquote>After clearing up 10 GBs of log files, we were left with hundreds of thousands of small files that were going to slow us down.  We couldn't tarball the file because of a lack of space on the source server.  I started searching around and found this nifty tip that takes our encryption and streams all the files as one large file:

<p><br />
This requires netcat on both servers.</p>

<p>Destination box: nc -l -p 2342 | tar -C /target/dir -xzf -<br />
Source box: tar -cz /source/dir | nc Target_Box 2342</blockquote></p>

<p>This causes the source machine to tar the files up and send them over the netcat pipe, where they are extracted on the destination machine, all with no per-file negotiation or unnecessary disk space used. It's also faster than the usual scp or rsync over scp because there is no encryption overhead.  If you are on a local protected network, this will perform much better, even for large single-file copies.</p>

<p>If you are on an unprotected network, however, you may still want your data encrypted in transit. You can perform about the same task over ssh:</p>

<p>Run this on the destination machine:<br />
cd /path/to/extract/to/<br />
ssh user@source.server 'tar -cz -C /source/path/ *' | tar -zxv</p>

<p>This command will issue the tar command across the network on the source machine, causing tar's stdout to be sent back over the network. This is then piped to stdin on the destination machine and the files magically appear in the directory you are currently in.</p>

<p>The ssh route is a little slower than using netcat, due to the encryption overhead, but it's still way faster than scping the files individually.  It also has the added advantage of potentially being compatible with Windows servers, provided you have a few of the unix tools like ssh and tar installed on your Windows server (using the cygwin linked binaries that are available).</p>

<p><a href="http://www.4bcj.com/post/2008/01/Fast-File-Copy---Linux!.aspx">Fast File Copy - Linux!</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/11/linux_tip_superfast_network_fi.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/11/linux_tip_superfast_network_fi.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/11/linux_tip_superfast_network_fi.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/11/linux_tip_superfast_network_fi.html?CMP=OTC-7G2N43923558</guid>
<category>Linux Server</category>
<pubDate>Fri, 14 Nov 2008 20:40:18 -0800</pubDate>

</item>

<item>
<title>Installing Debian alongside Android on the G1</title>
<itunes:summary> Now that you can run commands as root on the Google phone, you may have been thinking about what else you can do with the device. You know, besides the usual talking, texting, and surfing while driving. The device...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="debianandroid_20081110.jpg" src="http://www.hackszine.com/debianandroid_20081110.jpg" width="600" height="177" class="mt-image-none" style="" /></span></p>

<p>Now that you can run commands as root on the Google phone, you may have been thinking about what else you can do with the device.  You know, besides the usual talking, texting, and surfing while driving.  </p>

<p>The device is Linux based, sure, but the installed software is relatively spartan and there isn't too much internal space to get dangerous. Thankfully, Jay Freeman wrote a nice guide for installing a more complete Linux distribution on the device, right alongside Android. </p>

<blockquote>The main thing I've so far seen on this matter have been a few attempts to get busybox on there. I, however, think we can go a lot further: following the instructions in this article will end you up with a full distribution of Debian, one of the most highly respected Linux distributions, and the ability to install almost anything you want.

<p><br />
To do this, we need to think through a few of the details of getting this sort of thing running on the G1. The first question: where do we put it? The device has some internal flash, but it isn't really enough: only 128MB to share with the OS and other applications.</p>

<p>We therefore turn our attention to the much more reasonably sized microSD card, a format which lets us get up to 16GB of space.<br />
</blockquote></p>

<p><a href="http://www.saurik.com/id/10">Debian &amp; Android Together on G1</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/11/installing_debian_alongside_an.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/11/installing_debian_alongside_an.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/11/installing_debian_alongside_an.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/11/installing_debian_alongside_an.html?CMP=OTC-7G2N43923558</guid>
<category>Mobile Phones</category>
<pubDate>Mon, 10 Nov 2008 20:18:45 -0800</pubDate>

</item>

<item>
<title>SlugPower - Linux controlled power switch</title>
<itunes:summary> Phil Endecott has done a bit of hacking with the Linksys NSLU2 &quot;Slug&quot;, the low-power network storage device which runs Linux under the hood. His SlugPower project is a switched outlet that can be controlled from the Slug. This...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="linuxpower_20081110.jpg" src="http://www.hackszine.com/linuxpower_20081110.jpg" width="600" height="469" class="mt-image-none" style="" /></span></p>

<p>Phil Endecott has done a bit of hacking with the Linksys NSLU2 "Slug", the low-power network storage device which runs Linux under the hood. His SlugPower project is a switched outlet that can be controlled from the Slug. This enables his print server to power up the printer when it needs to be printing, and automatically cut power to the device when it's not in use.</p>

<blockquote>This page describes the hardware and software design of a printer power switch controlled over USB from my Linksys NSLU2, aka Slug. The unit can, however, be controlled from any Linux box, and can switch anything, not just printers.

<p>My NSLU2 acts mostly as a file and print server. I can go for weeks without printing anything, so I want to keep the printer switched off when I'm not using it (it takes about 4W while idle, which must be more than 99% of its total energy consumption). But it's upstairs, and I don't want to have to go up and down stairs once to switch it on and again to collect my printing. So I decided to get a power switch.</blockquote></p>

<p>Remote power switches are pretty common in server rooms, but they are costly. This is a pretty affordable way to control the power to any device from anywhere in the world.</p>

<p><a href="http://chezphil.org/slugpower/">SlugPower - A Slug-Controlled Power Switch</a><br />
<a href="http://chezphil.org/slugs/index.html">Phil Endecott's Slug Projects</a><br />
<a href="http://www.nslu2-linux.org/">NSLU2-Linux</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/11/slugpower_linux_controlled_pow.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/11/slugpower_linux_controlled_pow.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/11/slugpower_linux_controlled_pow.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/11/slugpower_linux_controlled_pow.html?CMP=OTC-7G2N43923558</guid>
<category>Electronics</category>
<pubDate>Sun, 09 Nov 2008 22:13:00 -0800</pubDate>

</item>

<item>
<title>Linuxstamp embedded Linux system</title>
<itunes:summary> If the Beagle Board caught your eye, here&apos;s another embedded Linux platform that&apos;s worth taking a peek at. The Linuxstamp is an ARM powered, ultra-tiny, open hardware Linux system that has a bunch of low-power goodies packed into what...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="linuxstamp_20081014.jpg" src="http://www.hackszine.com/linuxstamp_20081014.jpg" width="600" height="344" class="mt-image-none" style="" /></span></p>

<p>If the Beagle Board caught your eye, here's another embedded Linux platform that's worth taking a peek at. The Linuxstamp is an ARM powered, ultra-tiny, open hardware Linux system that has a bunch of low-power goodies packed into what appears to be a 3 inch by 4.5 inch footprint.</p>

<p>Compared the the Beagle Board, the Linuxstamp has a bit less processor muscle and lacks  video output. To its advantage, it has on-board 10/100 Ethernet, and (I presume) it has lower power requirements, making it a better fit for some embedded needs. Both projects are near the same price point (Linuxstamp: $120, Beagle Board: $150), so you'll be able to make decisions mostly on feature-set when choosing the platform for your next project.</p>

<p><a href="http://opencircuits.com/Linuxstamp">Linuxstamp Project Wiki at Open Circuits</a> [via <a href="http://www.ladyada.net/rant/2008/08/linux-stamp/">ladyada</a>]<br />
<a href="http://www.thelinuxstamp.com/">The Linuxstamp Store</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/10/linuxstamp_embedded_linux_syst.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/10/linuxstamp_embedded_linux_syst.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/10/linuxstamp_embedded_linux_syst.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/10/linuxstamp_embedded_linux_syst.html?CMP=OTC-7G2N43923558</guid>
<category>Electronics</category>
<pubDate>Tue, 14 Oct 2008 21:23:54 -0800</pubDate>

</item>

<item>
<title>Speaking UNIX: !$#@*%</title>
<itunes:summary> IBM developerWorks has an article that goes over many of the symbols you&apos;ll encounter at a Unix/Linux/Mac OS X/Cygwin command line: You&apos;ve learned a few of the basic commands to help you maneuver through a directory structure, create and...</itunes:summary>
<description>
<![CDATA[<p><img src="http://www.hackszine.com/upload/2008/10/speaking_unix/macosxterminal.png" width="585" height="367" alt="Mac OS X Terminal"/><br />
IBM developerWorks has an article that goes over many of the symbols you'll encounter at a Unix/Linux/Mac OS X/Cygwin command line:</p>

<blockquote>
You've learned a few of the basic commands to help you maneuver through a directory structure, create and modify files, see what processes are running, and maybe even administer users and the system. That's great, but you want to understand what the UNIX® administrators next to you are typing. It looks like a lot of commands interspersed with strange symbols. Learn what |, &gt;, &gt;&gt;, &lt;, &lt;&lt;, [[ and ]], and many more symbols mean in UNIX and Linux® as well as how to get the most out of operators such as &amp&amp;, ||, &lt;, &lt;=, and !=. 
</blockquote>

<p><a href="http://www.ibm.com/developerworks/aix/library/au-spunix_clitricks/?ca=dgr-lnxw09SpeakUnix&S_TACT=105AGX59&s_cmp=GRsitelnxw09">Speaking UNIX: !$#@*%: Learn even more command-line tricks and operators</a> [<a href="http://www.linuxdevices.com/news/NS7648082449.html?kc=rss">via LinuxDevices.com</a>]</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/10/speaking_unix.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/10/speaking_unix.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/10/speaking_unix.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/10/speaking_unix.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Fri, 10 Oct 2008 16:00:00 -0800</pubDate>

</item>

<item>
<title>Plotting streaming data in real-time with Gnuplot</title>
<itunes:summary> Our friend Thanassis Tsiodras, who you may remember as the creator of the offline Wikipedia reader, wrote in to tell us about a handy way to plot real-time data using standard unix tools. For the last couple of years,...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="gnuplot_20080922.gif" src="http://www.hackszine.com/gnuplot_20080922.gif" width="600" height="440" class="mt-image-none" style="" /></span></p>

<p>Our friend Thanassis Tsiodras, who you may remember as the creator of the <a href="http://www.hackszine.com/blog/archive/2007/08/wikipedia_offline_reader_put_a.html">offline Wikipedia reader</a>, wrote in to tell us about a handy way to plot real-time data using standard unix tools.</p>

<blockquote>For the last couple of years, I've been working on European Space Agency (ESA) projects - writing rather complex code generators. In the ESA project I am currently working on, I am also the technical lead; and I recently faced the need to provide real-time plotting of streaming data. Being a firm believer in open-source, after a little Googling I found Gnuplot; and quickly hacked a Perl script that spawns instances of Gnuplot and plots streaming data in real-time. Googling doesn't reveal anything similar, so I published it here.</blockquote>

<p>You can easily pipe any data stream into his druveGnuPlots.pl script, choose the zoom and y-range and it will take care of reading in the data and passing it to Gnuplot with your specifications. This is pretty neat, since it means you can easily plot just about anything and all you need to do is get your measurements into a newline-delimited output format.</p>

<p><a href="http://ttsiodras.googlepages.com/gnuplotStreaming.html">Visualize real-time data streams with Gnuplot</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/plotting_streaming_data_in_rea.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/plotting_streaming_data_in_rea.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/09/plotting_streaming_data_in_rea.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/09/plotting_streaming_data_in_rea.html?CMP=OTC-7G2N43923558</guid>
<category>Science</category>
<pubDate>Mon, 22 Sep 2008 20:26:39 -0800</pubDate>

</item>

<item>
<title>HOWTO - make a serial port IR receiver</title>
<itunes:summary> Alessio Sangalli has been maintaining a guide for a few years that shows you how to create a serial port IR receiver from scratch and use it in both Windows and Linux. Her design is pretty slick since, as...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="irreceiver_20080910.jpg" src="http://www.hackszine.com/irreceiver_20080910.jpg" width="600" height="400" class="mt-image-none" style="" /></span></p>

<p>Alessio Sangalli has been maintaining a guide for a few years that shows you how to create a serial port IR receiver from scratch and use it in both Windows and Linux.  Her design is pretty slick since, as you can see from her photo above, the whole package fits neatly inside a standard 9 pin serial connector. There are still plenty of machines that don't have built-in IR support, so this could be handy if you're thinking of turning an old box into a media player or DVR.</p>

<p><a href="http://lnx.manoweb.com/lirc/">How To Build A Simple But Cool IR (Infra Red) Receiver</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/howto_make_a_serial_port_ir_re.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/howto_make_a_serial_port_ir_re.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/09/howto_make_a_serial_port_ir_re.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/09/howto_make_a_serial_port_ir_re.html?CMP=OTC-7G2N43923558</guid>
<category>Electronics</category>
<pubDate>Wed, 10 Sep 2008 21:58:48 -0800</pubDate>

</item>

<item>
<title>Run Google Chrome in Linux with Wine</title>
<itunes:summary> If you&apos;re waiting impatiently for the native Linux release of Chrome, check out the instructions by Romeo Adrian Cioaba, who was able to get Chrome running on his Ubuntu box using Wine. The latest Wine release (1.1.4) contains a...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="chrome_linux_20080908.jpg" src="http://www.hackszine.com/chrome_linux_20080908.jpg" width="600" height="409" class="mt-image-none" style="" /></span></p>

<p>If you're waiting impatiently for the native Linux release of Chrome, check out the instructions by Romeo Adrian Cioaba, who was able to get Chrome running on his Ubuntu box using Wine. The latest Wine release (1.1.4) contains a fix that corrects some rendering problems with the application, so make sure to upgrade first. </p>

<p>Most of the application is functional, except for HTTPS support. Unfortunately, <a href="http://wiki.winehq.org/Secur32">according to the Wine wiki</a>, this is because SSL support has only been stubbed in at this point. I can't say for sure if it'd work, but you could try copying the native Windows secur32.dll and crypt32.dll files into your Wine installation (assuming you can get your hands on them). There's a chance that there might be a few other incomplete libraries that you'll run into along this path, but if you get it to work, let us know.</p>

<p><a href="http://www.myscienceisbetter.info/2008/09/install-google-chrome-on-linux-using-wine.html">Install Google Chrome on Linux using wine</a> [via <a href="http://lifehacker.com/5045334/run-google-chrome-in-ubuntu-with-wine">Lifehacker</a>]</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/run_google_chrome_in_linux_wit.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/run_google_chrome_in_linux_wit.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/09/run_google_chrome_in_linux_wit.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/09/run_google_chrome_in_linux_wit.html?CMP=OTC-7G2N43923558</guid>
<category>Google</category>
<pubDate>Mon, 08 Sep 2008 20:43:18 -0800</pubDate>

</item>

<item>
<title>HOWTO - reset a lost Ubuntu password</title>
<itunes:summary>I loaded one of my test Ubuntu virtual machines today (one that I hadn&apos;t used for a month) and, surprise, I had forgotten the password. This sort of thing happens from time to time, and if you&apos;re new to Linux,...</itunes:summary>
<description>
<![CDATA[<p>I loaded one of my test Ubuntu virtual machines today (one that I hadn't used for a month) and, surprise, I had forgotten the password. This sort of thing happens from time to time, and if you're new to Linux, it can be a little disconcerting. </p>

<p>Losing your root password isn't the end of the world, though. You'll just need to reboot into single user mode to reset it. Here's how to do it on a typical Ubuntu machine with the GRUB bootloader:</p>

<p><b>Boot Linux into single-user mode</b><br />
<ol><li>Reboot the machine.</li><li>Press the ESC key while GRUB is loading to enter the menu.</li><li>If there is a 'recovery mode' option, select it and press 'b' to boot into single user mode.</li><li>Otherwise, the default boot configuration should be selected. Press 'e' to edit it.</li><li>Highlight the line that begins with 'kernel'. Press 'e' again to edit this line.</li><li>At the end of the line, add an additional parameter: 'single'. Hit return to make the change and press 'b' to boot.</li></ol></p>

<p><b>Change the admin password</b><br />
The system should load into single user mode and you'll be left at the command line automatically logged in as root. Type 'passwd' to change the root password or 'passwd someuser' to change the password for your "someuser" admin account.</p>

<p><b>Reboot</b><br />
Once your done, give the three finger salute, or enter 'reboot' to restart into your machine's normal configuration.</p>

<p>That's all there is to it. Now just make sure to write your password down on a post-it and shove it somewhere safe like under your keyboard. :)</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/howto_reset_a_lost_ubuntu_pass.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/09/howto_reset_a_lost_ubuntu_pass.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/09/howto_reset_a_lost_ubuntu_pass.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/09/howto_reset_a_lost_ubuntu_pass.html?CMP=OTC-7G2N43923558</guid>
<category>Ubuntu</category>
<pubDate>Wed, 03 Sep 2008 22:37:46 -0800</pubDate>

</item>

<item>
<title>Multitouch touch-pad support for Linux laptops</title>
<itunes:summary> The Synaptics TouchPad device is a common input device for many laptop brands, including models made by Acer, Toshiba, and IBM. Normally, the touchpad is used for single-finger mouse input, but the Synaptics device has rudimentary support for tracking...</itunes:summary>
<description>
<![CDATA[<p><object width="600" height="475"><param name="movie" value="http://www.youtube.com/v/qtHU_rxtwgc&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/qtHU_rxtwgc&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="600" height="475"></embed></object></p>

<p>The Synaptics TouchPad device is a common input device for many laptop brands, including models made by Acer, Toshiba, and IBM. Normally, the touchpad is used for single-finger mouse input, but the Synaptics device has rudimentary support for tracking multiple fingers at the same time. Nathan Harrington wrote an article for IBM that shows you how to make use of this to add instant multitouch gesture support to your X applications.</p>

<p>A small perl script uses the <code>synclient</code> command to listen to the touchpad and then send a message to the active window.</p>

<blockquote>Using syclient output for monitoring the TouchPad state is a simple and effective way for adding further interface options to Linux applications. The gestureListener.pl program introduced below opens a pipe to read from the synclient program and processes the TouchPad events to detect gestures. These gestures are linked with keyboard commands sent to the current in-focus application in X Window System.</blockquote>

<p>It's tricky, because you don't get a discrete x and y location for each finger.  Instead, synclient gives you an average of the inputs, and a count of the number of inputs. It makes detecting a pinch gesture difficult, but Nathan noticed that two fingers at the corners of the pad average to a stable location, while the average location of two fingers near each other tends to wiggle. Using this, he was able to hack together semi-reliable pinch and open-pinch gestures.</p>

<p>With the script installed, you can open any X application and swipe three fingers to the left or right to trigger a left or right keypress. The pinch and open-pinch gestures will trigger a + or - to be sent to the application.</p>

<p><a href="http://www.ibm.com/developerworks/library/os-touchpad/index.html">Add multitouch gesture support to a TouchPad-equipped laptop</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/multitouch_touchpad_support_fo.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/multitouch_touchpad_support_fo.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/multitouch_touchpad_support_fo.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/multitouch_touchpad_support_fo.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Wed, 27 Aug 2008 18:51:16 -0800</pubDate>

</item>

<item>
<title>Dealing with large numbers of files in Unix</title>
<itunes:summary>Most of the time, you can move a bunch of files from one folder to another by running a simple mv command like &quot;mv sourcedir/* destdir/&quot;. The problem is that when that asterisk gets expanded, each file in the directory...</itunes:summary>
<description>
<![CDATA[<p>Most of the time, you can move a bunch of files from one folder to another by running a simple mv command like "<code><b>mv sourcedir/* destdir/</b></code>". The problem is that when that asterisk gets expanded, each file in the directory is added as a command line parameter to the mv command. If sourcedir contains a lot of files, this can overflow the command line buffer, resulting in a mysterious "Too many arguments" error.</p>

<p>I ran into this problem recently while trying to manage a directory that had over a million files in it.  It's not every day you run across a directory that contains a metric crap-ton of files, but when the problem arises, there's an easy way to deal with it. The trick is to use the handy xargs program, which is designed to take a big list as stdin and separate it as arguments to another command:</p>

<blockquote><code><b>find sourcedir -type f -print | xargs -l1 -i mv {} destdir/</b></code></blockquote>

<p>The -l1 tells xargs to only use one argument at a time to pass to mv. The -i parameter tells xargs to replace the {} with the argument. This command will execute mv for each file in the directory.  Ideally, you would optimize this and specify something like -l50,  sending mv 50 files at a time to move. This is how I remember xargs working on other Unix systems, but the GNU xargs that I have on my Linux box forces the number of arguments to 1 any time the -i is invoked. Either way, it gets the job done.</p>

<p>Without the -i, the -l parameter will work in Linux, but you can no longer use the {} substitution and all parameters are placed as the final arguments in the command. This is useless for when you want to add a final parameter such as the destination directory for the mv command. On the other hand, it's helpful for commands that will end with your file parameters, such as when you are batch removing files with rm.</p>

<p>Oddly enough, in OS X the parameters for xargs are a bit wonky and capitalized. The good news is that you can invoke the parameter substitution with multiple arguments at a time. To move a bunch of files in OS X, 50 files at a time, try the following:</p>

<blockquote><code><b>find sourcedir -type f -print | xargs -L50 -I{} mv {} destdir/</b></code></blockquote>

<p>That's about all there is to it. This is just a basic example, but once you get used to using xargs and find together, it's pretty easy to tweak the find parameters and move files around based on their date, permissions or file extension.</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/dealing_with_large_numbers_of.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/dealing_with_large_numbers_of.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/dealing_with_large_numbers_of.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/dealing_with_large_numbers_of.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Tue, 26 Aug 2008 19:22:23 -0800</pubDate>

</item>

<item>
<title>The smallest program ever</title>
<itunes:summary>Brian Raiter wrote an article many years ago in which he documented his quest to make the smallest possible Linux ELF executable, a stripped-down program that returns the answer to life, the universe, and everything. While the standard gcc-compiled version...</itunes:summary>
<description>
<![CDATA[<p>Brian Raiter wrote an article many years ago in which he documented his quest to make the smallest possible Linux ELF executable, a stripped-down program that returns the answer to life, the universe, and everything.</p>

<p>While the standard gcc-compiled version of the application nets out at 3998 bytes, Brian discovered that the smallest possible size for an ELF executable that will still run correctly is 45 bytes:</p>

<blockquote>This forty-five-byte file is less than one-eighth the size of the smallest ELF executable we could create using the standard tools, and is less than one-fiftieth the size of the smallest file we could create using pure C code. We have stripped everything out of the file that we could, and put to dual purpose most of what we couldn't.

<p>Of course, half of the values in this file violate some part of the ELF standard, and it's a wonder than Linux will even consent to sneeze on it, much less give it a process ID. This is not the sort of program to which one would normally be willing to confess authorship.</blockquote><br />
 <br />
It's not an easy process creating the smallest possible program. To get there, you need to dissect the inner workings of the operating system and the ELF file format, which is really what the article is about. If you've ever wondered about the mysterious events that happen before main() and after return(), here's your chance to take the red pill.</p>

<p><a href="http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html">A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/the_smallest_program_ever.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/the_smallest_program_ever.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/the_smallest_program_ever.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/the_smallest_program_ever.html?CMP=OTC-7G2N43923558</guid>
<category>Software Engineering</category>
<pubDate>Fri, 22 Aug 2008 17:55:00 -0800</pubDate>

</item>

<item>
<title>Text-to-speech in PHP</title>
<itunes:summary>It&apos;s been a while since I&apos;ve played with the open source Festival TTS software, and I&apos;m pretty impressed with the quality of the speech output. Some of the voices that are available sound so much better than the old diphone-based...</itunes:summary>
<description>
<![CDATA[<p>It's been a while since I've played with the open source Festival TTS software, and I'm pretty impressed with the quality of the speech output. Some of the voices that are available sound so much better than the old diphone-based voices that evoke WOPR from War Games.</p>

<p>This got me thinking it'd be fun to integrate some of this functionality into a web application. A quick search and I discovered <a href="http://www.xenocafe.com/tutorials/php/festival_text_to_speech/index.php">Tony Bhimani's Linux Text-To-Speech Tutorial</a> which has a sample PHP application that uses the Festival text2wave utility and the lame mp3 encoder to produce mp3 files from user submitted text. </p>

<p>I mentioned that some of the voices are pretty outstanding. In particular, the "unit selection" voices, demonstrated on the Festival demo page, are able to synthesize a lot of sentences with few noticeable glitches. These voices sound so nice because they contain a much larger database of common sound units, only falling back on heavy processed output on less common utterances. There's a <a href="http://ubuntuforums.org/showthread.php?t=751169">howto and discussion</a> over on Ubuntu Forums that'll guide you through installing and using the more enhanced voices with Festival. With a decent voice file, Festival, and an adaptation of Tony's PHP text-to-speech demonstration, it wouldn't be too hard to add audio output to your blog or create a script that turns your RSS feeds into a podcast for the daily commute.</p>

<p>Have any of your own text-to-speech ideas or demos? Please share them in the comments!</p>

<p><a href="http://www.xenocafe.com/tutorials/php/festival_text_to_speech/index.php">Tony Bhimani - PHP Text-To-Speech Example</a><br />
<a href="http://www.cstr.ed.ac.uk/projects/festival/">The Festival Speech Synthesis System</a><br />
<a href="http://ubuntuforums.org/showthread.php?t=751169">HOWTO: Make Festival TTS Use Better Voices</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/texttospeech_in_php.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/texttospeech_in_php.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/texttospeech_in_php.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/texttospeech_in_php.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Wed, 20 Aug 2008 21:57:11 -0800</pubDate>

</item>

<item>
<title>Beagle Board - ultra tiny, 2-Watt Linux system</title>
<itunes:summary> Hackszine pal Patti Schiendelman tipped me off to the Beagle Board, a spartan little embedded platform, perfect for all things hackable. It&apos;s based on the TI OMAP3 processor, which is packaged with 128MB of DDR RAM and 256MB of...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="beagleboard_20080818.jpg" src="http://www.hackszine.com/beagleboard_20080818.jpg" width="600" height="462" class="mt-image-none" style="" /></span></p>

<p>Hackszine pal Patti Schiendelman tipped me off to the Beagle Board, a spartan little embedded platform, perfect for all things hackable. It's based on the TI OMAP3 processor, which is packaged with 128MB of DDR RAM and 256MB of NAND Flash all on the single chip in the center of the board.</p>

<p>Instead of including things like ethernet and 802.11 on-board, they opted to keep the footprint small and only include the bare essentials: DVI for monitor output, SD/MMC for storage, audio in/out, and USB for device expansion. If you need any other hardware, just get a USB device that has a Linux driver.</p>

<p>Did I mention it's $150 and draws less that 2 Watts? This is definitely what you need for your next autonomous <strike>spy</strike> weather blimp.</p>

<p><a href="http://beagleboard.org/">BeagleBoard.org</a><br />
<a href="http://elinux.org/BeagleBoard">BeagleBoard Embedded Linux Wiki</a><br />
<a href="http://www.linuxjournal.com/content/beagleboard-149-linux-system">Linux Journal - The BeagleBoard: $149 Linux System</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/beagle_board_ultra_tiny_2watt.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/beagle_board_ultra_tiny_2watt.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/beagle_board_ultra_tiny_2watt.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/beagle_board_ultra_tiny_2watt.html?CMP=OTC-7G2N43923558</guid>
<category>Hardware</category>
<pubDate>Mon, 18 Aug 2008 21:06:07 -0800</pubDate>

</item>

<item>
<title>Edit binary files in Vi</title>
<itunes:summary> If you&apos;ve ever wanted to examine or edit a binary file in your favorite text editor, there&apos;s an easy way to simulate a vi hex mode. To do this, you just filter the file&apos;s contents through the xxd hex...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="cafebabe_20080809.jpg" src="http://www.hackszine.com/cafebabe_20080809.jpg" width="600" height="317" class="mt-image-none" style="" /></span></p>

<p>If you've ever wanted to examine or edit a binary file in your favorite text editor, there's an easy way to simulate a vi hex mode. To do this, you just filter the file's contents through the <code>xxd</code> hex dump utility, a trick that can be accomplished right within the vi/vim interface.</p>

<p>To convert a file to hex dump representation, just load your file in vi and type the following:</p>

<p><code>:%!xxd</code></p>

<p>This sends the entire contents of the opened document to xxd and loads in the result. At this point, you can view or edit any of the hex data. The ASCII representation is listed to the right, though editing this region will not affect the hex portion of the file.</p>

<p>When you are done, you'll want to convert things back into their binary format before saving. To do this, you run things through xxd again, but this time with the -r option:</p>

<p><code>:%!xxd -r</code></p>

<p>Your file should be returned to illegible gibberish, which you can save back out with <code>:wq</code>.</p>

<p>A funny thing I just noticed: OS X binaries all start with the same 4 bytes which, in hex, spell out the phrase "cafe babe". This is just a magic number used to identify the file as an OS X binary, but it's hard not to ascribe some deeper meaning. ;)</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/edit_binary_files_in_vi.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/edit_binary_files_in_vi.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/edit_binary_files_in_vi.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/edit_binary_files_in_vi.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Sat, 09 Aug 2008 22:00:05 -0800</pubDate>

</item>

<item>
<title>Memcached and high performance MySQL</title>
<itunes:summary>Memcached is a distributed object caching system that was originally developed to improve the performance of LiveJournal and has subsequently been used as a scaling strategy for a number of high-load sites. It serves as a large, extremely fast hash...</itunes:summary>
<description>
<![CDATA[<p>Memcached is a distributed object caching system that was originally developed to improve the performance of LiveJournal and has subsequently been used as a scaling strategy for a number of high-load sites. It serves as a large, extremely fast hash table that can be spread across many servers and accessed simultaneously from multiple processes. It's designed to be used for almost any back-end caching need, and for high performance web applications, it's a great complement to a database like MySQL.</p>

<p>In a typical environment, a web developer might employ a combination of process level caching and the built-in MySQL query caching to eke out that extra bit of performance from an application. The problem is that in-process caching is limited to the web process running on a single server. In a load-balanced configuration, each server is maintaining its own cache, limiting the efficiency and available size of the cache. Similarly, MySQL's query cache is limited to the server that the MySQL process is running on. The query cache is also limited in that it can only cache row results. With memcached you can set up a number cache servers which can store any type of serialized object and this data can be shared by all of the loadbalanced web servers. Cool, no?</p>

<p>To set up a memcached server, you simple download the daemon and run it with a few parameters. From the memcached web site:</p>

<blockquote>First, you start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you'll likely use:

<p><code># ./memcached -d -m 2048 -l 10.0.0.40 -p 11211</code></p>

<p>This starts memcached up as a daemon, using 2GB of memory, and listening on IP 10.0.0.40, port 11211. Because a 32-bit process can only address 4GB of virtual memory (usually significantly less, depending on your operating system), if you have a 32-bit server with 4-64GB of memory using PAE you can just run multiple processes on the machine, each using 2 or 3GB of memory.</blockquote></p>

<p>It's about as simple as it gets. There's no real configuration. No authentication. It's just a gigantor hash table. Obviously, you'd set this up on a private, non-addressable network.  From there, the work of querying and updating the cache is completely up to the application designer. You are afforded the basic functions of set, get, and delete. Here's a simple example in PHP:</p>

<blockquote>$memcache = new Memcache;
$memcache-&gt;addServer('10.0.0.40', 11211);
$memcache-&gt;addServer('10.0.0.41', 11211);

<p>$value= "Data to cache";</p>

<p>$memcache-&gt;set('thekey', $value, 60);<br />
echo "Caching for 60 seconds: $value &lt;br&gt;\n";</p>

<p>$retrieved = $memcache-&gt;get('thekey');<br />
echo "Retrieved: $retrieved &lt;br&gt;\n";</blockquote></p>

<p>The PHP library takes care of the dirty work of serializing any value you pass to the cache, so you can send and retrieve arrays or even complete data objects. </p>

<p>In your application's data layer, instead of immediately hitting the database, you can now query memcached first. If the item is found, there's no need to hit the database and assemble the data object. If the key is not found, you select the relevant data from the database and store the derived object in the cache. Similarly, you update the cache whenever your data object is altered and updated in the database. Assuming your API is structured well, only a few edits need to be made to dramatically alter the scalability and performance of your application.</p>

<p>I've linked to a few resources below where you can find more information on using memcached in your application. In addition to the documentation on the memcached web site, Todd Hoff has compiled a list of articles on memcached and summarized several memcached performance techniques. It's a pretty versatile tool. For those of you who've used memcached, give us a holler in the comments and share your tips and tricks.</p>

<p><a href="http://www.danga.com/memcached/">Memcached</a><br />
<a href="http://highscalability.com/bunch-great-strategies-using-memcached-and-mysql-better-together">Strategies for Using Memcached and MySQL Better Together</a><br />
<a href="http://download.tangent.org/talks/Memcached%20Study.pdf">Memcached and MySQL tutorial (PDF)</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/memcached_and_high_performance.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/memcached_and_high_performance.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/memcached_and_high_performance.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/memcached_and_high_performance.html?CMP=OTC-7G2N43923558</guid>
<category>MySQL</category>
<pubDate>Wed, 06 Aug 2008 22:37:40 -0800</pubDate>
<enclosure url="http://download.tangent.org/talks/Memcached%20Study.pdf" length="1223754" type="application/pdf" />
</item>

<item>
<title>Shield your files with Reed-Solomon codes</title>
<itunes:summary>Thanassis Tsiodras wrote in about a utility for adding additional error correction redundancy to your backup data: The way storage quality has been nose-diving in the last years, you&apos;ll inevitably end up losing data because of bad sectors. Backing up,...</itunes:summary>
<description>
<![CDATA[<p>Thanassis Tsiodras wrote in about a utility for adding additional error correction redundancy to your backup data:</p>

<blockquote>The way storage quality has been nose-diving in the last
years, you'll inevitably end up losing data because of 
bad sectors. Backing up, using RAID and version control
repositories are some of the methods used to cope ;
here's another that can help prevent data loss from bad
sectors. It is a software-only method, and it has saved me from a lot of grief.</blockquote>

<p>The technique uses Reed-Solomon coding to add additional parity bytes to your data. If you suffer partial damage to the storage media, these files can still be recoverable.</p>

<blockquote>Storage media are of course block devices, that work or fail on 512-byte sector boundaries (for hard disks and floppies, at least - in CDs and DVDs the sector size is 2048 bytes). This is why the shielded stream must be interleaved every N bytes (that is, the encoded bytes must be placed in the shielded file at offsets 1,N,2N,...,2,2+N,etc): In this way, 512 shielded blocks pass through each sector (for 512 byte sectors), and if a sector becomes defective, only one byte is lost in each of the shielded 255-byte blocks that pass through this sector. The algorithm can handle 16 of those errors, so data will only be lost if sector i, sector i+N, sector i+2N, ... up to sector i+15N are lost! Taking into account the fact that sector errors are local events (in terms of storage space), chances are quite high that the file will be completely recovered, even if a large number of sectors (in this implementation: up to 127 consecutive ones) are lost.</blockquote>

<p>The application works similar to any other command line archiving utility, so you can tar your files as normal and then send them to the freeze.sh script. Running melt.sh on the archive will return your original data, even if there was a reasonable amount of corruption to the file. Thanks, Thanassis!</p>

<p><a href="http://ttsiodras.googlepages.com/rsbep.html">Hardening your files with Reed-Solomon codes</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/shield_your_files_with_reedsol.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/08/shield_your_files_with_reedsol.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/08/shield_your_files_with_reedsol.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/08/shield_your_files_with_reedsol.html?CMP=OTC-7G2N43923558</guid>
<category>Data</category>
<pubDate>Mon, 04 Aug 2008 22:04:45 -0800</pubDate>

</item>

<item>
<title>Improve Linux laptop performance with Ramlog</title>
<itunes:summary>One of the most power-hungry components in a traditional laptop is its hard disk, and time between charges can be greatly improved by keeping the disk in sleep mode. On machines like the OLPC that have solid-state disks, keeping disk...</itunes:summary>
<description>
<![CDATA[<p>One of the most power-hungry components in a traditional laptop is its hard disk, and time between charges can be greatly improved by keeping the disk in sleep mode. On machines like the OLPC that have solid-state disks, keeping disk writes to a minimum improves the life of the drive, minimizing unwritable sectors. Depending on how your machine is configured, log activity from kernel events and running daemons like sshd, a dns cache, or a local copy of apache can force your disk to make tiny writes every few minutes, impacting flash drive lifetime and ensuring that a mechanical drive never sleeps.</p>

<p>One solution to the problem is to disable syslogd entirely. An alternative is Ramlog, which offers a bit of a compromise. With Ramlog installed, log data is stored in RAM until shutdown, when it's copied back to disk in one big write. You will loose your logs if you have a system crash, but in a more usual scenario where you're trying to track down a wireless problem or an apache error on your development laptop, the logs are there for you to examine.</p>

<p><a href="http://www.linux.com/feature/141231">Installing Ramlog [linux.com]</a><br />
<a href="http://tofu3.szm.sk/ramlog/">Ramlog downloads</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/07/improve_linux_laptop_performan.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/07/improve_linux_laptop_performan.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/07/improve_linux_laptop_performan.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/07/improve_linux_laptop_performan.html?CMP=OTC-7G2N43923558</guid>
<category>olpc</category>
<pubDate>Wed, 16 Jul 2008 21:11:30 -0800</pubDate>

</item>

<item>
<title>Find and Grep 101</title>
<itunes:summary>Find and Grep are perhaps the most used command line tools for the Linux user or administrator. Terse but powerful, these two commands will allow you to search through files and their contents by almost any imaginable attribute or filter...</itunes:summary>
<description>
<![CDATA[<p>Find and Grep are perhaps the most used command line tools for the Linux user or administrator. Terse but powerful, these two commands will allow you to search through files and their contents by almost any imaginable attribute or filter criteria: file name, date modified, occurrence of the some specific word in a file, etc. Combined with a couple of other standard unix utilities, you can automate and process modifications over a number of files that match your search.</p>

<p>Here are two blog posts by Eric Wendelin which nicely illustrate the basics of these two commands:</p>

<p><a href="http://eriwen.com/productivity/find-is-a-beautiful-tool/">Find is a Beautiful Tool</a><br />
<a href="http://eriwen.com/tools/grep-is-a-beautiful-tool/">Grep is a Beautiful Tool</a></p>

<p>There are a number of other great unix utilities for file search, but knowing how to use find and grep is fundamental, as these two utilities can be found on the most basic build of every unix-like machine you come across.</p>

<p>Got a favorite command line hack that uses find or grep? Drop it on us in the comments.</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/07/find_and_grep_101.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/07/find_and_grep_101.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/07/find_and_grep_101.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/07/find_and_grep_101.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Sun, 13 Jul 2008 21:19:54 -0800</pubDate>

</item>

<item>
<title>Home security with Twitter and a webcam</title>
<itunes:summary>Shantanu Goel created a cool home security tool using Twitter and a linux application called Motion, a program that will monitor a webcam looking for differences between frames. When Motion detects movement, it archives a photo of the event and...</itunes:summary>
<description>
<![CDATA[<p>Shantanu Goel created a cool home security tool using Twitter and a linux application called Motion, a program that will monitor a webcam looking for differences between frames.</p>

<p>When Motion detects movement, it archives a photo of the event and has the option of triggering an external script. Shantanu combined this with a simple curl command that will ping your Twitter account when a motion event occurs. The end result is a tweet that tells you that motion was detected and checking Motion's integrated mini-http server will allow you to see if it's a false alarm or view the intrusion in real time.</p>

<p>I'm going to set this up at work so I can track down who keeps running off with my red stapler.</p>

<p><a href="http://tech.shantanugoel.com/2008/05/14/keep-tab-on-home-security-with-a-webcam-and-twitter.html">Keep Tab On Home Security With A Webcam And Twitter</a><br />
<a href="http://www.lavrsen.dk/twiki/bin/view/Motion/">Motion</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/06/home_security_with_twitter_and.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/06/home_security_with_twitter_and.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/06/home_security_with_twitter_and.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/06/home_security_with_twitter_and.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Sun, 15 Jun 2008 21:04:19 -0800</pubDate>

</item>

<item>
<title>Use video RAM as swap in Linux</title>
<itunes:summary>If you are into the headless or console experience, there are a couple of ways to put your machine&apos;s graphics card to good use. Most new boxes come with a GPU that has a substantial amount of RAM that is...</itunes:summary>
<description>
<![CDATA[<p>If you are into the headless or console experience, there are a couple of ways to put your machine's graphics card to good use. Most new boxes come with a GPU that has a substantial amount of RAM that is normally used for direct rendering. Using the Memory Technology Device (MTD) support in the Linux kernel, you can actually map the video card RAM to a block device and format it for swap use or as a ramdisk.</p>

<p>The Gentoo wiki has detailed instructions for doing this.  The only tricky part is determining the video memory address, but after that it's a simple modprobe to load the MTD driver and you can run mkswap/swapon on the device just as if you were creating a normal swap disk. Considering many machines have 512MB of video RAM and it's waaaaay faster than disk, this could give you a pretty huge performance boost. </p>

<p>You can still use your graphics card in X, but you'll need to reserve a small chunk of that RAM for normal graphics use, use the VESA driver, and add inform the driver that it should only use that teensy portion of memory.  "VideoRam 4096" in the XF86Config, for instance, will let you use your card in X and only eat the first 4MB of RAM. Everything after that 4MB is fair game for swap. Michal Schulz wrote a bit about calculating the memory address offsets to make this all work.  It's the second link below, for those of you who aren't hardcore enough to deal with only the command line.</p>

<p><a href="http://gentoo-wiki.com/TIP_Use_memory_on_video_card_as_swap">Use Memory On Video Card As Swap</a><br />
<a href="http://hedera.linuxnews.pl/_news/2002/09/03/_long/1445.html">Configuring X11 With A VRAM Storage Device</a><br />
</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/06/use_video_ram_as_swap_in_linux.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/06/use_video_ram_as_swap_in_linux.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/06/use_video_ram_as_swap_in_linux.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/06/use_video_ram_as_swap_in_linux.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Wed, 04 Jun 2008 21:10:14 -0800</pubDate>

</item>

<item>
<title>Debian/Ubuntu users: update your SSL keys and certs</title>
<itunes:summary>It was announced yesterday that sometime back in September 2006 a line of code was removed from the Debian distributed OpenSSL package. That one line of code was responsible for causing an uninitialized data warning in Valgrind. It also seeded...</itunes:summary>
<description>
<![CDATA[<p>It was announced yesterday that sometime back in September 2006 a line of code was removed from the Debian distributed OpenSSL package. That one line of code was responsible for causing an uninitialized data warning in Valgrind. It also seeded the random number generator used by OpenSSL. Without it, the error went away, but the keyspace used by affected systems went from 2^1024 to about 2^15. Oh noes!</p>

<p>A large majority of Debian and Ubuntu systems are affected. To correct the problem, you'll need to not only update OpenSSL, but also revoke and replace any cryptographic keys and certificates that were generated on the affected systems. From the Debian security advisory:</p>

<blockquote>Affected keys include SSH keys, OpenVPN keys, DNSSEC keys, and key material for use in X.509 certificates and session keys used in SSL/TLS connections. Keys generated with GnuPG or GNUTLS are not affected, though.</blockquote>

<p>For most people, this boils down to your ssh server's host key and any public key pairs used for remote ssh authentication. Any keys or certificates generated on the affected machines for SSL/https use also need to be revoked and regenerated. It's pretty ugly, really.</p>

<p>As far as teachable moments go, there's probably a lot to think about here. Software developers have this weird natural tendency to want to fix and reengineer things that aren't even broken. I'd go so far as to say that the desire to reengineer is inversely proportional to a programmer's familiarity and understanding of the code. I think it comes from our intense desire to make sense of things.  It's the guru who's able to channel that hacker urge into solving new problems instead of creating new bugs out of old solutions.</p>

<p><br />
<a href="http://www.debian.org/security/2008/dsa-1571">DSA-1571-1 openssl -- predictable random number generator</a><br />
<a href="http://metasploit.com/users/hdm/tools/debian-openssl/">OpenSSL PRNG Debian Toys (more discussion of the problem here)</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/05/debianubuntu_users_update_your.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/05/debianubuntu_users_update_your.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/05/debianubuntu_users_update_your.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/05/debianubuntu_users_update_your.html?CMP=OTC-7G2N43923558</guid>
<category>Ubuntu</category>
<pubDate>Wed, 14 May 2008 19:57:27 -0800</pubDate>

</item>

<item>
<title>Air on the EeePC</title>
<itunes:summary> There&apos;s a good post on the O&apos;Reilly Rich Internet Application blog about running Air under Linux on the EeePC: Adobe recently released the first public alpha version of the AIR runtime for Linux on labs. This is great news!...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="eeepc_air_20080410.jpg" src="http://www.hackszine.com/eeepc_air_20080410.jpg" width="500" height="302" class="mt-image-none" style="" /></span></p>

<p>There's a good post on the O'Reilly Rich Internet Application blog about running Air under Linux on the EeePC:</p>

<blockquote>Adobe recently released the first public alpha version of the AIR runtime for Linux on labs. This is great news! I felt compelled to "geek out" with it, and was able to get AIR running on an Asus EeePC, although with a few minor issues.

<p>The Asus EeePC runs a derivative of Xandros with KDE, which is not a supported Linux distribution for AIR. I got it working with a little help from the Adobe forums, and I'm very excited about it. I have never gotten into Linux desktop application development, but I think that's could soon change.</blockquote></p>

<p>There's a thread on the Adobe forums that has guidance for running Air on Linux machines.  It's a simple matter of downloading the SDK and running your applications from the command line using the <em>adl</em> command like so:</p>

<blockquote><code>~/AIR-SDK/bin/adl -nodebug ~/app/META-INF/AIR/application.xml ~/app</code></blockquote>

<p>The AIR runtime for Linux release notes are pretty clear that this is still a pretty alpha product with some unfinished features, but it's something, and if you do a lot of AIR or traditional Flash development, this would be a cool way to include Linux as a build target for your next desktop application.</p>

<p><a href="http://www.insideria.com/2008/04/air-linux-eeepc.html">AIR + Linux + EeePC</a> [<a href="http://digg.com/linux_unix/AIR_Linux_EeePC">via Lebon Bon Lebon</a>]<br />
<a href="http://labs.adobe.com/technologies/air/">Adobe AIR for Linux</a><br />
<a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=677&threadid=1352064&enterthread=y">Running AIR on Linux (Adobe forum)</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/04/air_on_the_eeepc.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/04/air_on_the_eeepc.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/04/air_on_the_eeepc.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/04/air_on_the_eeepc.html?CMP=OTC-7G2N43923558</guid>
<category>Flash</category>
<pubDate>Wed, 09 Apr 2008 23:06:48 -0800</pubDate>

</item>

<item>
<title>Add keystroke user verification to Gnome</title>
<itunes:summary> Nathan Harrington amended the GNOME Desktop Manager to include keystroke dynamics in the user verification process. When the user enters their username, the timings between key press events are measured and compared against a stored pattern. The theory is...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="keytiming_20080404.jpg" src="http://www.hackszine.com/keytiming_20080404.jpg" width="500" height="381" class="mt-image-none" style="" /></span></p>

<p>Nathan Harrington amended the GNOME Desktop Manager to include keystroke dynamics in the user verification process. When the user enters their username, the timings between key press events are measured and compared against a stored pattern.  The theory is that there is a significant difference in timings for words typed by different individuals, so the way a username is entered provides a bit of extra "fingerprint" information that can be used to help authenticate a user.<br />
 <br />
I'm not sure how immediately useful this will be, since this particular example won't affect other login methods, such as an ssh session. Nevertheless, the idea is pretty cool and the code is all there for you to monkey around with.</p>

<p><a href="http://www.ibm.com/developerworks/opensource/library/os-identify/">Identify and verify users based on how they type</a> [via <a href="http://developers.slashdot.org/developers/08/04/04/169229.shtml">slashdot</a>]</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/04/adding_keystroke_signatures_to.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/04/adding_keystroke_signatures_to.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/04/adding_keystroke_signatures_to.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/04/adding_keystroke_signatures_to.html?CMP=OTC-7G2N43923558</guid>
<category>Cryptography</category>
<pubDate>Fri, 04 Apr 2008 20:28:02 -0800</pubDate>

</item>

<item>
<title>USB CapsLocker and Sun keyboard simulation</title>
<itunes:summary> Of all the April Fools pranks that I came across today, the Stealth USB CapsLocker was my favorite. The tiny AVR-driven USB device sends random caps lock keypresses to a PC via a USB interface. The user will see...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="capslocker_20080401.jpg" src="http://www.hackszine.com/capslocker_20080401.jpg" width="500" height="366" class="mt-image-none" style="" /></span></p>

<p>Of all the April Fools pranks that I came across today, the Stealth USB CapsLocker was my favorite. The tiny AVR-driven USB device sends random caps lock keypresses to a PC via a USB interface. The user will see their caps lock light come on from time to time and think they've accidentally hit that most useless key on the keyboard.</p>

<blockquote>Then they might see the Caps Lock light turn on by itself. Next is a sequence of reboots, bashing the keyboard on the desk, clicking through the Control Panel, possibly even replacing the keyboard. Unless they notice the tiny little device sitting in one of the USB ports on the back of their computer, nothing will help.</blockquote>

<p>Equally as cruel, but slightly less technical, would be to switch someone's keyboard mapping to be like the old Sun keyboards (with the control and caps lock key positions swapped). </p>

<p>Be careful, though. There might be some cranky old unix guru who actually appreciates this configuration.</p>

<p><a href="http://macetech.com/blog/?q=node/46">Stealth USB CapsLocker</a><br />
<a href="http://www.obdev.at/products/avrusb/easylogger.html">EasyLogger - example AVR USB keyboard input device</a><br />
<a href="http://c2.com/cgi/wiki?RemapCapsLock">Remap Caps Lock</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/04/usb_capslocker_and_sun_keyboar.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/04/usb_capslocker_and_sun_keyboar.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/04/usb_capslocker_and_sun_keyboar.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/04/usb_capslocker_and_sun_keyboar.html?CMP=OTC-7G2N43923558</guid>
<category>Electronics</category>
<pubDate>Tue, 01 Apr 2008 20:38:13 -0800</pubDate>

</item>

<item>
<title>BATMAN: adhoc mesh routing</title>
<itunes:summary> BATMAN (Better Approach To Mobile Ad-hoc Networking) is a routing protocol designed for multi-hop ad-hoc mesh networks. When you run BATMAN on routers in an ad-hoc network, the nodes in the network constantly send out little broadcast packets that...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="batman_20080326.jpg" src="http://www.hackszine.com/batman_20080326.jpg" width="500" height="108" class="mt-image-none" style="" /></span></p>

<p>BATMAN (Better Approach To Mobile Ad-hoc Networking) is a routing protocol designed for multi-hop ad-hoc mesh networks. When you run BATMAN on routers in an ad-hoc network, the nodes in the network constantly send out little broadcast packets that are picked up and re-broadcast by nearby machines. Rather than have each node develop a formal map of the network, they can figure out the most reliable routes to other machines in the network based on the speed and reliability of broadcast packets that they receive from other nodes. </p>

<p>You can imagine a scenario where router A might be a single hop away from the uplink router U, but the connection is somewhat unreliable or drops packets from time to time. If router B has a solid connection to U and also has a reliable connection to A, it might be a faster and more reliable to route A's packets through B, even though it's ultimately 2 hops to U. The way BATMAN works, router A would receive U's broadcast packets more frequently from B (due to the U&lt;-&gt;A packet loss), which would cause it to automatically send outbound data through the more reliable B connection.</p>

<p>It looks like this might be fun to experiment with a neighborhood network or even in a larger home with poor coverage. BATMAN is available in OpenWRT, so you could scatter a number of cheap routers throughout an area, give one of them a DSL uplink, and have solid wireless laptop connectivity wherever you want it.</p>

<p>If you really want to get crazy, you can run the routing protocol on your Linux laptops too, making them full mesh participants and expanding the coverage area wherever you go.</p>

<p><a href="https://www.open-mesh.net/batman">B.A.T.M.A.N.</a><br />
<a href="http://www.diniro.net/fabbblog/wireless-mesh-networks-manet.html">Using BATMAN with OpenWRT</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/batman_adhoc_mesh_routing.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/batman_adhoc_mesh_routing.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/03/batman_adhoc_mesh_routing.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/03/batman_adhoc_mesh_routing.html?CMP=OTC-7G2N43923558</guid>
<category>Wireless</category>
<pubDate>Wed, 26 Mar 2008 21:53:01 -0800</pubDate>

</item>

<item>
<title>Run Safari in Ubuntu</title>
<itunes:summary> The Ubuntu Unleashed blog has a simple guide for getting Safari to run in Ubuntu. You basically install the Windows version of Safari under WINE, copy over a few core Windows fonts to your WINE install and it just...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="safariubuntu_20080323.jpg" src="http://www.hackszine.com/safariubuntu_20080323.jpg" width="500" height="346" class="mt-image-none" style="" /></span></p>

<p>The Ubuntu Unleashed blog has a simple guide for getting Safari to run in Ubuntu. You basically install the Windows version of Safari under WINE, copy over a few core Windows fonts to your WINE install and it just works. You can even install the flash plugin.</p>

<p>I'm not positive that I wouldn't feel a little dirty running closed software on a Linux desktop, but considering Safari is still my preferred browser under OS X (much to the embarrassment of some of my coworkers), I can understand why this could be cool for a lot of folks.</p>

<p><a href="http://www.ubuntu-unleashed.com/2008/03/howto-install-safari-on-ubuntu-with.html">Howto: Install Safari on Ubuntu with Flash</a><br />
</p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/run_safari_in_ubuntu.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/run_safari_in_ubuntu.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/03/run_safari_in_ubuntu.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/03/run_safari_in_ubuntu.html?CMP=OTC-7G2N43923558</guid>
<category>Ubuntu</category>
<pubDate>Sun, 23 Mar 2008 20:43:24 -0800</pubDate>

</item>

<item>
<title>CryoPID: hibernation for Linux processes</title>
<itunes:summary>We&apos;re all familiar with the hibernate/deep-sleep features that are typical on your standard laptop. In this mode, the entire contents of RAM are written to the disk and the machine is completely shut down. When it&apos;s next booted, the system...</itunes:summary>
<description>
<![CDATA[<p>We're all familiar with the hibernate/deep-sleep features that are typical on your standard laptop. In this mode, the entire contents of RAM are written to the disk and the machine is completely shut down. When it's next booted, the system is restored to the exact state it was at before sleep, with all of your programs running just like they were when you left them.</p>

<p>What if you could do this at the process level? You could kill whatever umpteen-gazillion applications you have running, reboot your computer, and then start your apps back up whenever you like and they would be exactly the way they were when you left them. </p>

<p>There's a Linux application called CryoPID which attempts to do just that.</p>

<p>CryoPID requires no special kernel modifications and operates in user mode, so you don't need to be root. All you do is run the <b>freeze</b> program on a process you own:</p>

<p><code>freeze /tmp/savestatefile 1234</code></p>

<p>This will archive the state of process 1234 into a self-executing, compressed file named /tmp/savestatefile. To start it back up, just run the save file:</p>

<p><code>/tmp/savestatefile</code></p>

<p>When this is executed, your application will be restored, relinked to any previously-loaded DLLs, and attached to the file descriptors it had open.</p>

<p>You'll run into some problems with network socket connections you had open, and support for X applications is still only experimental, so the useful scenario is a bit limited, but it's a promising concept and could come in quite handy in the command-line world.</p>

<p><a href="http://cryopid.berlios.de/">CryoPID - A Process Freezer for Linux</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/cryopid_hibernation_for_linux.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/cryopid_hibernation_for_linux.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/03/cryopid_hibernation_for_linux.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/03/cryopid_hibernation_for_linux.html?CMP=OTC-7G2N43923558</guid>
<category>Linux</category>
<pubDate>Mon, 17 Mar 2008 21:32:03 -0800</pubDate>

</item>

<item>
<title>N64 emulation: better than the real thing</title>
<itunes:summary> Racketboy has a great article showing off some of the capabilities of the modern N64 emulator. If your machine is fast enough, most of the available emulators will really give you a noticeable resolution boost and better looking anti-aliased...</itunes:summary>
<description>
<![CDATA[<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="n64emu_20080311.jpg" src="http://www.hackszine.com/n64emu_20080311.jpg" width="500" height="352" class="mt-image-none" style="" /></span></p>

<p>Racketboy has a great article showing off some of the capabilities of the modern N64 emulator. If your machine is fast enough, most of the available emulators will really give you a noticeable resolution boost and better looking anti-aliased models. Using the Rice Video plugin with the Project64 emulator, you can even swap out the textures for some games with user-created texture packs. </p>

<p>I still use the real hardware (is the N64 considered "retro" now?), so before seeing this, I hadn't even considered emulation for this platform. That all changed when I saw the Mario64 mod shown above. The selection of available emulators is impressive, and there are open source emulators available for just about every platform. I'm currently playing a game under Mupen64 on my iMac and it's pretty flawless. My only wish is that all computers came, by default, with a nice joystick like they did back in the 80s.</p>

<p>Enhance N64 Graphics With Emulation Plugins & Texture Packs - <a href="http://www.racketboy.com/retro/nintendo/n64/2008/03/enhance-n64-graphics-with-emulation-plugins-texture-packs.html">Link</a><br />
Project64 Emulator - <a href="http://www.pj64-emu.com/">Link</a><br />
Rice Video Plugin - <a href="https://ricevideo.bountysource.com/">Link</a><br />
Mupen64 Emulator (cross-platform, open source) - <a href="http://mupen64.emulation64.com/">Link</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/n64_emulation_better_than_the.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/n64_emulation_better_than_the.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/03/n64_emulation_better_than_the.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/03/n64_emulation_better_than_the.html?CMP=OTC-7G2N43923558</guid>
<category>Gaming</category>
<pubDate>Tue, 11 Mar 2008 22:35:18 -0800</pubDate>

</item>

<item>
<title>Command line Twitter</title>
<itunes:summary>You can easily update your Twitter status from the command line using cURL. The Tech-Recipes blog posted this handy command line hack: With cURL installed, you can post to Twitter from the terminal window by using the following syntax: curl...</itunes:summary>
<description>
<![CDATA[<p>You can easily update your Twitter status from the command line using cURL. The Tech-Recipes blog posted this handy command line hack:</p>

<blockquote>With cURL installed, you can post to Twitter from the terminal window by using the following syntax:

<p><br />
<code>curl -u yourusername:yourpassword -d status="Your Message Here" http://twitter.com/statuses/update.xml</code></p>

<p>You will receive a response containing the XML coding for your post which acts as a confirmation that your post was submitted.</blockquote></p>

<p>Consider this: instant messaging is the new <i>talk</i> (<i>phone</i> for my VMS peeps) and Twitter is the new <i>finger</i>.  It's nice to see at least one of these handy communication tools make its way back to the command line.</p>

<p>Posting to Twitter from the Terminal Window - <a href="http://blogs.tech-recipes.com/shamanstears/2008/03/04/ubuntu-posting-to-twitter-from-the-terminal-window/">Link</a><br />
cURL downloads - <a href="http://curl.haxx.se/download.html">Link</a></p>]]>
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/command_line_twitter.html?CMP=OTC-7G2N43923558" /&gt;Read More&lt;/a&gt;]  
[&lt;a href="http://www.hackszine.com/blog/archive/2008/03/command_line_twitter.html?CMP=OTC-7G2N43923558#comments" /&gt;Comments&lt;/a&gt;]
</description>
<link>http://www.hackszine.com/blog/archive/2008/03/command_line_twitter.html?CMP=OTC-7G2N43923558</link>
<guid>http://www.hackszine.com/blog/archive/2008/03/command_line_twitter.html?CMP=OTC-7G2N43923558</guid>
<category>Ubuntu</category>
<pubDate>Sun, 09 Mar 2008 21:39:36 -0800</pubDate>

</item>


</channel>
</rss>