<?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"
	>

<channel>
	<title>Rudd-O.com &#187; Free software</title>
	<atom:link href="http://rudd-o.com/archives/category/software-libre/feed/" rel="self" type="application/rss+xml" />
	<link>http://rudd-o.com</link>
	<description>We only do fun stuff.</description>
	<pubDate>Thu, 24 Jul 2008 20:34:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>NoMachine NX fails on Fedora 9 &#8212; here&#8217;s the solution</title>
		<link>http://rudd-o.com/archives/2008/07/20/nomachine-nx-fails-on-fedora-9-heres-the-solution/</link>
		<comments>http://rudd-o.com/archives/2008/07/20/nomachine-nx-fails-on-fedora-9-heres-the-solution/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 19:27:31 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Fedora]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rudd-o.com/?p=1937</guid>
		<description><![CDATA[I am a heavy user of NoMachine NX.  After my move to Fedora 9, it fails with an error of The connection with the remote server was shut down.  Please check the state of your network connection.  The solution is simple: install the package xorg-x11-fonts-misc.  Here’s why that works:



The NX server [...]]]></description>
			<content:encoded><![CDATA[<p>I am a heavy user of NoMachine NX.  After my move to Fedora 9, it fails with an error of <q>The connection with the remote server was shut down.  Please check the state of your network connection</q>.  The solution is simple: install the package <code>xorg-x11-fonts-misc</code>.  Here’s why that works:</p>

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

<p>The NX server requires a font named <code>fixed</code> from the X core font subsystem when starting up.  Fedora 9 no longer has the X core font subsystem by default — they solved it by compiling <code>fixed</code> and <code>cursor</code> right into the X server.  Therefore, the X fonts package is no longer installed by default.</p>

<p>Without said fonts, the NX server fails.  Once you’ve installed them, NX works again.</p>

<p>You’re welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/07/20/nomachine-nx-fails-on-fedora-9-heres-the-solution/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Big win for ZFS on Linux today</title>
		<link>http://rudd-o.com/archives/2008/07/16/big-win-for-zfs-on-linux-today/</link>
		<comments>http://rudd-o.com/archives/2008/07/16/big-win-for-zfs-on-linux-today/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 22:01:07 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rudd-o.com/?p=1934</guid>
		<description><![CDATA[ZFS through FUSE is now much faster on Linux thanks to a patch Ricardo Correia developed and I improved, against the latest code in the ZFS-FUSE repository.  Further big wins are expected soon.  Heads up: 64 bits are needed for high performance — I’m still running 32 bits so there’s lots of low-hanging [...]]]></description>
			<content:encoded><![CDATA[<p>ZFS through FUSE <a href="http://groups.google.com/group/zfs-fuse/browse_frm/thread/3393f58b221db75d/69bbb8ec2738e62a#69bbb8ec2738e62a">is now much faster on Linux</a> thanks to a patch <a href="http://zfs-fuse.googlegroups.com/web/cache-dentries.diff?gda=asJoGkQAAADdbq730B5lHM8UEAS1tBQ3RbTXWUo16thajjq948XfiGG1qiJ7UbTIup-M2XPURDTBS0dZeq_0AhD3cq2QChVJ19pBMJiXPCgyhKWF91LKHA">Ricardo Correia developed and I improved</a>, against the latest code in the ZFS-FUSE repository.  Further big wins are expected soon.  Heads up: 64 bits are needed for high performance — I’m still running 32 bits so there’s lots of low-hanging fruit to be reaped.  Here is why.</p>

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

<p>Why 64 instead of 32 bits?  Integer arithmetic.  <code>atomic_add_64</code>, the function in the ZFS sources that accounts for the most CPU time, is over twenty instructions of 32 bits assembler guarded by mutexes.  The same function in 64 bits is one instruction.  One.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/07/16/big-win-for-zfs-on-linux-today/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Are you using Firefox 3?</title>
		<link>http://rudd-o.com/archives/2008/06/13/are-you-using-firefox-3/</link>
		<comments>http://rudd-o.com/archives/2008/06/13/are-you-using-firefox-3/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 23:04:04 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[Haha!]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/06/13/are-you-using-firefox-3/</guid>
		<description><![CDATA[Then click here.
]]></description>
			<content:encoded><![CDATA[<p>Then <a href="about:robots">click here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/06/13/are-you-using-firefox-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>KDE obliterates the competition</title>
		<link>http://rudd-o.com/archives/2008/04/25/kde-obliterates-the-competition/</link>
		<comments>http://rudd-o.com/archives/2008/04/25/kde-obliterates-the-competition/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 13:57:13 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/04/25/kde-obliterates-the-competition/</guid>
		<description><![CDATA[Imagine 52 million children being simultaneously introduced to KDE and Linux.  Well, you no longer need to just imagine it, because the Ministry of Education Brazil, over the course of this and next year, will do exactly that.  This is unabashed success.
]]></description>
			<content:encoded><![CDATA[<p>Imagine 52 million children being simultaneously introduced to KDE and Linux.  Well, you no longer need to just imagine it, because the Ministry of Education Brazil, <a href="http://aseigo.blogspot.com/2008/04/deploying-kde-to-52-million-young.html">over the course of this and next year, will do exactly that</a>.  This is unabashed success.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/04/25/kde-obliterates-the-competition/feed/</wfw:commentRss>
		</item>
		<item>
		<title>KDE 4.0.0 is out.  The dream is alive!</title>
		<link>http://rudd-o.com/archives/2008/01/11/kde-400-is-out-the-dream-is-alive/</link>
		<comments>http://rudd-o.com/archives/2008/01/11/kde-400-is-out-the-dream-is-alive/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 17:27:35 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2008/01/11/kde-400-is-out-the-dream-is-alive/</guid>
		<description><![CDATA[



Be free.  Today.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://kde.org/"><img style="border: none" src="http://rudd-o.com/wp-content/uploads/2008/01/kde40.png" alt="KDE 4.0.0 release logo"/></a></p>

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

<p><a href="http://kde.org/">Be free.  Today.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2008/01/11/kde-400-is-out-the-dream-is-alive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Removal of Ogg Vorbis and Theora from HTML5: an outrageous disaster</title>
		<link>http://rudd-o.com/archives/2007/12/11/removal-of-ogg-vorbis-and-theora-from-html5-an-outrageous-disaster/</link>
		<comments>http://rudd-o.com/archives/2007/12/11/removal-of-ogg-vorbis-and-theora-from-html5-an-outrageous-disaster/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 08:32:55 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[HTML and XHTML]]></category>

		<category><![CDATA[Patents]]></category>

		<category><![CDATA[Web standards]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/12/11/removal-of-ogg-vorbis-and-theora-from-html5-its-outrageous-and-preposterous/</guid>
		<description><![CDATA[Nokia and Apple have privately pushed to give Ogg the noose treatment (and so far succeeded) in HTML5.  This destroyed all hope of having free (as in freedom) media embedded in HTML5 in an interoperable way.



I just sent this e-mail to the WHATWG discussion mailing list where HTML5 is being discussed:

From: Manuel Amador
To: whatwg@whatwg
Subject: [...]]]></description>
			<content:encoded><![CDATA[<p>Nokia and Apple have privately pushed to give Ogg the noose treatment (and so far succeeded) in <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML5</a>.  This destroyed all hope of having free (as in freedom) media embedded in HTML5 in an interoperable way.</p>

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

<p>I just sent this e-mail to the WHATWG discussion mailing list where HTML5 is being discussed:</p>

<p><pre style="clear: both">From: Manuel Amador
To: whatwg@whatwg
Subject: Removal off Ogg technology: <em>preposterous</em></pre></p>

<p>Allow me to be the voice of the small Web developer -- which I consider to be
the foundation of the World Wide Web.</p>

<p>In reference to:
<a href="http://html5.org/tools/web-apps-tracker?from=1142&amp;to=1143">http://html5.org/tools/web-apps-tracker?from=1142&amp;to=1143</a></p>

<p>The recent removal of the mention of Ogg in HTML5 and the subsequent
replacement of its paragraph with the weasel-worded paragraph that would make
Minitrue bust their collective shirt buttons in pride:</p>

<p>&lt;p class="big-issue"&gt;It would be helpful for interoperability if all+
browsers could support the same codecs. However, there are no known+  codecs
that satisfy all the current players: we need a codec that is+  known to not
require per-unit or per-distributor licensing, that is+  compatible with the
open source development model, that is of+  sufficient quality as to be
usable, and that is not an additional+  submarine patent risk for large
companies. This is an ongoing issue+  and this section will be updated once
more information is+  available.&lt;/p&gt;</p>

<p>is a preposterous and gross mischaracterization of fact (dare I say lie).
At the very least, it's FUD.</p>

<p>It pains me to state what is and has always been public knowledge, and is
being intentionally ignored just to "get the spec published":</p>

<ul>
<li>The Xiph developers were extremely zealous and almost fiduciarily diligent
in researching all possible patent threats to Vorbis technology, and for more
than a year they found none -- they even did the research <em>before</em> beginning
to code, explicitly to avoid submarine patents.  I know, because I was
subscribed to their mailing list and read status updates of this research,
practically at the start of the project.  I also know that big-name software
houses and media players manufacture products with Vorbis technology,
and none of them have been sued.  It's been what, seven years now?</li>
<li>The Theora codec has had its patents practically relinquished by On3 with a
perpetual royalty-free license.</li>
<li>Ogg and its audio/video codec technologies are the ONLY free software media
technologies with implementations widely available on all consumer computing
platforms -- from WM codecs to Linux DLLs, passing through the entire range
of hardware (floating-point and fixed-point) and OSes.</li>
<li>Without guaranteed Ogg support (whose integration in user agents I think I
already established to be sort of a weekend-level junior programmer project
at NO COST, due to the ready availability of the technology in all
platforms), authors <em>will be</em> forced to use patent-encumbered technology.
Remember MP3? Well, with HTML5 it's 1997 all over again.</li>
</ul>

<p>Ian, revert.  This compromise on basic values is unacceptable, <em>whatever</em> the
practical reasons you have deemed to compromise for.  If you don't revert,
you will be giving us independent authors the shaft.  And we will remember it
forever.</p>

<p><a href="http://spreadopenmedia.org/2007/12/11/the-html-5-wars-and-why-you-should-avoid-them/">Here&#8217;s the position paper of the Xiph foundation</a>, the makers of Ogg Vorbis and stewards of all Ogg technology.  Let me quote a paragraph from them:</p>

<blockquote><p>So, how do you make Theora and Vorbis popular? Why, by the very same process that made MP3 so ubiquitous: by using it and by sharing it. Only by advocating the formats will you see interest from the corporations. There is no other way around it. Let me write that one more time: there is no other way around it. Backup your films in Theora. Backup your music in Vorbis. Share podcasts and videocats in these formats. And do not wait for tomorrow; do it now. And by now, I mean yesterday.</p>
<p>There’s a lot of companies out there who do not wish to see Theora and Vorbis succeed, and they don’t even have to make much of an effort to affect them. The masses out there with their expensive iPod toys don’t care about Vorbis or Theora. Most of them don’t even know what they are.</p></blockquote>

<p>Note that HTML5 in no way <em>required</em> Ogg (as denoted by the word &#8220;should&#8221; instead of &#8220;must&#8221; in the earlier draft).  Adding this to the fact that there are widely available patent-free implementations of Ogg technology, <em>there is really no excuse for Apple and Nokia to say that they couldn&#8217;t in good faith implement HTML5 as previously formulated</em>.  Throw your own theory here: DRM, proprietary control, et cetera.</p>

<p>The WHATWG had an opportunity here to eliminate the plugin morass (so 90&#8217;s) in favor of a baseline format that each browser could implement. Just as HTML <del datetime="2007-12-11T23:37:09+00:00">specified</del><ins datetime="2007-12-11T23:37:09+00:00">hinted at</ins> baseline formats for images (GIF and PNG), this should have been an opportunity to <ins datetime="2007-12-11T23:37:09+00:00">suggest or even</ins> specify baseline free audio and video.  And there&#8217;s still a chance.</p>

<p>Please, please help this issue get more public scrutiny.  <a href="http://www.whatwg.org/mailing-list#specs">But if you&#8217;re going to exert pressure on the WHATWG</a>, be reasonable &#8212; read the archives first!.  <strong>And don&#8217;t let special interests kill computing for all &#8212; now it&#8217;s time to take a stand!</strong></p>

<p><ins datetime="2007-12-12T04:52:18+00:00">Update: the discussion at the WHATWG list is centering around the fact that Microsoft, Nokia and Apple disagree on having Ogg technology mentioned on the spec, due (I loosely quote them) to the potential threat that submarine patents may pose.  My personal opinion is that you don&#8217;t get any freer than Ogg, and there is no such patent threat because major hardware and software players (gaming companies and America Online / Winamp, for example) have already shipped at least Ogg Vorbis technology in the past.  Until this conundrum is resolved, they&#8217;re taking Ogg technology off the table because they don&#8217;t want to implement it in their browsers.</ins></p>

<p><ins datetime="2007-12-12T04:52:18+00:00">Since moving forward with HTML5 is a consensus decision, the thing&#8217;s just not moving forward until a viable alternative to Ogg is found (or, maybe they can be convinced?).  Both Opera and Mozilla have preliminary implementations of in-browser VIDEO tags that play Ogg media.  <a href="http://www.whatwg.org/mailing-list#specs">Read the mailing list archives</a> to see the arguments espoused in favor of / against the idea, and read the comments below.</ins></p>

<p><ins datetime="2007-12-12T04:52:18+00:00">It really bothered me that <a href="http://www.boingboing.net/2007/12/09/nokia-to-w3c-ogg-is.html">Nokia referred earlier this week to Ogg as a <em>proprietary</em> technology</a>, blatantly stating something so untrue.  It also bothers me that Apple has expressed concern against Ogg.  Both companies make great products &#8212; my entire life I&#8217;ve only owned Nokia phones, I was thinking about the N800, and it&#8217;s in no small part thanks to Apple that I have hassle-free Zeroconf networking at home &#8212; but this clearly puts the small content producer at a disadvantage.</ins></p>

<p><ins datetime="2007-12-12T05:57:01+00:00"><a href="http://www.w3.org/2007/08/video/positions/mozilla.html">I just discovered the position paper that Mozilla</a>, through Chris Double (the author of the VIDEO embedding tag in Mozilla software), will be presenting in a few hours on the W3C video workshop.  Interesting read.</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/12/11/removal-of-ogg-vorbis-and-theora-from-html5-an-outrageous-disaster/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thanks, Michael!</title>
		<link>http://rudd-o.com/archives/2007/11/25/thanks-michael/</link>
		<comments>http://rudd-o.com/archives/2007/11/25/thanks-michael/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 17:50:40 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[GNOME]]></category>

		<category><![CDATA[Performance]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/11/25/thanks-michael/</guid>
		<description><![CDATA[Those bug reports were my pleasure.  Keep on doing great stuff like iogrind and your other projects!  The community needs more efforts and people like you are a source of inspiration for newcomers and oldies alike.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://snteam-events.blogspot.com/2007/11/gnome-announce-list-digest-vol-43-issue_22.html">Those bug reports were my pleasure</a>.  Keep on doing great stuff like <code>iogrind</code> and your other projects!  The community needs more efforts and people like you are a source of inspiration for newcomers and oldies alike.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/11/25/thanks-michael/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How PulseAudio works</title>
		<link>http://rudd-o.com/archives/2007/11/05/how-pulseaudio-works/</link>
		<comments>http://rudd-o.com/archives/2007/11/05/how-pulseaudio-works/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 22:56:38 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/11/05/how-pulseaudio-works/</guid>
		<description><![CDATA[In an effort to better understand how each of the PulseAudio components interact with each other, I’ve done a small diagram that roughly shows how each component connects and interacts:






You’re free to use this diagram on your own site or documentation, as per the license that covers it (see the footer).  However, I do [...]]]></description>
			<content:encoded><![CDATA[<p>In an effort to better understand how each of the PulseAudio components interact with each other, I’ve done a small diagram that roughly shows how each component connects and interacts:</p>

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

<p style="text-align:center">
<a href="http://rudd-o.com/archives/2007/11/05/how-pulseaudio-works/pulseaudio-system-diagram-version-2/" rel="attachment wp-att-1808" title="PulseAudio system diagram, version 2"><img src="http://rudd-o.com/wp-content/uploads/2007/11/pulseaudio-diagram.png" alt="PulseAudio system diagram, version 2"/></a></p>

<p>You’re free to use this diagram on your own site or documentation, as per the license that covers it (see the footer).  However, I do ask you for credit and attribution if you use it.  The image is also licensed under the GFDL, just in case you need it for free documentation.</p>

<p>The diagram is also available as a Dia diagram.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/11/05/how-pulseaudio-works/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to automate torrent downloads using TorrentFlux-b4rt, cron and rsync</title>
		<link>http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/</link>
		<comments>http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 12:40:52 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Server management]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/</guid>
		<description><![CDATA[TorrentFlux-b4rt is an awesome masterpiece of engineering.  You install it on your Web server, and then you can start downloading BitTorrent torrents right away.  The catch is that those torrents are saved in your Web server until you actually download them to your PC.  And having to schedule downloads separately is a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tf-b4rt.berlios.de/">TorrentFlux-b4rt</a> is an awesome masterpiece of engineering.  You install it on your Web server, and then you can start downloading BitTorrent torrents right away.  The catch is that those torrents are saved in your Web server until you actually download them to your PC.  And having to schedule downloads separately is a pain.  Well, no more.</p>

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

<h2>Awesome awesomeness: start your downloads minutes after TorrentFlux finishes them</h2>

<p>I&#8217;ve created a very, very complicated and interwoven (translation: awesome and straightforward) script that you may use and modify on your home computer.  It works like this:</p>

<ul>
    <li>Using SSH, it queries your TorrentFlux server&#8217;s transfer list, asking which torrents are completely downloaded.</li>
    <li>For each of the completed torrents, it grabs the file name of the downloaded file.</li>
    <li>Then, it uses rsync to incrementally transfer the downloaded file to your PC.</li>
    <li>Again using rsync, it removes the file from your TorrentFlux server, freeing disk space.</li>
</ul>

<h3>What you need to do before using the script</h3>

<p>For you to use it, you will need to do the following:</p>

<ul>
    <li>Enable SSH access to your (soon-to-be) TorrentFlux server.</li>
    <li>Set up public key (passwordless) authentication so that your home computer&#8217;s user account can freely log in to your server without asking for a password.</li>
    <li>Install TorrentFlux-b4rt and set it up so that your SSH user has read/write access to the torrents and downloads folders/files.  Umask/permissions, you know the drill.</li>
    <li>Enable <code>fluxcli</code> usage on your TorrentFlux setup.</li>
    <li>Install <code>rsync</code> on both your server and your home computer.</li>
    <li>Install the BitTorrent package that contains the program named <code>torrentinfo-console</code> on your server.</li>
    <li>Create a destination directory on your home computer.</li>
    <li>Install a mail program such as <code>mailx</code> on your home computer.</li>
    <li>Install <code>cron</code> on your home computer.</li>
    <li>Configure the script altering the variables at the top.</li>
</ul>

<p>Yeah, it&#8217;s a lot of work.  Go bitch somewhere else, we&#8217;re here for the fun.</p>

<h3>Installing the script</h3>

<p>Put the script somewhere in your <code>PATH</code>.  Make it executable.  Set up a cron job for the purpose:
<pre># m h  dom mon dow   command
0,10,20,30,40,50 * * * * /home/rudd-o/bin/torrentleecher -q</pre>
Make sure the cron job line ends with a line ending (carriage return) &#8212; otherwise it doesn&#8217;t run.</p>

<h3>The script itself</h3>

<p>It&#8217;s a stunning, hackish example of subprocessing, SSH remoting, pipeline integration, text processing, POSIX daemonizing and file locking, and samizdat logging.  It gets almost all of them wrong, and yet it manages to stay standing.  If you&#8217;re interested in reading <a href="post:how-to-divide-and-conquer-a-problem-the-unix-way">a complete account of how this script grew out of nothing, well, click here</a>.</p>

<p>It&#8217;s a miracle:
<pre>#!/usr/bin/env python</pre></p>

<p>from subprocess import Popen,PIPE,STDOUT,call
import fcntl
import re
import os
import sys
import signal</p>

<h1>FIXME: this script doesn't deal with multifile torrents</h1>

<h1>vars!</h1>

<h1>wherever they are used, it's MOST LIKELY they need quoting</h1>

<h1>FIXME whatever calls SSH remoting needs to protect/quote the commands for spaces or else this might turn out to be a bitch</h1>

<p>torrentflux_base_dir = "/var/www/html/torrents/torrents"
torrentflux_download_dir = "/var/www/html/torrents/torrents/incoming"
torrentflux_server = "yourserver.com"
torrentleecher_destdir = "/home/rudd-o/download/"
fluxcli = "fluxcli"
torrentinfo = "torrentinfo-console"
email_address = "rudd-o@awesome.com"</p>

<p>def getstdout(cmdline):
        p = Popen(cmdline,stdout=PIPE)
        output = p.communicate()[0]
        if p.returncode != 0: raise Exception, "Command %s return code %s"%(cmdline,p.returncode)
        return output
def getstdoutstderr(cmdline,inp=None): # return stoud and stderr in a single string object
        p = Popen(cmdline,stdin=PIPE,stdout=PIPE,stderr=STDOUT)
        output = p.communicate(inp)[0]
        if p.returncode != 0: raise Exception, "Command %s return code %s"%(cmdline,p.returncode)
        return output
def passthru(cmdline): return call(cmdline) # return status code, pass the outputs thru
def getssh(cmd): return getstdout(["ssh","-o","BatchMode yes","-o","ForwardX11 no",torrentflux_server] + [cmd]) # return stdout of ssh.  doesn't return stderr
def sshpassthru(cmd): return call(["ssh","-o","BatchMode yes","-o","ForwardX11 no",torrentflux_server] + [cmd]) # return status code from a command executed using ssh
def mail(subject,text): return getstdoutstderr(["mail","-s",subject,email_address],text)</p>

<p>def get_finished_torrents():
        stdout = getssh("%s transfers"%fluxcli)
        stdout = stdout.splitlines()[2:-5]
        stdout = [ re.match("^- (.+) - [0123456789.]+ MB - (Seeding|Done)",line) for line in stdout ]
        return [ match.group(1) for match in stdout if match ]</p>

<p>def get_file_name(torrentname):
        cmd = "LANG=C %s %s/.transfers/%s"%(torrentinfo,torrentflux_base_dir,torrentname)
        stdout = getssh(cmd).splitlines()
        filenames = [ l[22:] for l in stdout if l.startswith("file name...........: ") ]
        assert len(filenames) is 1
        return filenames[0]</p>

<p>def dorsync(filename):
        cmdline = ["rsync","-avzP","--remove-source-files",
                "%s:%s/%s"%(torrentflux_server,torrentflux_download_dir,filename),"."]
        return passthru(cmdline)</p>

<p>def exists_on_server(filename):
        cmd = "test -f %s/%s"%(torrentflux_download_dir,filename)
        returncode = sshpassthru(cmd)
        if returncode == 1: return False
        elif returncode == 0: return True
        else: assert False # Not reached</p>

<p>def get_files_to_download():
        torrents = get_finished_torrents()
        for t in torrents:
                yield (t,get_file_name(t))</p>

<p>def lock():
        global f
        try:
                fcntl.lockf(f.fileno(),fcntl.LOCK_UN)
                f.close()
        except: pass
        try:
                f=open(os.path.join(torrentleecher_destdir,".torrentleecher.lock"), 'w')
                fcntl.lockf(f.fileno(),fcntl.LOCK_EX | fcntl.LOCK_NB)
        except IOError,e:
                if e.errno == 11: return False
                else: raise
        return True</p>

<p>def daemonize():
        """Detach a process from the controlling terminal and run it in the
        background as a daemon.
        """
        try: pid = os.fork()
        except OSError, e: raise Exception, "%s [%d]" % (e.strerror, e.errno)</p>

<pre><code>    if (pid == 0):           # The first child.
            os.setsid()
            try: pid = os.fork()              # Fork a second child.
            except OSError, e: raise Exception, "%s [%d]" % (e.strerror, e.errno)

            if (pid == 0):   # The second child.
                    os.chdir("/")
            else:
                    # exit() or _exit()?  See below.
                    os._exit(0)      # Exit parent (the first child) of the second child.
    else: os._exit(0)                # Exit parent of the first child.

    import resource                           # Resource usage information.
    maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
    if (maxfd == resource.RLIM_INFINITY):
            maxfd = 1024

    # Iterate through and close all file descriptors.
    for f in [ sys.stderr, sys.stdout, sys.stdin ]:
            try: f.flush()
            except: pass

    for fd in range(0, 2):
            try: os.close(fd)
            except OSError: pass

    for f in [ sys.stderr, sys.stdout, sys.stdin ]:
            try: f.close()
            except: pass

    sys.stdin = file("/dev/null", "r")
    sys.stdout = file(os.path.join(torrentleecher_destdir,".torrentleecher.log"), "a",0)
    sys.stderr = file(os.path.join(torrentleecher_destdir,".torrentleecher.log"), "a",0)
    os.dup2(1, 2)

    return(0)
</code></pre>

<p>sighandled = False
def sighandler(signum,frame):
        global sighandled
        if not sighandled:
                print &#8220;Received signal %s&#8221;%signum
                # temporarily immunize from signals
                oldhandler = signal.signal(signum,signal.SIG_IGN)
                os.killpg(0,signum)
                signal.signal(signum,oldhandler)
                sighandled = True</p>

<p>def report_file_failed(filename):
        try: os.symlink(os.path.join(torrentleecher_destdir,&#8221;.torrentleecher.log&#8221;),&#8221;%s.log&#8221;%filename)
        except OSError,e:
                if e.errno != 17: raise #file exists should be ignored of course
        sys.stdout.flush()
        sys.stderr.flush()
        errortext = &#8220;&#8221;"Please take a look at the log files in
%s&#8221;"&#8221;%torrentleecher_destdir
        mail(&#8221;Leecher: error &#8212; %s&#8221;%filename,errortext)</p>

<p>def report_file_done(filename):
        try: file(&#8221;%s is done&#8221;%filename,&#8221;w&#8221;).write(&#8221;Done&#8221;)
        except OSError,e:
                if e.errno != 17: raise #file exists should be ignored of course
        mail(&#8221;Leecher: done &#8212; %s&#8221;%filename,&#8221;The file is at %s&#8221;%torrentleecher_destdir)</p>

<p>def main():
        if not ( len(sys.argv) &gt; 1 and &#8220;-D&#8221; in sys.argv[1:] ): daemonize()
        os.chdir(torrentleecher_destdir)
        if not lock(): # we need to lock the file after the daemonization
                if not ( len(sys.argv) &gt; 1 and &#8220;-q&#8221; in sys.argv[1:] ):
                        print &#8220;Other process is downloading the file &#8212; add -q argument to command line to squelch this message&#8221;
                sys.exit(0)
        signal.signal(signal.SIGTERM,sighandler)
        signal.signal(signal.SIGINT,sighandler)</p>

<pre><code>    print "Starting download of finished torrents"

    try:

            for torrent,filename in get_files_to_download():
                    # no point in doing anything if the file was removed, right?
                    # so we continue if the file doesn't exist
                    if not exists_on_server(filename): continue
                    print "Downloading %s from torrent %s"%(filename,torrent)
                    retvalue = dorsync(filename)
                    if retvalue == 0:
                            report_file_done(filename)
                            print "Download of %s complete"%filename
                            # TODO: make use of fluxcli to kill the torrent out of TF
                    else:
                            if retvalue == 20:
                                    print "Download of %s stopped -- rsync process interrupted"%(filename)
                                    print "Finishing by user request"
                                    sys.exit(2)
                            elif retvalue &amp;lt; 0:
                                    report_file_failed(filename)
                                    print "Download of %s failed -- rsync process killed with signal %s"%(filename,-retvalue)
                                    print "Aborting"
                                    sys.exit(1)
                            else:
                                    report_file_failed(filename)
                                    print "Download of %s failed -- rsync process exited with return status %s"%(filename,retvalue)
                                    print "Aborting"
                                    sys.exit(1)

            print "Download of finished torrents complete"

    except Exception,e:
            report_file_failed("00 - General error")
            raise
</code></pre>

<p>if <strong>name</strong> == &#8220;<strong>main</strong>&#8220;: main()</p>

<p>If you want to learn the process of <a href="post:how-to-divide-and-conquer-a-problem-the-unix-way">how this script grew out of nothing, here&#8217;s the story</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/10/31/how-to-automate-torrent-downloads-using-torrentflux-b4rt-cron-and-rsync/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A cursory look into KDE 4 file management: Dolphin beta</title>
		<link>http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/</link>
		<comments>http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 12:31:36 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/</guid>
		<description><![CDATA[Windows has Explorer.  Mac OS has Finder.  GNOME has Nautilus.  And KDE had, up to a number of months ago, Konqueror.  Now, together with the up-and-coming KDE 4, a simple file manager named Dolphin takes on file management.  So how does Dolphin stack up?



Very well, I must confess.  File [...]]]></description>
			<content:encoded><![CDATA[<p>Windows has Explorer.  Mac OS has Finder.  GNOME has Nautilus.  And KDE had, up to a number of months ago, Konqueror.  Now, together with the up-and-coming KDE 4, a simple file manager named <a href="http://enzosworld.gmxhome.de/">Dolphin</a> takes on file management.  So how does Dolphin stack up?</p>

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

<p>Very well, I must confess.  File management is an everyday task — and most file managers get it right.  What they usually don’t get right is the ability to do advanced things in an intuitive and discoverable way.  Dolphin does — it successfully merges a basic file management interface with the most-requested advanced features, and in a non-obtrusive way.</p>

<p>Now, it’s been three weeks since I’ve been using Dolphin (the KDE 3 version) exclusively.  As it turns out, Dolphin is quite versatile (if a bit more flickery than Konqueror 3) and faster as well.  My only caveat was that I had to manually associate the <code>inode/directory</code> MIME type to get it to take over directory browsing.</p>

<p>But today, for the purposes of this review, it’s Dolphin 4 all the way.</p>

<h2>How Dolphin starts up</h2>

<p>There’s nothing magical about Dolphin.  Picture a Windows Explorer folder view (with the side panel, not the side tree).  Picture a Nautilus browse folder.  That’s how Dolphin looks like:</p>

<p align="center"><a href="http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/dolphin-showing-the-home-folder/" rel="attachment wp-att-1750" title="Dolphin showing the home folder"><img src="http://rudd-o.com/wp-content/uploads/2007/10/dolphin-showing-the-home-folder.thumbnail.jpg" alt="Dolphin showing the home folder"/></a> <a href="http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/dolphin-showing-the-root-directory/" rel="attachment wp-att-1752" title="Dolphin showing the root directory"><img src="http://rudd-o.com/wp-content/uploads/2007/10/dolphin-showing-the-root-directory.thumbnail.jpg" alt="Dolphin showing the root directory"/></a></p>

<p>Of course, Dolphin has the ability to show previews like any other file manager.  If you want it to show previews, you just hit the big Previews button, and presto:</p>

<p align="center"><a href="http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/dolphin-showing-previews-of-media-files/" rel="attachment wp-att-1751" title="Dolphin showing previews of media files"><img src="http://rudd-o.com/wp-content/uploads/2007/10/dolphin-showing-previews-of-media-files.thumbnail.jpg" alt="Dolphin showing previews of media files"/></a> <a href="http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/the-root-directory-with-previews-enabled/" rel="attachment wp-att-1753" title="The root directory with previews enabled"><img src="http://rudd-o.com/wp-content/uploads/2007/10/dolphin-showing-the-root-directory-with-previews-enabled.thumbnail.jpg" alt="The root directory with previews enabled"/></a></p>

<h2>Network transparency</h2>

<p>Of course, Dolphin wouldn’t be part of KDE if it didn’t put to use the fantastic KIO technology.  KIO is a way for applicatios to request and send data to local and remote file systems.  Any application that uses KIO gets two big advantages:</p>

<ol>
<li>It becomes asynchronous.  File operations never hang, because things happen upon notifications instead of waiting for them to happen.</li>
<li>It gains the ability to access data anywhere in the world, through any popular protocol (HTTP, WebDAV, FTP, SFTP, SSH and much more).</li>
</ol>

<p>And Dolphin is no exception.  However, I didn’t test KIO remoting via SFTP on Dolphin 4, so you’re just gonna have to take my word for it.  It’s okay — I use it every day in Dolphin 3.</p>

<h2>It hangs.  Hard.  But, well, it’s a beta</h2>

<p>Of course, it wouldn’t be a beta if it didn’t hang <img src="http://rudd-o.com/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley"/> </p>

<p align="center"><a href="http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/dolphin-hung/" rel="attachment wp-att-1754" title="Dolphin, hung"><img src="http://rudd-o.com/wp-content/uploads/2007/10/dolphin-hung.thumbnail.jpg" alt="Dolphin, hung"/></a></p>

<p>Let’s continue to explore what’s new in the (admittedly rather boring) file management world.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A visual stroll through the world of KDE 4 Beta (3.94)</title>
		<link>http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/</link>
		<comments>http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 14:17:03 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/</guid>
		<description><![CDATA[Curious about how the next generation of KDE looks like?  Be curious no more: here’s a bleeding-edge (really, sometimes it bleeds) look at the latest — 3.94 — beta of KDE 4.



I’ve been following KDE since KDE 1.1 was released — in fact, back in the day, I used to compile KDE from source. [...]]]></description>
			<content:encoded><![CDATA[<p>Curious about how the next generation of KDE looks like?  Be curious no more: here’s a bleeding-edge (really, sometimes it bleeds) look at the latest — 3.94 — beta of KDE 4.</p>

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

<p>I’ve been following KDE since KDE 1.1 was released — in fact, back in the day, I used to compile KDE from source.  Being the grownup that I am today, I no longer have the time to indulge in days-long compilation — instant gratification is the name of the game for me nowadays.  Nevertheless, installing KDE betas has always been an interesting experience for me.</p>

<p>Evidently, I rejoiced when I discovered <a href="http://kubuntu.org/announcements/kde4-beta2.php">that Kubuntu is carrying the latest betas of KDE 4</a>.  After following the instructions on the aforementioned page, and installing the <code>kde4base-dev</code> package, I started to screencap and document the newest release.</p>

<p><em>There’s a new article called <a href="http://rudd-o.com/archives/2007/10/18/a-cursory-look-into-kde-4-file-management-dolphin-beta/" rel="bookmark" title="Permanent Link to A cursory look into KDE 4 file management: Dolphin beta">A cursory look into KDE 4 file management: Dolphin beta</a> to go along this article.  Make sure you check it out afterwards!</em></p>

<h2>First impressions</h2>

<p>I took home two distinct impressions:</p>

<ol>
<li>KDE 4 started up faster than KDE 3 on my system.</li>
<li>There’s <em>no</em> flicker.  KDE 3 applications used to flicker all the time.  KDE 4 apps don’t anymore.</li>
</ol>

<p>Long live Trolltech and Qt4 — I understand it’s in no small part responsible for these dramatic improvements.</p>

<p>For now, here are some key points to notice:</p>

<ul>
<li>It’s broken.  If you know your way around a computer, you might be able to take advantage of it (so-to-speak).</li>
<li>It’s gorgeous and interesting.</li>
<li>It’s not gonna eat your configuration, since it uses a separate configuration directory.  So it’s generally safe.</li>
<li>It’s a big download.  Dialup need not apply.</li>
</ul>

<h2>It’s all horribly broken right now</h2>

<p>That’s right.  KDE 4 starts up half-drunk and half-broken.  In my opinion, this beta is (judging from the developmental stage) not really a beta but rather closer to alpha quality.</p>

<p>I don’t mind.  KDE has always rocked, and even in its utter brokenness, it’s still awesome:</p>

<p style="text-align: center"> <a href="http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/kde-starting-up/" rel="attachment wp-att-1716" title="KDE starting up"><img src="http://rudd-o.com/wp-content/uploads/2007/10/02-kde-starting-up.thumbnail.jpg" alt="KDE starting up"/></a> <a href="http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/kde-started-up/" rel="attachment wp-att-1717" title="KDE started up"><img src="http://rudd-o.com/wp-content/uploads/2007/10/03-kde-started-up.thumbnail.jpg" alt="KDE started up"/></a> <a href="http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/klipper-sitting-forlorn-on-the-desktop/" rel="attachment wp-att-1718" title="Klipper sitting forlorn on the desktop"><img src="http://rudd-o.com/wp-content/uploads/2007/10/04-klipper-sitting-forlorn-in-the-desktop.thumbnail.jpg" alt="Klipper sitting forlorn on the desktop"/></a></p>

<p>These first screenshots show you how KDE starts up.  The picture of the devs in the splash screen is a nice touch!  And the desktop appears unusually clean.  That would be a good thing, except for the glaring absence of a menu with which to launch applications.  All my attempts to add one were futile.</p>

<h2>Plasma</h2>

<p>KDE abandons the “desktop-as-scratch-folder” metaphor.  It also abandons the notion of a panel separate from the desktop (Kicker’s dead.  Long live Kicker damnit!.).  Don’t be fooled — there <em>is</em> a panel as you can see in the screenshots.  It’s just that now any object you want to place on the desktop can also be placed on the panel, and viceversa.  This concept is called Plasma, and while it’s still rough on the edges, it’s a true revolution.</p>

<p>Let’s take a look at the desktop toolbox — where Plasma applets dwell before being added:</p>

<p style="text-align: center"> <a href="http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/desktop-toolbox/" rel="attachment wp-att-1719" title="Desktop toolbox"><img src="http://rudd-o.com/wp-content/uploads/2007/10/05-desktop-toolbox.thumbnail.jpg" alt="Desktop toolbox"/></a></p>

<p>After toying around with the toolbox, these are a few examples of what I got:</p>

<p style="text-align: center">&nbsp;</p>

<p><a href="http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/choosing-a-picture-for-the-picture-frame/" rel="attachment wp-att-1720" title="Choosing a picture for the picture frame"><img src="http://rudd-o.com/wp-content/uploads/2007/10/06-choosing-a-picture-for-the-picture-frame.thumbnail.jpg" alt="Choosing a picture for the picture frame"/></a></p>

<p><a href="http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/a-few-plasmoids-running-on-the-desktop/" rel="attachment wp-att-1721" title="A few plasmoids running on the desktop"><img src="http://rudd-o.com/wp-content/uploads/2007/10/07-a-few-plasmoids-running-on-the-desktop.thumbnail.jpg" alt="A few plasmoids running on the desktop"/></a></p>

<p><a href="http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/the-plasmoid-chooser/" rel="attachment wp-att-1722" title="The plasmoid chooser"><img src="http://rudd-o.com/wp-content/uploads/2007/10/08-the-plasmoid-chooser.thumbnail.jpg" alt="The plasmoid chooser"/></a></p>

<p>Interesting, huh?  The picture frame looks awesome both in concept and in real life.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/10/16/a-visual-stroll-through-the-world-of-kde-4-beta-394/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Memo from Freesoftwareburg: How to effectively address the free software community</title>
		<link>http://rudd-o.com/archives/2007/10/08/memo-from-freesoftwareburg-how-to-effectively-address-the-free-software-community/</link>
		<comments>http://rudd-o.com/archives/2007/10/08/memo-from-freesoftwareburg-how-to-effectively-address-the-free-software-community/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 23:56:56 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/10/08/memo-from-freesoftwareburg-how-to-effectively-address-the-free-software-community/</guid>
		<description><![CDATA[Winds of change are sweeping through the software industry.  Today, it’s no longer fashionable to decry free software types as it was just a few years ago — the cool kids are all “leveraging” and reaching out to free software communities.  But not everyone’s doing it right, so let’s explore seven principles to [...]]]></description>
			<content:encoded><![CDATA[<p>Winds of change are sweeping through the software industry.  Today, it’s no longer fashionable to decry free software types as it was just a few years ago — the cool kids are all “leveraging” and reaching out to free software communities.  But not everyone’s doing it right, so let’s explore seven principles to start a positive relationship with free software.</p>

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

<p><em>This is a work in progress. I expect and will take your contribution into consideration — use the <a href="#respond">comment form</a> below to voice your doubts, tips or flames.</em></p>

<p>With so many companies finally realizing the potential of free software and open source, it’s not surprising at all that some are failing miserably to engage free software communities effectively.  Instead of focusing on what they’re doing wrong, let’s focus instead on what they must get right.</p>

<p>With that intent in mind, let’s explore seven principles that will make your life easier when engaging free software types.  In summary:</p>

<ol>
<li>Know your audience</li>
<li>Your argument must rely on facts and reason</li>
<li>Respect community members’ time, rules and terms</li>
<li>Develop a thick skin</li>
<li>Contribute</li>
<li>Be humble</li>
<li>Make it interesting, make it fun</li>
</ol>

<p>Here’s each principle explained.</p>

<h2>Know your audience</h2>

<p>We’re not all the same.  Before even attempting to address us, do your research and figure out the “rules” of the particular community you’re trying to touch base with.</p>

<p>Despite the title of this article, there is most definitely no single “free software community” to address in the first place.  It’s all a multitude of communities centered around their own projects, and collaborating between each other in a loosely coupled fashion.</p>

<p>You see, the closest thing we get to have in common is the common core value of <em>sharing = good</em> — and even so, many in our own collective of communities do not necessarily place that value up high in their own scale of values (witness Linus Torvalds, for example).  You could possibly argue we all share a passion for technology — which might be true — but we all most definitely do not share even technical proficiency; modern free software communities are chock-full of people doing translation, usability and multimedia artwork.</p>

<p>Some communities are led by consensus.  Others, by meritocracy.  Some have benevolent dictators.  Many projects out there have no defined leadership and are in a stage of transition.</p>

<p>Corollary: do not assume.  Do your homework.</p>

<p>Fortunately, this homework is easy:</p>

<ul>
<li>You can easily poke around a project’s Web site, skim over technical documents, and invest a couple of minutes reading mailing list archives, to get a general idea of how that particular community beats its drum.</li>
<li>You can also look stuff up (Google is very free software-friendly).</li>
<li>Try to familiarize yourself with the issues (esp. technical details).  That goes double if you’re a reporter — there are reams of inaccurate stories out there, just because the reporter was lazy enough not to “go to the source”.</li>
<li>Some communities (the most mature ones, usually) even list guidelines for contributors and explicit rules of engagement.</li>
</ul>

<p>Therefore, be informed.  An ounce of prevention beats a hundred pounds of hammering.</p>

<h2>Your argument must rely on facts and reason</h2>

<p>In general, free software communities place extremely high value on the ability to argue and persuade using facts and reason.</p>

<p>The reason this is so pervasive in free software is quite clear: every single last drop of development and communication happens absolutely in the open — usually with easily accessible public records.  Think about it: past discussions, decisions and the reasons behind each and every one of them are archived somewhere and usually accessible by poking around search engines with the right keywords.</p>

<p>Another reason (I love to call it the “doers factor”) is that, since new ideas can be tested quickly and pitted against each other.  Do you think Project X will fare better with wings rather than legs?  Prove it!  In fact, cloudy proposals usually meet head-on with that sentence in our public discussion forums.</p>

<p>As you can see, “conventional politics” stand little chance against the gospel of “try it and support it” (though they infrequently win some points).</p>

<p>So don’t attempt to convince a community of developers by using slick persuasion.  You will be called on it and asked to provide facts backing your points of view.  You might also get reprimanded by project leaders because you weren’t diligent enough to “check the archives”.  In the worst case, you will be shunned for long.</p>

<h2>Respect community members’ time, rules and terms</h2>

<p>You need to understand that many people involved with the free software movement are volunteers.  Though a large subset of those people will be happy to help you fix any issue you may have, efficiency is key.</p>

<p>That’s why we:</p>

<ul>
<li>use mailing lists with public archives,</li>
<li>use bug tracking systems,</li>
<li>idle a lot on Internet relay chat channels,</li>
<li>respond sparsely and oftentimes with the dreaded <acronym title="Read The Fucking Manual">RTFM</acronym> acronym.</li>
</ul>

<p>If you find a bug, please don’t just mumble to yourself — report it through the appropriate channel.  Doing so, while requiring a bit of an extra effort on your part, multiplies the effect your report has, because it benefits everyone — not just you.</p>

<p>If you have an idea that you think it may be worthwhile to pursue within the scope of a community, bring it to the table.  Try to address everyone in the conversation, not just particular project authors.  That way everyone gets an opportunity to shape the idea or to strike it down (in case it’s a bad one).</p>

<p>Same goes if you need help.  Especially in this case, you should try to consult with the Lazyweb — mailing lists and search engines should be your first stop.  Chances are, someone else already asked and got a publicly available reply.</p>

<h2>Develop a thick skin</h2>

<p>If you make a mistake, most free software types will call you on it.</p>

<p>Some of us are callous individuals.  Sometimes, everyone is distressed or tired.  We all are guilty of calling people names at some point.  Don’t get discouraged by these events.  We might call you an idiot today — that doesn’t mean you’re really an idiot, and sometimes we don’t even mean it!</p>

<p>Some communities appreciate sparseness in discourse.  This might be construied by some people to be the equivalent of “go away, outsider; we don’t need you here”.  Nothing could be further from the truth — most free software aficionados are efficiency buffs, and talk is expensive.  Imagine yourself dealing with hundreds or thousands of e-mails daily in addition to coding or management tasks, and you’ll have a clear idea of what managing a free software project is like.  Efficiency is key.</p>

<p>Source code and conversations may contain tons of expletives.  I read years ago a report on profanity in the Linux kernel.  It’s not pretty if you’re into political correctness but, come to think about it, doesn’t it work just fine that way?  Then who cares about the cuss thrown around sparsely?</p>

<p>So try to develop thick skin.  Become immune to callous comments, and keep pressing important issues calmly.</p>

<p>And comfort yourself with the fact that, in the medum-to-long run, projects with truly contentious members drown anyway.</p>

<h2>Contribute</h2>

<p>The whole notion of free software is based on <em>quid pro quo</em>.</p>

<p>We give you something for you to take advantage in any way you please.  We expect you to share in equal terms with you.  And your contribution has value.  We need you.  Here are some clever ways you can contribute in effectively:</p>

<ul>
<li>We hate bugs, so please report them.  Try to provide as much info as you humanly can within time constraints.  Try to keep yourself “in the loop” during the process.</li>
<li>Maintain Web sites and blogs.</li>
<li>Help with project marketing.</li>
<li>Write manuals, guides or tips on public sites.</li>
<li>Deploy a project across the board — then report your issues so everyone benefits.</li>
<li>Publish improvements to free software projects.</li>
<li>Develop new code.</li>
<li>Allocate manpower on collaboration with non-engineering tasks: artwork, translations.</li>
<li>Fund or donate to projects.  A million dollars is fine, but $10 may do it as well.</li>
</ul>

<p>If you do any of these things (OK, OK, I’ll recognize, some of them are more valuable to us than others), your message is way more likely to come across.  Bonus points (yay!) for directly helping the project build its next “killer feature”.</p>

<p>Fact is, if you have something to show, you’ll generate an incredible amount of goodwill towards you.</p>

<h2>Be humble</h2>

<p>I’ve heard all manner of derogatory comments against us free software developers, from the classic “pinko” to the Cold war-era “hippie”, through the equally ignorant “amateur”.</p>

<p>We’re not amateurs, so get rid of those misconceptions.  Each and every one of us is highly likely to be much more proficient and professional in our field of expertise than you.  We’ve made a career out of seeding high-quality products and harvesting respect and reputation out of it.  Technical prowess is the name of the game for us.</p>

<p>In each field of technical expertise, there probably are a handful of gurus in the closed software industry — and probably an even smaller group of free software developers which are in all likelihood as proficient or even more so than their counterparts doing closed source.  This should be self-evident, since free software developers have had access to much more code and learned much more from collective experience resources while having fun at it, whereas the rest probably did it for the money only.  You might be recognized by anywhere between ten and a hundred punks in your company, but we’re recognized, revered and relied as sources of opinion and technical expertise for considerably many more people — some of us count their fans and users in the tens of millions.</p>

<p>Each and every one of us has made a name for ourselves.  Can you say the same of you?  Even if you could, can you co-opt your reputation and technical expertise for the community you’re about to address?</p>

<p>So coming with an attitude of superiority (whatever your reason for that attitude) isn’t going to help your cause.</p>

<p>Be humble, punk.</p>

<p>But don’t get the idea that we’re arrogant just yet.  99% of us are eager to share a few beers with anyone else in equal terms.  The other 1% usually die young from lack of human warmth (and alcohol?).</p>

<h2>Make it interesting, make it fun</h2>

<p>Free software types, believe it or not, are much more play than work.  We are honestly entertained by what we do, and when we no longer have fun, we usually delegate our project to someone else with a more pressing need or a newfound passion for our project.</p>

<p>In a sense, we are probably the luckiest people in the world.  People who actually enjoy what they do from the outset (as opposed to people who secretly want to hang their boss, or people who have had to learn to like what they do by sheer necessity) are far and few between.  And some of us even get paid doing it.  I know I do.</p>

<p>Moral: If you can wrap your message around fun and challenge, you’ll benefit.</p>

<h2>Conclusion</h2>

<p>Let’s recap, one more time:</p>

<ol>
<li>Know your audience</li>
<li>Your argument must rely on facts and reason</li>
<li>Respect community members’ time, rules and terms</li>
<li>Develop a thick skin</li>
<li>Contribute</li>
<li>Be humble</li>
<li>Make it interesting, make it fun</li>
</ol>

<p>These principles might sound like common sense, mixed with a few unexpected nuggets of unique free software idiosyncrasies.  Even so, every day people fail to heed this advice — hey, I’m guilty of it myself!  But it’s never too late to bump the steering wheel and change course.</p>

<p>I hope this article enriches your future experiences with the free software community as much as writing it has enriched me.  I wish you the best of luck, and welcome to the free software world!</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/10/08/memo-from-freesoftwareburg-how-to-effectively-address-the-free-software-community/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Speeding Amarok up</title>
		<link>http://rudd-o.com/archives/2007/10/05/speeding-amarok-up/</link>
		<comments>http://rudd-o.com/archives/2007/10/05/speeding-amarok-up/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 15:25:47 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Amarok]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Hacks]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/10/05/speeding-amarok-up/</guid>
		<description><![CDATA[Amarok’s collection is a godsend.  The collection scanner isn’t.  It kills my carefully primed cache with lots of memory pages full of MP3 data.  20.000 MP3s will do that to you (not my actual song count).  Therefore, I propose the following patch:



The patch

The patch is against TagLib svn, the library in [...]]]></description>
			<content:encoded><![CDATA[<p>Amarok&#8217;s collection is a godsend.  The collection scanner isn&#8217;t.  It kills my carefully primed cache with lots of memory pages full of MP3 data.  20.000 MP3s will do that to you (not my actual song count).  Therefore, I propose the following patch:</p>

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

<h2>The patch</h2>

<p>The patch is against TagLib <code>svn</code>, the library in charge of reading the MP3 tags and feeding them to Amarok:</p>

<h1><pre style="clear:both">Index: toolkit/tfile.cpp</pre></h1>

<p>--- toolkit/tfile.cpp   (revisión: 721576)
+++ toolkit/tfile.cpp   (copia de trabajo)
@@ -30,7 +30,11 @@
 # include &lt;io.h&gt;
 # define ftruncate _chsize
 #else
+ /* Rudd-O: for fadvise <em>/
+ /</em> I have NO idea how to make this conditional on compile time.  Ideas? */
+ #define _XOPEN_SOURCE 600
  #include &lt;unistd.h&gt;
+ #include &lt;fcntl.h&gt;
 #endif
 #include &lt;stdlib.h&gt;</p>

<p>@@ -41,6 +45,7 @@
 # define W_OK 2
 #endif</p>

<p>+
 using namespace TagLib;</p>

<p>class File::FilePrivate
@@ -73,6 +78,7 @@</p>

<p>File::File(const char *file)
 {
+  int fadvise_retvalue = 0;
   d = new FilePrivate(::strdup(file));</p>

<p>// First try with read/write mode, if that fails, fall back to read only.
@@ -87,12 +93,26 @@</p>

<p>if(!d-&gt;file)
     debug("Could not open file " + String(file));
+
+  /* Rudd-O: we don't want the kernel to cache this file descriptor or perform any readahead -- but only if no one else opens the file.  see posix_fadvise(2) <em>/
+  /</em> FIXME I have NO idea how to make this conditional on compile time.  Ideas? */
+  if(d-&gt;file) {
+    fadvise_retvalue = posix_fadvise(fileno(d-&gt;file),0,0,POSIX_FADV_RANDOM);
+    if (fadvise_retvalue != 0)
+      debug("Could not tell the kernel to not cache the file " + String(file));
+  }
 }</p>

<p>File::~File()
 {
-  if(d-&gt;file)
+  int fadvise_retvalue = 0;
+  if(d-&gt;file) {
+    /* Rudd-O: FIXME Also needs to be conditional to the availability of posix_fadvise */
+    fadvise_retvalue = posix_fadvise(fileno(d-&gt;file),0,0,POSIX_FADV_DONTNEED);
+    if (fadvise_retvalue != 0)
+      debug("Could not tell the kernel to evict from cache the file " + String(file));
     fclose(d-&gt;file);
+  }
   delete d;
 }</p>

<p></p>

<h2>The theory</h2>

<p><code>posix_fadvise()</code>, in theory, on POSIX systems (Linux included) lets you tell the system how to behave with regard to a certain file.  In particular, this patch tells Linux that the MP3 will be accessed randomly.</p>

<p>Linux 2.6 obeys it by simply not performing readahead.  In effect, the patch says &#8220;you shouldn&#8217;t perform readahead whlie reading the tags on the MP3s&#8221;.</p>

<p>When the file is closed, the patch also uses the <code>POSIX_FADV_DONTNEED</code> hint, to make Linux evict any memory used by the recently read file from the page cache (but only if no other process/thread has the file open, so it should be safe).</p>

<h3>Why this should work</h3>

<p>TagLib figures out the tags by reading two key parts of the MP3 file: the very end for ID3v1 (a couple hundred bytes), and the very beginning for ID3v2 (up to 64 K, but usually considerably less).</p>

<p>What TagLib does is:</p>

<ol>
<li>Open the file</li>
<li>Read the data (a total of anywhere between 16K and 64K)</li>
<li>Close the file</li>
</ol>

<p>But the Linux kernel does a few magic performance tricks behind the scenes, which actually cause the following to happen:</p>

<ol>
<li>Open the file</li>
<li>Read the data &#8212; with block device and filesystem readahead, so maybe up to 512K will be read</li>
<li>Put the data in the block memory cache</li>
<li>Close the file</li>
<li>Hold on to the data in the cache for as long as possible, maybe paging out some pages from the current working set</li>
</ol>

<p>Now, under regular conditions, these performance tricks actually work.  But in the context of a collection scan, it&#8217;s brain damaged &#8212; does your computer really need to extra data from thousands of files, and then keep that data in memory?</p>

<p>Since there is no need for readahead (at most eight or nine 8K blocks will be needed, and the read operation is explicit about that), we disable that.  This should considerably reduce the I/O demands.</p>

<p>Since there is no need for caching the contents (what are the odds that you want to play a specific file in 15.000, seconds after it&#8217;s been scanned?) we save memory by telling Linux not to cache the contents of the files.  This should relieve memory pressure considerably, and preserve other things in memory (think application icons or code).</p>

<p>This patch should make scans faster and make your computer more usable while your music is being scanned or when Amarok is starting up, but&#8230;</p>

<p><span style="font-size:xx-large">I need benchmarks!</span></p>

<p>Who volunteers?  I&#8217;ll post them here!</p>

<p><ins datetime="2007-10-08T12:59:17+00:00">Update: here&#8217;s <a href="https://bugs.kde.org/show_bug.cgi?id=150508">the corresponding bug report</a> in the KDE bug tracking system.</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/10/05/speeding-amarok-up/feed/</wfw:commentRss>
		</item>
		<item>
		<title>You gotta love free software, Linux, and the Internet&#8230;</title>
		<link>http://rudd-o.com/archives/2007/09/16/you-gotta-love-free-software-linux-and-the-internet/</link>
		<comments>http://rudd-o.com/archives/2007/09/16/you-gotta-love-free-software-linux-and-the-internet/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 22:18:17 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Cool]]></category>

		<category><![CDATA[Free software]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/09/16/you-gotta-love-free-software-linux-and-the-internet/</guid>
		<description><![CDATA[…when something like the following is made possible by the synergy in the aforementioned lovables:




a simple and curious idea published as a dear Lazyweb question,
turns into a script,
gets topped by the original poster, and
spawns a new spin on the same idea in a totally separate site.


Thanks, Marnanel, for the mention in your script (and it [...]]]></description>
			<content:encoded><![CDATA[<p>…when something like the following is made possible by the synergy in the aforementioned lovables:</p>

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

<ul>
<li>a <a href="http://mces.blogspot.com/2007/09/linux-shell-puzzle.html">simple and curious idea published as a dear Lazyweb question</a>,</li>
<li>turns <a href="http://rudd-o.com/archives/2007/09/06/the-shell-challenge-changing-another-process-working-directory/" title="The shell challenge: changing another process&amp;#8217; working directory">into a script</a>,</li>
<li><a href="http://mces.blogspot.com/2007/09/linux-shell-puzzle.html#8297028358192020377">gets topped by the original poster</a>, and</li>
<li><a href="http://marnanel.livejournal.com/1026964.html">spawns a new spin on the same idea</a> in a totally separate site.</li>
</ul>

<p>Thanks, Marnanel, for the mention in your script (and it will be extremely useful for me as well).  And thanks, Behdad, for the great idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/09/16/you-gotta-love-free-software-linux-and-the-internet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ISO voted no on OOXML.  But the battle isn&#8217;t over.</title>
		<link>http://rudd-o.com/archives/2007/09/05/iso-voted-no-on-ooxml-but-the-battle-isnt-over/</link>
		<comments>http://rudd-o.com/archives/2007/09/05/iso-voted-no-on-ooxml-but-the-battle-isnt-over/#comments</comments>
		<pubDate>Wed, 05 Sep 2007 18:20:04 +0000</pubDate>
		<dc:creator>Rudd-O</dc:creator>
		
		<category><![CDATA[Corruption]]></category>

		<category><![CDATA[Free software]]></category>

		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://rudd-o.com/archives/2007/09/05/iso-voted-no-on-ooxml-but-the-battle-isnt-over/</guid>
		<description><![CDATA[I’m extremely happy with the turnout.  I’m more than joyous since my country’s standards organization (INEN) voted no as well.  But this battle is just beginning now:



Do you remember how most no-voters voted, right?  They voted “no, with comments”.  This means that Microsoft gets a chance to address the comment, and [...]]]></description>
			<content:encoded><![CDATA[<p>I’m extremely happy with the turnout.  I’m more than joyous since my country’s standards organization (INEN) voted no as well.  But this battle is just beginning now:</p>

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

<p>Do you remember how most <em>no</em>-voters voted, right?  They voted “no, with comments”.  This means that Microsoft gets a chance to address the comment, and a vote will take place in the future.  Probably about a year from now.</p>

<p>So there will be another vote to see if OOXML (perhaps with a few modifications) is approved.  Which is kind of dumb, since the world already has ODF.</p>

<p>And we’re running out of arguments to stop OOXML… because we have already discovered just about every single technical counterargument to OOXML.  Now, you may say “but, so what?  That should be enough” — and yet you couldn’t be further from the truth:</p>

<p style="text-align:center"><img src="http://rudd-o.com/wp-content/uploads/2007/09/isomeeting.jpg" alt="How OOXML was almost lost"/></p>

<p>So it’s time to start supervising and attacking the process, and making noise every time Microsoft gains a seat on the OOXML vote table (metaphorically speaking, of course).  I know that at least in Ecuador there is a powerful lobby of companies sworn to Microsoft that will try to tilt the balance in favor of the yes, despite all technical absurdities in OOXML.</p>

<p>So, the take-away message from this article is this: <a href="http://krillz.com/microsoft-accused-of-rigging-the-ooxml-vote/">Microsoft will have no qualms rigging future votes</a>.  Thus, be vigilant.</p>

<p>Damn I’m infuriated by this.  Technical decisions should be based on merit, not on depth of pocket.  But now it’s not time to get mad — <em>it’s time to get even</em>.</p>

<p>The <a href="http://www.kdedevelopers.org/node/2958">image was stolen from this place</a>.  Great cartoon!</p>
]]></content:encoded>
			<wfw:commentRss>http://rudd-o.com/archives/2007/09/05/iso-voted-no-on-ooxml-but-the-battle-isnt-over/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
