<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>darkness</title>
	<atom:link href="http://darkness.codefu.org/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://darkness.codefu.org/wordpress</link>
	<description></description>
	<lastBuildDate>Thu, 20 Oct 2011 21:23:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title></title>
		<link>http://darkness.codefu.org/wordpress/2010/10/436/</link>
		<comments>http://darkness.codefu.org/wordpress/2010/10/436/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 23:06:44 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[essential mix]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/2010/10/436/</guid>
		<description><![CDATA[More I like from 2009: Sub Focus, Paul Ritch.]]></description>
			<content:encoded><![CDATA[<p>More I like from 2009: Sub Focus, Paul Ritch.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2010/10/436/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://darkness.codefu.org/wordpress/2010/10/430/</link>
		<comments>http://darkness.codefu.org/wordpress/2010/10/430/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 21:54:08 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/?p=430</guid>
		<description><![CDATA[I&#8217;m listening to all of the BBC Radio 1 Essential Mixes from 2009. So far Showtek/Kidd Kaos and Fake Blood are my favorites.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m listening to all of the BBC Radio 1 Essential Mixes from 2009.  So
far Showtek/Kidd Kaos and Fake Blood are my favorites.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2010/10/430/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://darkness.codefu.org/wordpress/2010/10/429/</link>
		<comments>http://darkness.codefu.org/wordpress/2010/10/429/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 21:35:56 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[openbsd]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/2010/10/429/</guid>
		<description><![CDATA[So&#8230; OpenBSD&#8217;s ftp client does HTTP as well? Surprising, but at least that explains how I&#8217;m expected to fetch files from web servers without installing e.g. curl or wget.]]></description>
			<content:encoded><![CDATA[<p>So&#8230; OpenBSD&#8217;s
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ftp&amp;apropos=0&amp;sektion=1&amp;manpath=OpenBSD+Current&amp;arch=i386&amp;format=html"><code>ftp</code></a>
client does HTTP as well?  Surprising, but at least that explains how
I&#8217;m expected to fetch files from web servers without installing
e.g. curl or wget.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2010/10/429/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://darkness.codefu.org/wordpress/2010/10/426/</link>
		<comments>http://darkness.codefu.org/wordpress/2010/10/426/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 21:08:29 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[pf]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/2010/10/426/</guid>
		<description><![CDATA[I have to say that it seems pretty weird that OpenBSD&#8217;s ftp-proxy doesn&#8217;t have a solution for FTP connections that originate from the OpenBSD box itself.[1][2][3] I&#8217;m really expected to just open a bunch of high ports? iptables handles this better.]]></description>
			<content:encoded><![CDATA[<p>I have to say that it seems pretty weird that OpenBSD&#8217;s
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ftp-proxy&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=i386&amp;format=html"><code>ftp-proxy</code></a>
doesn&#8217;t have a solution for FTP connections that originate from the
OpenBSD box
itself.<a href="http://thread.gmane.org/gmane.os.openbsd.misc/170952/focus=170975">[1]</a><a href="http://www.daemonforums.org/showthread.php?t=2122">[2]</a><a href="http://www.daemonforums.org/showthread.php?t=166">[3]</a>
I&#8217;m really expected to just open a bunch of high ports? iptables
handles this better.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2010/10/426/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://darkness.codefu.org/wordpress/2010/10/352/</link>
		<comments>http://darkness.codefu.org/wordpress/2010/10/352/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 05:19:49 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/?p=352</guid>
		<description><![CDATA[I just figured out that Ruby&#8217;s &#8220;Core API&#8221; is different from its &#8220;Standard Library.&#8221; Or at least I think that&#8217;s the case, since I looked at the documentation for Time in the &#8220;Standard Library&#8221; and found it referring to extending the &#8220;time&#8221; module&#8230; elsewhere. Good thing that&#8217;s not confusing.]]></description>
			<content:encoded><![CDATA[<p>I just figured out that Ruby&#8217;s <a href="http://www.ruby-doc.org/ruby-1.9/index.html">&#8220;Core API&#8221;</a> is different from its <a href="http://www.ruby-doc.org/stdlib/">&#8220;Standard Library.&#8221;</a>  Or at least I think that&#8217;s the case, since I looked at the documentation for <code>Time</code> in the &#8220;Standard Library&#8221; and found it referring to extending the &#8220;time&#8221; module&#8230; elsewhere.</p>

<p>Good thing that&#8217;s not confusing.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2010/10/352/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Burning AVIs to DVDs under Linux</title>
		<link>http://darkness.codefu.org/wordpress/2009/12/burning-avis-to-dvds-under-linux/</link>
		<comments>http://darkness.codefu.org/wordpress/2009/12/burning-avis-to-dvds-under-linux/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 07:07:53 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[dvdauthor]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mpeg]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/?p=334</guid>
		<description><![CDATA[Converting AVIs to DVD-compatible MPEGsffmpeg -i foo.avi -target ntsc-dvd foo.mpg I love ffmpeg, by the way.Two-pass encodingffmpeg -i foo.avi -pass 1 -target ntsc-dvd -an /dev/null ffmpeg -i foo.avi -pass 2 -target ntsc-dvd foo.mpg -pass 1 writes out a &#8220;log file.&#8221; Two-pass encoding only applies for video, so you -an to ignore audio on the first [...]]]></description>
			<content:encoded><![CDATA[<h3 id="converting-avis-to-dvd-compatible-mpegs">Converting AVIs to DVD-compatible MPEGs</h3><pre><code>ffmpeg -i foo.avi -target ntsc-dvd foo.mpg
</code></pre><p>I love ffmpeg, by the way.</p><h4 id="two-pass-encoding">Two-pass encoding</h4><pre><code>ffmpeg -i foo.avi -pass 1 -target ntsc-dvd -an /dev/null
ffmpeg -i foo.avi -pass 2 -target ntsc-dvd foo.mpg
</code></pre><p><code>-pass 1</code> writes out a &#8220;log file.&#8221; Two-pass encoding only applies for video, so you <code>-an</code> to ignore audio on the first pass. <code>-pass 2</code> then reads the log file that <code>-pass 1</code> created for it.</p><h4 id="multi-threading">Multi-threading</h4><p><code>-threads 2</code>. That was easy.</p><h4 id="aspect-ratio">Aspect ratio</h4><p>If your movie is in 4:3 or 16:9 (the only two aspect ratios that seem to be common&#8212;if not the only two allowed&#8212;for [NTSC?] DVD video) then ffmpeg seems to pick up the aspect ratio right. Sometimes you do need to hint it with <code>-aspect 4:3</code> or <code>-aspect 16:9</code> though? Play around. If the resulting MPEG file doesn&#8217;t look right in your media player, it probably won&#8217;t look right on your screen.</p><p>You can pass other aspect ratios to ffmpeg, like <code>-aspect 2.33:1</code>, but don&#8217;t expect anything to like putting that on a DVD, and don&#8217;t expect your (my) old Sony player to play it at all.</p><p>Now say you have a movie in 2.35:1, a 1280&#215;544 image. I was hoping ffmpeg would do &#8220;magic&#8221; to turn it into letterbox anamorphic widescreen. It did not. Instead, I had to do it by hand.</p><p>NTSC (this is all NTSC by the way) DVD video is 720&#215;480. Anamorphic PAR is 32:27, so using square pixels 16:9 video with 480 lines would be 854&#215;480. (That&#8217;s actually a lie: it&#8217;s closer to 853&#215;480; but 854 seems to be the accepted number.)</p><p>Now imagine fitting your 1280&#215;544 image into an 854&#215;480 box. Since 2.35:1 is wider than 16:9 (1.77:1) we&#8217;ll have to pad the top and bottom. How much? 544 * 854 / 1280 = 362.95, so lets say we&#8217;re aiming for a height of 363 pixels.</p><p>480 &#8211; 363 = 117 pixels of padding needed, that&#8217;s 58.5 lines of black bars each for the top and the bottom of the image. Of course, you can&#8217;t have a fractional line (pixel). What&#8217;s more, ffmpeg requires padding to be a multiple of two, so we&#8217;re going to say 480 &#8211; 362 = 118, 118 / 2 = 59, so we&#8217;ll put 58 lines of padding on the top and 60 lines of padding on the bottom.</p><p>This leaves us with the following command line:</p><pre><code>ffmpeg -i foo.avi -target ntsc-dvd -s 720x362 -padtop 58 -padbottom 60 -aspect 16:9 foo.mpg
</code></pre><p><code>-s 720x362</code> says to make the input movie that size. Then the <code>-padtop</code> and <code>-padbottom</code> are added to that size: 362 + 58 + 60 = 480 (720&#215;480).</p><p>If you&#8217;re curious how we got back to 720 from 854, remember that NTSC DVD video is always going to be 720&#215;480; the DVD player stretches the picture to 854&#215;480 for you. So while 720&#215;362 screws up our aspect ratio, anamorphic widescreen will stretch it back out to make it right.</p><p>(There is an additional restriction on the size of the video, but I don&#8217;t recall what it is; when you run into this ffmpeg will tell you, and you&#8217;ll have to slightly shrink/expand the video and adjust padding accordingly.)</p><h3 id="dvd-authoring">DVD authoring</h3><pre><code>mkdir dvd
dvdauthor --title -f foo.mpg -o dvd
dvdauthor -T -o dvd
</code></pre><h4 id="automatically-making-chapters">Automatically making chapters</h4><p>I used <a href="http://tovid.wikia.com/wiki/Makexml"><code>makexml</code></a> for this. Should be something like:</p><pre><code>makexml -chapters 5 foo.mpg -out foo  # creates foo.xml
dvdauthor -x foo.xml -o dvd
# I don't remember if this last step is necessary when using an XML
# file, actually:
dvdauthor -T -o dvd
</code></pre><p>This makes chapters every five minutes in the movie. When you see the format of the XML file you&#8217;ll actually be embarrassed; I think you could write a shell script to do this very easily (faster and with fewer dependencies than <code>makexml</code>).</p><h3 id="making-an-iso">Making an ISO</h3><p>Linux:</p><pre><code>mkisofs -dvd-video -o dvd.iso dvd
</code></pre><p>(Is <code>mkisofs</code> now deprecated? I think it calls some other program on my machine.)</p><p>OS X:</p><pre><code>hdiutil makehybrid -udf -udf-volume-name &lt;label&gt; -o dvd.iso dvd
</code></pre><p>I think the <code>-dvd-video</code> switch might toggle something a little special in the ISO, but I don&#8217;t have any concrete information on that. If I&#8217;m right, though, I&#8217;m betting the OS X version doesn&#8217;t toggle that magic bit. So if you have problems with the <code>hdiutil</code>-generated ISO, try making the ISO with <code>mkisofs</code> instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2009/12/burning-avis-to-dvds-under-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset your keyboard in X</title>
		<link>http://darkness.codefu.org/wordpress/2009/01/reset-your-keyboard-in-x/</link>
		<comments>http://darkness.codefu.org/wordpress/2009/01/reset-your-keyboard-in-x/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 04:04:07 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[X]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/2009/01/27/333</guid>
		<description><![CDATA[I was using VMware and my keyboard went to Horkytown. My recipe for resetting the keyboard (at least on Fedora 10): egrep -i 'rules&#124;layout&#124;model' /var/log/Xorg.0.log to find out your rules, layout, and model for your keyboard. setxkbmap -rules xorg -layout us -model pc105 substituting the values from step 1 where appropriate. If you have to [...]]]></description>
			<content:encoded><![CDATA[<p>I was using VMware and my keyboard went to Horkytown. My recipe for resetting the keyboard (at least on Fedora 10):</p><ol style="list-style-type: decimal;">
<li>
<code>egrep -i 'rules|layout|model' /var/log/Xorg.0.log</code> to find out your rules, layout, and model for your keyboard.</li>
<li>
<code>setxkbmap -rules xorg -layout us -model pc105</code> substituting the values from step 1 where appropriate.</li>
</ol><p>If you have to SSH in and do this, like I did, prepend <code>DISPLAY=:0</code> to <code>setkbmap</code> of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2009/01/reset-your-keyboard-in-x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Where&#8217;s the packaging calculator?</title>
		<link>http://darkness.codefu.org/wordpress/2009/01/wheres-the-packaging-calculator/</link>
		<comments>http://darkness.codefu.org/wordpress/2009/01/wheres-the-packaging-calculator/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 18:43:28 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ebay]]></category>
		<category><![CDATA[moving]]></category>
		<category><![CDATA[packing]]></category>
		<category><![CDATA[shipping]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/2009/01/19/332</guid>
		<description><![CDATA[So we&#8217;re moving, and I&#8217;m selling a bunch of stuff on (e.g.) eBay. There are plenty of shipping calculators&#8212;eBay has some of their own. But where the fuck is the packaging calculator? I had to call my local UPS store to find out how much it costs to have them pack things like a turntable [...]]]></description>
			<content:encoded><![CDATA[<p>So we&#8217;re moving, and I&#8217;m selling a bunch of stuff on (e.g.) eBay. There are plenty of <em>shipping</em> calculators&#8212;eBay has some of their own. But where the fuck is the packaging calculator? I had to call my local UPS store to find out how much it costs to have them pack things like a turntable or a cordless phone. Totally dumb.</p><p>By the way, a lot of the estimates I&#8217;m seeing online for packing are far too low, it seems to me. I see people talking about $1, $5, etc. for packing; UPS store says my turntable will cost at least $13-$15 for packing. $8 for the phone, they estimate.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2009/01/wheres-the-packaging-calculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Charge rate for NiMH batteries</title>
		<link>http://darkness.codefu.org/wordpress/2008/12/charge-rate-for-nimh-batteries/</link>
		<comments>http://darkness.codefu.org/wordpress/2008/12/charge-rate-for-nimh-batteries/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 23:14:04 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[battery]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/?p=330</guid>
		<description><![CDATA[I got a Maha MH-C9000 WizardOne battery charger for Christmas. This charger lets you charge/discharge rates appropriate to your batteries (and your needs, such as how fast you need the batteries). However, the documentation isn&#8217;t really clear about just what rates I should use for, say, it&#8217;s &#8220;Refresh and Analyze&#8221; mode; so I went looking. [...]]]></description>
			<content:encoded><![CDATA[<p>I got a <a href="http://www.mahaenergy.com/store/viewitem.asp?idproduct=423">Maha MH-C9000 WizardOne battery charger</a> for Christmas. This charger lets you charge/discharge rates appropriate to your batteries (and your needs, such as how fast you need the batteries). However, the documentation isn&#8217;t really clear about just what rates I should use for, say, it&#8217;s &#8220;Refresh and Analyze&#8221; mode; so I went looking.</p><ul>
<li>The charger&#8217;s &#8220;manual&#8221; says 0.3C to 1C.</li>
<li>
<a href="http://servaas.com.au/blog/index.php/mh-c9000-wizardone-faq/">Servaas Products says 0.5C charge, 0.25C discharge</a>, although I have no idea how reputable they are.</li>
<li>
<a href="http://www.powerstream.com/NiMH.htm">PowerStream kind of says 1C</a>, at least in a &#8220;smart charger&#8221; like this one that (I think&#8230;) senses temperature as well as voltage drop. (But maybe I&#8217;m giving this Maha charger too much credit? Will have to look back at the docs.)</li>
<li>
<a href="http://www.panasonic.com/industrial/battery/oem/images/pdf/Panasonic_NiMH_ChargeMethods.pdf">Panasonic says 0.5C to 1C</a> (<strong>PDF</strong>). I actually like this document: specifies charging behavior from start to finish, and it agrees with other things I found.</li>
<li>
<a href="http://www.duracell.com/oem/rechargeable/Nickel/methods.asp">Duracell says 1C, or 0.5C to 1C</a>. Starting to see a trend here. Duracell seems to primarily recommend 1C rate, watching temperature, but at the bottom they also list other methods, including less than 1C charge rate with basically the same termination conditions.</li>
<li>
<a href="http://www.batteryuniversity.com/partone-11.htm">Isidor Buchmann says 1C</a> more or less. &#8220;Nickel-based batteries prefer fast-charge.&#8221;</li>
</ul><p>I started thinking I would charge at 0.5C, but now I&#8217;m thinking 1C.</p><p>What about discharge rates?</p><ul>
<li>The charger&#8217;s manual says not to discharge above 1C. The charger&#8217;s &#8220;break-in&#8221; mode does discharge at 0.2C, and it seems to indicate that this is an IEC standard.</li>
<li>
<a href="http://servaas.com.au/blog/index.php/mh-c9000-wizardone-faq/">Servaas says 0.25C</a>. I still don&#8217;t know who these people are, but I am pre-disposed to liking them since they&#8217;re answering the exact questions I&#8217;m trying to answer.</li>
<li>
<a href="http://www.hangtimes.com/rcbattery_faq.html">The NoBS Batteries FAQ says 300mA-500mA</a>. For what capacity? Who knows! For the AA&#8217;s I&#8217;m looking at right now, 300mA would be less than 0.2C.</li>
<li>
<a href="http://www.rcgroups.com/forums/showthread.php?t=13043">A thread on RCGroups.com suggests 1C</a> but I suspect they&#8217;re nuts (and/or dealing with sufficiently different NiMH batteries used in (really big?) RC planes).</li>
<li>
<a href="http://www.batteryuniversity.com/partone-16.htm">Mr. Buchmann doesn&#8217;t offer concrete answers, but has some nice graphs</a> which seem to suggest that lower discharge current means less capacity loss over time (or, more accurately, over cycles).</li>
</ul><p>I don&#8217;t think I found as much concrete information about good discharge rates for NiMH batteries, but I think I&#8217;m going to be discharging around 0.2C.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2008/12/charge-rate-for-nimh-batteries/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Fedora 10</title>
		<link>http://darkness.codefu.org/wordpress/2008/12/installing-fedora-10/</link>
		<comments>http://darkness.codefu.org/wordpress/2008/12/installing-fedora-10/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 03:04:02 +0000</pubDate>
		<dc:creator>darkness</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/?p=311</guid>
		<description><![CDATA[Finally whacked my old Fedora 7 install and I&#8217;m starting over with a fresh install of Fedora 10. Some things I ran into: I&#8217;ve got this fairly bizarre setup where my desktop has two NICs that need to be bridged. Fedora 10 throws out the old network service in favor of NetworkManager. However, the release [...]]]></description>
			<content:encoded><![CDATA[<p>Finally whacked my old Fedora 7 install and I&#8217;m starting over with a fresh install of Fedora 10. Some things I ran into:</p><ul>
<li>
<p>I&#8217;ve got this fairly bizarre setup where my desktop has two NICs that need to be bridged. Fedora 10 throws out the old <code>network</code> service in favor of NetworkManager. However, <a href="http://docs.fedoraproject.org/release-notes/f10/en_US/What_Do_System_Adminstrators_Care_About.html#sn-NetworkManager">the release notes pretty much tell you that NetworkManager isn&#8217;t for people that want bridging</a>. No problem, just <a href="http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging">switch back to the old <code>network</code> service</a>.</p>
<p>I copied in my F7 <code>ifcfg-*</code> files verbatim and things <em>seem</em> to be working.</p>
</li>
<li><p>Either I&#8217;m on drugs or F7 used to rename network interfaces based on the <code>HWADDR</code> variable in your <code>ifcfg-*</code> files. In any case that doesn&#8217;t happen on F10: instead it just says &#8220;this MAC doesn&#8217;t match the MAC on the interface!&#8221; and doesn&#8217;t do anything at all with that interface. (Welcome to a bridge device trying to DHCP with no slave interfaces.) The new way of doing this isn&#8217;t bad, though: edit <code>/etc/udev.d/rules.d/70-persistent-net.rules</code> and set the <code>NAME</code>s you want.</p></li>
<li>
<p>Apparently <a href="http://rpmfusion.org/">RPM Fusion</a> is the new hotness: Freshrpms, rpm.livna.org, and &#8220;Dribble&#8221; (never heard of it) collaborating together for a single third-party RHEL/Fedora repository. At this point in my re-installation this sounds good to me: I used Freshrpms and rpm.livna.org together before, and I did have some confusion around whose packages were better. Unfortunately <a href="http://www.gossamer-threads.com/lists/atrpms/users/11789">it sounds like there was some disagreement over the people running RPM Fusion</a> (and maybe EPEL?) so Dag, Dries, and ATrpms are still around. There was <a href="https://rpmrepo.org/RPMforge">RPMForge, but now they seem to have tucked that into rpmrepo</a> along with ATrpms and some <a href="https://rpmrepo.org/FrontPage/Participants">vague reference to &#8220;the CentOS project&#8221;</a>.</p>
<p>O, the confusion.</p>
<p>Anyway, I&#8217;ve <a href="http://rpmfusion.org/Configuration">configured the RPM Fusion repositories in Yum via their directions</a>. I also installed <code>yum-protectbase</code>, per <a href="http://www.fedoraguide.info/index.php?title=Main_Page#Protect_your_Repositories">a guide&#8217;s suggestion not to clobber Fedora base package</a>. (We&#8217;ll see how that works out as I go on.)</p>
</li>
<li>
<p>Installed the NVIDIA binary drive for my GeForce 6500 (no, not a typo of 6600) from RPM Fusion. Pulled in stuff including <code>system-config-display</code>, which doesn&#8217;t want to run. I get an error like <code>AttributeError: 'NoneType' object has no attribute     'device'</code>. My gut tells me this is temporary breakage in Fedora, but I really haven&#8217;t investigated it much. I started with <a href="http://www.mjmwired.net/resources/mjm-fedora-nvidia.html">some directions on installing the NVIDIA driver in Fedora</a> and went from there. Process was something like:</p>
<ol style="list-style-type: decimal;">
<li><code>yum install kmod-nvidia</code></li>
<li>Ran <code>livna-config-display</code>, found that it picked the correct settings.</li>
<li>Reboot to make sure I get the NVIDIA driver. (I did.)</li>
<li>Find out that <code>system-config-display</code> won&#8217;t be helping me set my resolution, et al today.</li>
<li>Find that <code>/etc/X11/xorg.conf</code> doesn&#8217;t describe much of anything: only sections were <code>Files</code>, <code>ServerFlags</code>, and <code>Device</code> (probably added/modified by the driver package), and <code>Extensions</code>.</li>
<li>Find my <code>xorg.conf</code> which I backed up from Fedora 7 and copy its sections for the <code>Monitor</code> and the <code>Screen</code> into F10&#8217;s <code>xorg.conf</code>.</li>
<li>Log out and back in to get new settings.</li>
</ol>
<p>After that everything was right as rain. Moving on.</p>
</li>
<li>
<p>Actually, while I was in there I also added the config section for my PS/2 Microsoft IntelliMouse Explorer through my KVM. (My KVM apparently screws up the mouse signals, so Linux/X sees some extra buttons when I use the scroll wheel. Maybe I should get a new KVM.)</p>
<p>Re-using the mouse stanza from my F7 <code>xorg.conf</code> proved more difficult than I thought. I had to add a couple <code>ServerFlags</code>:</p>
<pre><code>Option      "AllowEmptyInput" "off"
Option      "AutoAddDevices" "off"
</code></pre>
<p>Apparently new X.org wants to ask hal what your input devices are, so without turning <code>AllowEmptyInput</code> off <code>Xorg</code> will just ignore anything using the <code>mouse</code> driver. Of course, after just turning off <code>AllowEmptyInput</code> and with just my mouse stanza in <code>xorg.conf</code> I started getting all my mouse inputs happening twice; that is, click once and you get a double click. This is because it was auto-detecting my mouse and also using my explicitly configured mouse. So then you have to turn off <code>AutoAddDevices</code>. Note that this probably means plugging in new input devices won&#8217;t make them &#8220;just work&#8221; in X.org, but that&#8217;s purely speculation.</p>
<p>Of course, after adding the two above I found out that I didn&#8217;t have a keyboard anymore, so I had to copy in the keyboard <code>InputDevice</code> stanza from my old F7 <code>xorg.conf</code> as well.</p>
<p>Are we having fun yet?</p>
</li>
<li><p>Oh, and I also added <a href="http://www.foldr.org/~michaelw/log/programming/lisp/dontzap-emacs"><code>DontZap</code>, which probably exists primarily for the benefit of Emacs users</a>.</p></li>
<li>
<p>I spent hours toying with Compiz Fusion configuration. (I was doing it through <code>gconf-editor</code>, but I&#8217;m told <code>ccsm</code> is a good configuration tool for Compiz Fusion&#8211;not installed by default, at least on my box.)</p>
<p>To use Compiz Fusion you have to turn on &#8220;Desktop Effects.&#8221; Compiz Fusion plugins I&#8217;m using: <code>core</code>, <code>glib</code>, <code>gconf</code>, <code>dbus</code>, <code>png</code>, <code>svg</code>, <code>text</code>, <code>video</code>, <code>screenshot</code>, <code>place</code>, <code>minimize</code>, <code>wall</code>, <code>move</code>, <code>resize</code>, <code>switcher</code>, <code>scale</code>, <code>decoration</code>, <code>resizeinfo</code>, <code>snap</code>, <code>vpswitch</code>, <code>scaleaddon</code>, <code>showdesktop</code>. Note that order can be important: <code>text</code> needs to come before <code>scaleaddon</code>.</p>
<ul>
<li>Between <code>wall</code>, <code>scale</code>/<code>scaleaddon</code>, and <code>showdesktop</code>, I&#8217;ve got keys basically just like Expose.</li>
<li>
<code>switcher</code> switches more or less like I want it (i.e. like <a href="http://en.wikipedia.org/wiki/Sawfish_(window_manager)">Sawfish</a>.</li>
<li>
<code>place</code> could stand to be a little smarter but I&#8217;ll live.</li>
<li>Note that you don&#8217;t need <code>wobbly</code> (too much eye candy, methinks) to get window snapping, you just need <code>snap</code>.</li>
<li>
<code>vpswitch</code> lets you go jump directly to specific virtual desktops, so I can have C-1 through C-4 just like I do with Spaces.</li>
<li>
<code>resizeinfo</code> fulfills my need to see my terminal geometry while I&#8217;m resizing it.</li>
</ul>
<p>All in all I&#8217;m pretty happy. There are even ways to do things like bring up the run dialog. One thing I would like to see fixed is the title filtering in <code>scaleaddon</code>: apparently broken, though I think someone might have realized this per some Googling I did.</p>
<p>For now, no Sawfish for me.</p>
<p>(I will note here that my Super (i.e. Windows) key seems to be behaving strangely in some applications. For example, if I try to make <code>&lt;Super&gt;n</code> open a new terminal in <code>gnome-terminal</code>, it secretly makes it so any time I hit <code>n</code> I open a new terminal. Duh.)</p>
</li>
</ul><p>It was about this time that I decided to try and switch from writing this entry on my MacBook to writing it on my new F10 box. This meant I had to get at least Emacs and <a href="http://johnmacfarlane.net/pandoc/">Pandoc</a> working, and that probably meant that I was going to need Firefox to work so I could download/configure those things.</p><ul>
<li>
<p>Funny thing: the proverbial &#8220;last straw&#8221; that led me to upgrade Fedora was that I wanted Firefox 3 and <a href="http://labs.mozilla.com/projects/weave/">Weave</a>. Unfortunately F7 was old enough that I just had Firefox 2.x. The Firefox 3 binaries from <code>getfirefox.com</code> wouldn&#8217;t run Weave, complaining that Weave couldn&#8217;t initialize its crypto module (<code>WeaveCrypto.so</code>). So I figured I&#8217;d just upgrade to a distribution that has Firefox 3 by default.</p>
<p>I bet you can already guess where this is going.</p>
<p>I fired up Firefox, installed Weave, restarted Firefox and&#8230; same error about not being able to load the crypto module. Go to the <a href="https://labs.mozilla.com/forum/?CategoryID=19">Weave Forums</a>, see that a new Weave seems to be out (finally): <a href="https://labs.mozilla.com/forum/comments.php?DiscussionID=4810&amp;page=1">Weave 0.2.92</a>. Cool! Lets read the notes:</p>
<blockquote><ol style="list-style-type: decimal;">
<li>This is the first release after some really major changes, so expect rough edges (even more than usual).</li>
<li>Only bookmarks sync is currently implemented.</li>
<li>You will need to set up your own instance of the 0.3 server.</li>
</ol></blockquote>
<p>I&#8217;m thinking some really harsh things right now. I really just want <a href="http://en.wikipedia.org/wiki/Google_Browser_Sync">Google Browser Sync</a> back. I don&#8217;t have <em>any</em> right to bitch about nice people doing a somewhat complicated task and doing it entirely for free; but I will say that it&#8217;s a really big deal for me to be able to keep Firefox synchronized between the 2-4 computers I use it on.</p>
<p>I will simply say: Weave is nowhere near ready for prime time&#8211;just like (I believe) it advertises, if only through the version number.</p>
<p>So fuck it: I&#8217;m now a <a href="http://www.foxmarks.com/">Foxmarks</a> user. They just added password synchronization, and most importantly the shit seems to work on both my Mac and this new F10 install. Now all I think I want is cookie synchronization (I like for my login cookies to get propagated around, it makes for nice &#8220;seamless&#8221; browsing when I switch which computer I&#8217;m on).</p>
</li>
<li><p>So I know that one of the few packages I elected to install right at install time was Emacs. Lets start it up. WTF, where is my <a href="http://en.wikipedia.org/wiki/Fixed_(typeface)">10&#215;20 font</a>? Turns out I had <code>bitmap-fonts</code> installed, but I couldn&#8217;t use them (except for a few sizes&#8211;WTF?) until I installed the <code>xorg-x11-fonts-misc</code> package. (In fact, now that I look at that package, I&#8217;m not sure <code>bitmap-fonts</code> is important here at all, since <code>xorg-x11-fonts-misc</code> seems to have <code>10x20</code> font files itself.)</p></li>
<li>
<p>Time to get Pandoc installed, which means getting Haskell stuff. I use Pandoc to convert between Markdown and HTML: I compose blog posts in Markdown, then convert to HTML before uploading to WordPress (all in Emacs, of course). When I want to edit a post, I use Pandoc to convert from HTML back to Markdown. So far it&#8217;s working pretty well, and it gives me the option of using syntax highlighting. I&#8217;ll probably have a longer post about Pandoc (and Haskell) in the future.</p>
<p>Today I just want the <code>pandoc</code> program. I&#8217;ve got a couple patches against Pandoc so I don&#8217;t even bother to check if it&#8217;s in one of my configured repositories. I did <code>yum install ghc</code>.</p>
<p>No <code>cabal-install</code> in Yum. (It was in MacPorts, which made my first installation of Pandoc somewhat easier.) The <em>Real World Haskell</em> book apparently has <a href="http://book.realworldhaskell.org/read/installing-ghc-and-haskell-libraries.html#id689017">instructions on installing <code>cabal</code></a> into your home directory. <strong>Don&#8217;t follow these!</strong> What they don&#8217;t tell you is that you can just go grab <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/cabal-install"><code>cabal-install</code></a> (conveniently the last package on their list&#8230;) and run its <code>bootstrap.sh</code> script, which nicely leaves you with <code>~/.cabal/bin/cabal</code>.</p>
<p>Pandoc needs <code>utf8-string</code>, <code>zip-archive</code>, and <code>highlighting-kate</code>. <code>zip-archive</code> needs the <code>zlib-devel</code> RPM installed, and highlighting-kate needs (indirectly) <code>pcre-devel</code>; so <code>yum install zlib-devel pcre-devel</code>. Then I can just <code>cabal install utf8-string zip-archive highlighting-kate</code>. Now I can compile Pandoc. This worked well.</p>
</li>
</ul><p>Now I&#8217;m blogging on my F10 install. Hooray. But now I want some tunes.</p><ul>
<li>
<p>F10 comes with <code>amarok-1.98-1.fc10</code>. As far as I can tell this entirely unusable. For example, I could never get the Phonon backend for Xine to work properly. Fedora aside, looks like I&#8217;m not the only <a href="http://www.qt-apps.org/comments/discussion.php?id=2&amp;forumpage=0">one</a> <a href="http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/e2bae1f138f52ee4/6773a79f7ccf5e54?lnk=raot&amp;pli=1">having</a> <a href="http://bugs.archlinux.org/task/11070">problems</a> with Phonon and Amarok. Woe be on to me for not running KDE? Perhaps.</p>
<p>In any event I think this was a serious boner on the part of the Fedora maintainer. Amarok 1 was a very popular, and very feature-full application. To toss it out for the <em>barely functional beta</em> of the next version at this point seems foolish.</p>
<p>Thankfully some kind soul made <a href="http://forums.fedoraforum.org/showpost.php?p=1121774&amp;postcount=9">Amarok 1.4 RPMs for Fedora 10</a>. <code>yum localinstall</code> these. Don&#8217;t forget to add something like <code>exclude=amarok</code> to, say, <code>/etc/yum.conf</code> so your nice working Amarok doesn&#8217;t get clobbered by the new broken Fedora one.</p>
<p>If you then want to change your fonts in Amarok, you need to change them in the KDE theme. Where the fuck did <code>kcontrol</code> go? No idea. Someone posted <a href="http://ubuntuforums.org/showpost.php?s=ab52c2a6230dda8b937b28d714e2af3e&amp;p=6325083&amp;postcount=27">a little snippet to go into your <code>~/.kde/share/config/kdeglobals</code> file to change the fonts in Amarok</a> (and KDE3?). I just used <code>Sans Serif</code> instead of <code>UnDotum</code> and changed <code>10</code> to <code>12</code> to get bigger fonts.</p>
</li>
<li><p>Somewhat surprisingly, sound basically worked. I managed to do a minimal enough installation that I didn&#8217;t even have the Gnome mixer, <code>gnome-volume-control</code>. Needed to install <code>gnome-media</code> for this, as well as <code>aumix</code>. Then I could turn up my volume, set my mixers appropriately, etc. Amarok worked with the ALSA output. Not sure if PulseAudio is involved here or not.</p></li>
<li>
<p>I&#8217;ve actually been using <a href="http://en.wikipedia.org/wiki/MDNS#Name_resolution">mDNS</a> ever since I got a Mac. To enable this I:</p>
<ol style="list-style-type: decimal;">
<li>Went into <code>system-config-firewall</code> and opened the mDNS port (UDP 5353 IIRC).</li>
<li>Installed <code>nss-mdns</code>, which nicely adds the appropriate configuration into <code>/etc/nsswitch.conf</code>.</li>
<li>Restarted <code>nscd</code> (I use LDAP, lookups take too long if they&#8217;re not cached) and then ran <code>nscd -i hosts</code> to clear out the cached negative responses from my earlier tests.</li>
</ol>
</li>
<li><p>Of course, shortly after using <code>system-config-firewall</code>, I decided it will still be easier in the long run to just maintain my iptables rules in a shell script, like I always have. So no more use of <code>system-config-firewall</code> for me.</p></li>
<li>
<p>My e-mail comes to me through a relay via SMTP. Delivery happens the good ol&#8217; Unix way, through through <code>mailfilter</code> instead of <code>procmail</code>. I mostly copied the old setting from my F7 setup. I did remove Exim in favor of Postfix. (Exim, not Sendmail by default now, I guess?) <a href="http://tmda.net/">TMDA</a> was in Fedora, which is nice, and so was <code>mailfilter</code>. I also grabbed all the usual suspects like SpamAssassin, ClamAV (and set up a <code>clamd</code> for it), Razor, and Pyzor. (I don&#8217;t think Pyzor is working, due to failing sort of messages in <code>/var/log/maillog</code>. Oh well.)</p>
<p>Everything pretty much worked smoothly. Only catches were SELinux stuff. Needed to <code>restorecon -Rv /var/run/clamd.local /usr/sbin ~</code> to get all the contexts right. I also needed the following policy:</p>
<pre><code>policy_module(localmail,1.0.2)

require {
        type postfix_local_t;
        type unconfined_t;
}

clamav_stream_connect(postfix_local_t);
spamassassin_exec_client(postfix_local_t);
mta_send_mail(postfix_local_t);

# This is probably way too broad, but I don't understand how to fix it
# and Google isn't helping.  So long, security!
allow postfix_local_t unconfined_t:unix_stream_socket connectto;
</code></pre>
<p>Apparently the newer SELinux stuff comes with the policy sources and development Stuff on-board? In any case I had <code>/usr/share/selinux/devel/Makefile</code> already, so it was a snap to make the policy and then <code>semodule --install</code> it.</p>
</li>
<li>
<p><a href="http://www.mjmwired.net/resources/mjm-fedora-f10.html#mediaplayers">Installed a bunch of media players</a>. I used an <code>mplayer-codecs</code> RPM I made for the <code>all-20071007.tar.bz2</code> bundle of MPlayer codecs.</p>
<p>I will mention one thing I ran into while building the MPlayer codecs:</p>
<pre><code>*** ERROR: No build ID note found in
    .../mplayer-codecs-20071007-1.fc10.i386/usr/lib/win32/vid_h263.xa
</code></pre>
<p>Turns out this is some new feature semi-recently shoved in to <code>find-debuginfo.sh</code>, which is part of the normal process for building an RPM. To skip this check for this big tarball of binaries, I put <code>%undefine _missing_build_ids_terminate_build</code> at the beginning of the spec file.</p>
</li>
<li><p><a href="http://www.mjmwired.net/resources/mjm-fedora-f10.html#flash">Installed Flash</a>. (In case you can&#8217;t tell, I&#8217;m digging Mauriat Miranda&#8217;s guide. It&#8217;s reducing the task of reinstalling from actual thought to copy/paste.)</p></li>
<li>
<p>I copied over my <code>.purple</code> directory from my F7 install and expected to start Pidgin up and get going. Wrong: the #1 protocol I use on this box is Bonjour, and it didn&#8217;t work. Oddly, other PCs were seeing my announcement, but no one came up on my buddy list. Running Pidgin from the console (in debug mode? I can&#8217;t remember now) showed that it was refusing messages from anyone that wasn&#8217;t on my buddy list; as I just mentioned, that effectively meant it was refusing messages from everyone.</p>
<p>This turns out to be a pain in my ass: they apparently found an insecure configuration in DBus, and the fix was to lock down what types of messages can be sent back in response to a DBus message (as far as I can tell, which may not be very far). For more information, see:</p>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=18229"><code>https://bugs.freedesktop.org/show_bug.cgi?id=18229</code></a></li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=18980"><code>https://bugs.freedesktop.org/show_bug.cgi?id=18980</code></a></li>
<li><a href="https://bugzilla.redhat.com/show_bug.cgi?id=475068"><code>https://bugzilla.redhat.com/show_bug.cgi?id=475068</code></a></li>
<li><a href="https://bugzilla.redhat.com/show_bug.cgi?id=475069"><code>https://bugzilla.redhat.com/show_bug.cgi?id=475069</code></a></li>
</ul>
<p>The <a href="https://bugs.freedesktop.org/show_bug.cgi?id=18980">&#8220;broken services tracking bug&#8221;</a> doesn&#8217;t list Avahi yet, but sure enough the DBus change breaks Avahi as well as all those other things listed. Pidgin/libpurple depend on Avahi to tell them who&#8217;s announcing presence (Bonjour) capabilities. No response from Avahi, no buddies in Pidgin.</p>
<p>There is a <a href="http://forums.fedoraforum.org/showpost.php?p=1125914&amp;postcount=25">quick, dirty, and insecure fix to the DBus problem</a> which basically un-does the security fix as far as I can tell. Far from ideal, but (A) I don&#8217;t think that I&#8217;m particularly vulnerable, unless Fedora sucks in a malicious package, or unless I give someone else access to my box (ergo DBus); and (B) an local security problem is better than a box where a bunch of shit (i.e. Pidgin) doesn&#8217;t work.</p>
</li>
<li><p>VMware installed pretty easily, except in 6.5 you don&#8217;t have <code>/usr/bin/vmware-config.pl</code> anymore. Now you apparently do <code>sudo /usr/bin/vmware-modconfig --console --install-all</code>. Network configuration is (I guess) done with <code>sudo     /usr/bin/vmware-netcfg</code>. My XP VM is booted and running, so I guess it can&#8217;t be that bad.</p></li>
</ul><p>Post script: I started this installation Saturday, December 6th, and I&#8217;m posting this on Wednesday, December 10th. Sigh.</p>
]]></content:encoded>
			<wfw:commentRss>http://darkness.codefu.org/wordpress/2008/12/installing-fedora-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

