<?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>Tales From The Geek Side</title>
	<atom:link href="http://therowes.net/~greg/feed/" rel="self" type="application/rss+xml" />
	<link>http://therowes.net/~greg</link>
	<description>The geeky musings of Greg Rowe.</description>
	<pubDate>Thu, 25 Sep 2008 12:52:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Dual Head with Intel i915GM on Linux</title>
		<link>http://therowes.net/~greg/2008/09/25/dual-head-with-intel-i915gm-on-linux/</link>
		<comments>http://therowes.net/~greg/2008/09/25/dual-head-with-intel-i915gm-on-linux/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 12:52:13 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://therowes.net/~greg/?p=97</guid>
		<description><![CDATA[It&#8217;s been a long time since I&#8217;ve run a Linux machine in a multi-head setup.  Much to my surprise (and delight) a lot has changed.  Unfortunately there&#8217;s still a lot of information out there on setting things up the old way but not a lot on setting things up the new way.
The old way is [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I&#8217;ve run a Linux machine in a multi-head setup.  Much to my surprise (and delight) a lot has changed.  Unfortunately there&#8217;s still a lot of information out there on setting things up the old way but not a lot on setting things up the <a href="http://bgoglin.livejournal.com/9846.html">new way</a>.</p>
<p>The old way is specifying <em>Devices</em> and <em>Screens</em> and using Xinerama and using directives like <em>RightOf</em> and <em>LeftOf</em> in your <em>xorg.conf</em>.  The new way moves all of this stuff out of <em>xorg.conf</em> and shifts the responsibility to <em>xrandr</em> which will configure screens and devices at runtime and can do so completely dynamically.</p>
<p>So the basic steps are just to get xorg up and running, which should work by default, tweak your <em>xorg.conf</em> slightly, and then run <em>xrandr</em> at the beginning of your X session to configure your displays to your liking.<span id="more-97"></span></p>
<p>The tweak to <em>xorg.conf</em>, at least for the i915, is to add the keyword <em>Virtual</em> to the <em>Display</em> Subsection of the <em>Screen</em> section.  Don&#8217;t worry, I&#8217;ll include my entire <em>xorg.conf</em> so you can see what I&#8217;m struggling to say in a clear way.  When you do this you must also <strong><em>remove</em> the <em>Modes</em> lines</strong>.  This sets up a display window that the X server will use to place your output.  Don&#8217;t worry, it does it in a smart way.  You can have different resolutions on each display and it will be displayed correctly.  You need to specify a virtual size that is large enough to hold all of your displays.  In my case one display is 1280&#215;1024 and the other is 1400&#215;1050.  The virtual display is 2680&#215;1050 (with a side-by-side setup).  Unfortunately the i915 driver disables DRI if either dimension exceeds 2048.  I hope this is a hardware limitation and not a software limitation.</p>
<p>The final step is to run <em>xrandr</em> to configure your displays.  I use the following command to setup an external monitor on the DVI output running to the left of my laptop display.  I run this out of the <em>Startup Programs</em> under<em> System/Preferences/Sessions.<br />
</em></p>
<div class="codeblock">
<pre>/usr/bin/xrandr --output TMDS-1 --left-of LVDS</pre>
</div>
<p>Here is my <em>xorg.conf</em> (scrollbar at the bottom):</p>
<div class="codeblock">
<pre>Section "Files"
	FontPath	"/usr/share/fonts/X11/misc"
	FontPath	"/usr/X11R6/lib/X11/fonts/misc"
	FontPath	"/usr/share/fonts/X11/cyrillic"
	FontPath	"/usr/X11R6/lib/X11/fonts/cyrillic"
	FontPath	"/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath	"/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath	"/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/Type1"
	FontPath	"/usr/X11R6/lib/X11/fonts/Type1"
	FontPath	"/usr/share/fonts/X11/100dpi"
	FontPath	"/usr/X11R6/lib/X11/fonts/100dpi"
	FontPath	"/usr/share/fonts/X11/75dpi"
	FontPath	"/usr/X11R6/lib/X11/fonts/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"i2c"
	Load	"bitmap"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
# Make capslock become another control key
	Option  "XkbOptions"    "ctrl:nocaps"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "Device"
	Identifier	"intel0"
	Driver		"i810"
	BusID		"PCI:0:2:0"
EndSection

Section "Monitor"
	Identifier	"Internal Monitor"
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Internal Screen"
	Device		"intel0"
	Monitor		"Internal Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
# This is required to get the proper size for one display of 1280x1024 and another of 1400x1050
		Virtual		2680 1050
	EndSubSection
EndSection

Section "ServerLayout"

	Identifier	"Default Layout"
	Screen 	"Internal Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice	"Synaptics Touchpad"
EndSection</pre>
</div>
<p>References:</p>
<p><a href="http://bgoglin.livejournal.com/9846.html">http://bgoglin.livejournal.com/9846.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/09/25/dual-head-with-intel-i915gm-on-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HTML Composition in Thunderbird</title>
		<link>http://therowes.net/~greg/2008/08/11/html-composition-in-thunderbird/</link>
		<comments>http://therowes.net/~greg/2008/08/11/html-composition-in-thunderbird/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 12:04:04 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Geek]]></category>

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

		<guid isPermaLink="false">http://therowes.net/~greg/?p=85</guid>
		<description><![CDATA[Generally I write email using plain text.  Sometimes I really want to use HTML.  I couldn&#8217;t find an easy way to switch to compose in HTML when composing a message in Thunderbird so I started searching for extensions.  I found that you don&#8217;t need an extension to accomplish this.  All you need to do is [...]]]></description>
			<content:encoded><![CDATA[<p>Generally I write email using plain text.  Sometimes I really want to use HTML.  I couldn&#8217;t find an easy way to switch to compose in HTML when composing a message in <a href="http://www.mozilla.com/en-US/thunderbird/">Thunderbird</a> so I started searching for extensions.  I found that you don&#8217;t need an extension to accomplish this.  All you need to do is hold shift while clicking on the compose button (&#8221;write&#8221; button).  This doesn&#8217;t work with the keyboard (ctrl-shift-m) but I&#8217;m OK with that since it&#8217;s rare that I compose in HTML.</p>
<p>I also found that holding shift while clicking on Reply or Reply to All also opens the composition window in HTML editing mode.</p>
<p>References:</p>
<p><a href="http://blog.rimann.org/de/einzelansicht/archive/2007/november/20/how_to_switch_between_html_and_plain_text_in_mozilla_thunderbird/index.htm">1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/08/11/html-composition-in-thunderbird/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Symantec Backup Agent for Linux</title>
		<link>http://therowes.net/~greg/2008/06/23/symantec-backup-agent-for-linux/</link>
		<comments>http://therowes.net/~greg/2008/06/23/symantec-backup-agent-for-linux/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 14:56:38 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Software]]></category>

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

		<guid isPermaLink="false">http://therowes.net/~greg/2008/06/23/symantec-backup-agent-for-linux/</guid>
		<description><![CDATA[At work I administer a few Linux servers.  I&#8217;m a long time Debian user who has rarely been disappointed by the distribution.  As such I have Debian on the machines I administer.  The company has chosen to use Symantec&#8217;s Backup Exec software.  They &#8220;support&#8221; Linux but, in my experience with their [...]]]></description>
			<content:encoded><![CDATA[<p>At work I administer a few Linux servers.  I&#8217;m a long time Debian user who has rarely been disappointed by the distribution.  As such I have Debian on the machines I administer.  The company has chosen to use Symantec&#8217;s Backup Exec software.  They &#8220;support&#8221; Linux but, in my experience with their software, it&#8217;s terrible.  Memory leaks, crashes, and the most convoluted install scripts I&#8217;ve ever seen.  If it were my choice I wouldn&#8217;t use their crapware at all but I have to use it.</p>
<p>Long ago I found this set of instructions for <a href="http://newvibes.net/index.php/veritas-backup-exec-agent-for-unix-linux-on-debian">installing &#8220;RALUS&#8221; on Debian</a>.  Since their install scripts were so terrible I was happy to find good alternative.  I&#8217;m reproducing the instructions here for my own reference.  These instructions are based off of installing version 11d.7170.<span id="more-84"></span></p>
<p>The first step is to convert the RPM files to debs.  The RPMs are repackaged as <span style="font-style: italic;">.tar.gz</span> files in the directory <span style="font-style: italic;">cdimg/pkgs/Linux.</span></p>
<div class="codeblock">
<pre>$ tar xzvf VRTSralus.tar.gz
$ tar xzvf VRTSvxmsa.tar.gz</pre>
</div>
<p>You will now have two RPM files.  They must be converted to <em>.debs</em> using <em>alien</em>.</p>
<div class="codeblock">
<pre>$ alien VRTSralus-11.00.7170-0.i386.rpm
vrtsralus_11.00.7170-1_i386.deb generated
$ alien VRTSvxmsa-4.4-021.i686.rpm
Warning: Skipping conversion of scripts in package VRTSvxmsa: postinst prerm
Warning: Use the --scripts parameter to include the scripts.
vrtsvxmsa_4.4-22_i386.deb generated</pre>
</div>
<p>The next step is to install the <em>.debs</em>.</p>
<div class="codeblock">
<pre># dpkg --install vrtsralus_11.00.7170-1_i386.deb
(Reading database ... 45374 files and directories currently installed.)
Preparing to replace vrtsralus 11.00.6235-1 (using vrtsralus_11.00.7170-1_i386.deb) ...
Unpacking replacement vrtsralus ...
Setting up vrtsralus (11.00.7170-1) ...

# dpkg --install vrtsvxmsa_4.4-22_i386.deb
(Reading database ... 45374 files and directories currently installed.)
Preparing to replace vrtsvxmsa 4.4-18 (using vrtsvxmsa_4.4-22_i386.deb) ...
Unpacking replacement vrtsvxmsa ...
Setting up vrtsvxmsa (4.4-22) ...</pre>
</div>
<p>Be sure to install <em>libstdc++2.10-glibc2.2</em> if you haven&#8217;t already:</p>
<div class="codeblock">
<pre># apt-get install libstdc++2.10-glibc2.2</pre>
</div>
<p>Link to the startup script:</p>
<div class="codeblock">
<pre># ln -s /opt/VRTSralus/bin/VRTSralus.init /etc/init.d/</pre>
</div>
<p>Create <em>beoper</em> group and add <em>root</em> to that group:</p>
<div class="codeblock">
<pre># groupadd beoper
# adduser root beoper</pre>
</div>
<h2>Note Well:</h2>
<p><a href="http://newvibes.net/index.php/veritas-backup-exec-agent-for-unix-linux-on-debian">The source of this post provides more information</a>.  You should also read their page as I have omitted creating configuration files and setting up the Windows side.</p>
<h2>References:</h2>
<p><a href="http://newvibes.net/index.php/veritas-backup-exec-agent-for-unix-linux-on-debian">http://newvibes.net/index.php/veritas-backup-exec-agent-for-unix-linux-on-debian</a></p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/06/23/symantec-backup-agent-for-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Extracting Audio From Video</title>
		<link>http://therowes.net/~greg/2008/06/20/extracting-audio-from-video/</link>
		<comments>http://therowes.net/~greg/2008/06/20/extracting-audio-from-video/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 12:44:36 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Geek]]></category>

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

		<guid isPermaLink="false">http://therowes.net/~greg/2008/06/20/extracting-audio-from-video/</guid>
		<description><![CDATA[I recently came across some some excellent concert footage.  I wanted to have the performance available on my mp3 player but I didn&#8217;t want to re-encode the audio.  Ffmpeg came to the rescue.
Using ffmpeg you can split out the audio and video components of any video stream it understands.  In fact you [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across some some excellent concert footage.  I wanted to have the performance available on my mp3 player but I didn&#8217;t want to re-encode the audio.  Ffmpeg came to the rescue.</p>
<p>Using ffmpeg you can split out the audio and video components of any video stream it understands.  In fact you can tell ffmpeg to transcode the audio as well.  In my case the audio was already in mp3 format so I didn&#8217;t want to transcode.  Ffmpeg allows you to specify &#8220;copy&#8221; as an output format in which case it doesn&#8217;t modify the audio stream in any way.</p>
<p>To extract the audio I ran the following.  The -vn switch instructs ffmpeg to omit the video stream.  The default behavior would be to output a video stream as well as audio streams.  The -acodev switch tells ffmpeg what format you want the audio stream to be output as.  In my case I didn&#8217;t want it transcoded so I specified &#8220;copy.&#8221;</p>
<div class="codeblock">
<pre>
$ ffmpeg -i slayer-rock-am-ring-2007.avi -vn -acodec copy slayer-rock-am-ring-2007.mp3
</pre>
</div>
<p>Now I just need to find a tool to break mp3s into audio tracks without re-encoding.</p>
<p>References:<br />
<a href="http://howto-pages.org/ffmpeg/#strip">http://howto-pages.org/ffmpeg/#strip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/06/20/extracting-audio-from-video/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tcl-dox 0.8.2 Available</title>
		<link>http://therowes.net/~greg/2008/03/03/tcl-dox-082-available/</link>
		<comments>http://therowes.net/~greg/2008/03/03/tcl-dox-082-available/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 14:04:50 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://therowes.net/~greg/2008/03/03/tcl-dox-082-available/</guid>
		<description><![CDATA[Well, I&#8217;m embarrassed!  I let some embarrassing bugs make their way into the 0.8 and 0.8.1 release of tcl-dox.  This release fixes a crash related to an uninitialized variable as well as the handling of namespaces.  The latest release is 0.8.2.  If you have trouble with 0.8.2 please use 0.7 and [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I&#8217;m embarrassed!  I let some embarrassing bugs make their way into the <a href="http://www.therowes.net/%7Egreg/download/tcl-doxygen-filter/tcl-dox-0.8.tar.gz">0.8</a> and <a href="http://www.therowes.net/%7Egreg/download/tcl-doxygen-filter/tcl-dox-0.8.1.tar.gz">0.8.1</a> release of tcl-dox.  This release fixes a crash related to an uninitialized variable as well as the handling of namespaces.  The latest release is <a href="http://www.therowes.net/%7Egreg/download/tcl-doxygen-filter/tcl-dox-0.8.2.tar.gz">0.8.2</a>.  If you have trouble with <a href="http://www.therowes.net/%7Egreg/download/tcl-doxygen-filter/tcl-dox-0.8.2.tar.gz">0.8.2</a> please use <a href="http://www.therowes.net/%7Egreg/download/tcl-doxygen-filter/tcl-dox-0.7.tar.gz">0.7</a> and send along bug reports.</p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/03/03/tcl-dox-082-available/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tcl-dox 0.8.1 Available</title>
		<link>http://therowes.net/~greg/2008/02/29/tcl-dox-081-available/</link>
		<comments>http://therowes.net/~greg/2008/02/29/tcl-dox-081-available/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 21:15:12 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://therowes.net/~greg/2008/02/29/tcl-dox-08-available/</guid>
		<description><![CDATA[A new version of tcl-dox has been released. This version fixes a number of issues and has a few enhancements.  Code was contributed for handling arrays. A bug where identifiers with underscores weren&#8217;t handled correctly has been fixed.  Tcl code outside of procedures and classes is ignored now  (but not global variables). [...]]]></description>
			<content:encoded><![CDATA[<p>A new version of tcl-dox has been released. This version fixes a number of issues and has a few enhancements.  Code was contributed for handling arrays. A bug where identifiers with underscores weren&#8217;t handled correctly has been fixed.  Tcl code outside of procedures and classes is ignored now  (but not global variables).  Tcl code inside class declarations that isn&#8217;t explicitly translated by tcl-dox is now ignored as it was causing problems with Doxygen. </p>
<p>Thanks go to everyone that contributed code.</p>
<p>The latest version is <a href="http://therowes.net/%7Egreg/download/tcl-doxygen-filter/tcl-dox-0.8.1.tar.gz">0.8.1</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/02/29/tcl-dox-081-available/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sync Kolab</title>
		<link>http://therowes.net/~greg/2008/01/17/sync-kolab/</link>
		<comments>http://therowes.net/~greg/2008/01/17/sync-kolab/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 19:37:48 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Geek]]></category>

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

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

		<guid isPermaLink="false">http://therowes.net/~greg/2008/01/17/sync-kolab/</guid>
		<description><![CDATA[Sync Kolab is an add-on for Thunderbird that synchronizes your address book as well as calendar data.  The calendar features are optional and only available if you use the Lightning add-on (I do not).  You can store your address book data in an IMAP folder or on a Kolab server.  I&#8217;ve long [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gargan.org/extensions/synckolab.html">Sync Kolab</a> is an <a href="https://addons.mozilla.org/en-US/thunderbird/addon/519">add-on</a> for <a href="http://www.mozilla.com/en-US/thunderbird/">Thunderbird</a> that synchronizes your address book as well as calendar data.  The calendar features are optional and only available if you use the <a href="http://www.mozilla.org/projects/calendar/lightning/">Lightning</a> <a href="https://addons.mozilla.org/en-US/thunderbird/addon/2313">add-on</a> (I do not).  You can store your address book data in an IMAP folder or on a <a href="http://www.kolab.org/">Kolab</a> server.  I&#8217;ve long been an IMAP user and I do not wish to administer a Kolab server so I&#8217;ve opted for the IMAP backend.</p>
<p>I&#8217;ve been using Sync Kolab for months now but I&#8217;ve always been disappointed.  Thunderbird has an option to choose the format of messages, either plain text or HTML, for each contact.  This is great because I like the richer formatting available in HTML but HTML isn&#8217;t appropriate for many situations.  Mailing lists are a prime example of when to use plain text.  I&#8217;d finally grown annoyed enough that I started peering into the source code to add the feature myself.</p>
<p>What I found in the code was that the feature was already supported &#8212; if you are using the VCARD backend.  Now that I&#8217;ve switched to the VCARD backend all is well!</p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/01/17/sync-kolab/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating a Certificate With Multiple Hostnames</title>
		<link>http://therowes.net/~greg/2008/01/08/creating-a-certificate-with-multiple-hostnames/</link>
		<comments>http://therowes.net/~greg/2008/01/08/creating-a-certificate-with-multiple-hostnames/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 19:01:14 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Geek]]></category>

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

		<guid isPermaLink="false">http://therowes.net/~greg/2008/01/08/creating-a-certificate-with-multiple-hostnames/</guid>
		<description><![CDATA[Multiple Names on One Certificate
While it is not possible without TLS extensions to serve different certificates for a single IP (See here on how to setup apache on Debian for TLS extensions.) it is possible to have a single certificate that works with any number of hostnames.  I&#8217;m not talking about a wildcard certificate [...]]]></description>
			<content:encoded><![CDATA[<h2>Multiple Names on One Certificate</h2>
<p>While it is not possible without TLS extensions to serve different certificates for a single IP (See <a href="http://www.howtoforge.com/enable-multiple-https-sites-on-one-ip-using-tls-extensions-on-debian-etch">here</a> on how to setup apache on Debian for TLS extensions.) it is possible to have a single certificate that works with any number of hostnames.  I&#8217;m not talking about a wildcard certificate but a certificate that allows completely different hostnames to be valid for a single certificate.  For example www.foo.<span style="font-weight: bold">com</span> and www.foo.<span style="font-weight: bold">org</span> can share a certificate.  This approach would not be appropriate except in certain circumstances.  You wouldn&#8217;t want to have two different customers using the same certificate but a single customer may wish to use one certificate for all of their domains.  Both Internet Explorer and Firefox honor certificates of this type.  From what I read some Java SSL libraries do not handle this type of certificate properly but Java was the only exception.</p>
<p>x509 certificates, those that are served in SSL communications, offer a feature known as <span style="font-style: italic">Subject Altnerative Names</span>.  A subject Alternative Name is an attribute that lists an alternate name for the subject of the certificate (that&#8217;s oddly fitting isn&#8217;t it?).  In a web context that subject is the hostname.  However it&#8217;s not just hostnames that can be an alternative subject.  Email is an option as is IP addresses.</p>
<p>The first step is to create a CSR (certificate signing request) that contains the subject alternative names that you desire for your certificate.  I will show how to do that using openssl.  You will likely need to modify the default <span style="font-style: italic">openssl.cnf</span> file.  In Debian this is located in <span style="font-style: italic">/etc/ssl/openssl.cnf</span>.  Note that you may prefer to make modifications to a local copy and tell openssl to use your locally modified copy using the <span style="font-style: italic">-config</span> option.  For simplicity I will omit <span style="font-style: italic">-config localopenssl.cnf</span> from my examples.</p>
<h2>Config File Settings</h2>
<p>You need to tell openssl to create a CSR that includes x509 V3 extensions and you also need to tell openssl to include a list of subject alternative names in your CSR.  In my openssl.cnf I have the following:</p>
<p>In the <span style="font-style: italic">[req]</span> section</p>
<div class="codeblock">
<pre>[req]
req_extensions = v3_req</pre>
</div>
<p>In the <span style="font-style: italic">v3_req</span> section:</p>
<div class="codeblock">
<pre>[ v3_req ]

# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment

# Some CAs do not yet support subjectAltName in CSRs.
# Instead the additional names are form entries on web
# pages where one requests the certificate...
subjectAltName          = @alt_names

[alt_names]
DNS.1   = www.foo.com
DNS.2   = www.foo.org</pre>
</div>
<h2>Generating the CSR</h2>
<p>Then the CSR is generated using:</p>
<div class="codeblock">
<pre>$ openssl req -new -out $CSR_FILENAME -key $KEY_FILE</pre>
</div>
<p>To check to see if you got everything correct use:</p>
<div class="codeblock">
<pre>$ openssl req -text -noout -in $CSR_FILENAME</pre>
</div>
<p>You should see something similar to this:</p>
<div class="codeblock">
<pre>        Attributes:
        Requested Extensions:
            X509v3 Basic Constraints:
                CA:FALSE
            X509v3 Key Usage:
                Digital Signature, Non Repudiation, Key Encipherment
            X509v3 Subject Alternative Name:
                DNS:www.foo.com, DNS:www.foo.org</pre>
</div>
<h2>Creating the Certificate</h2>
<p>Now you must have a CA (certificate authority) create a signed certificate based on the information provided in your request.  Unfortunately most CA software will not honor the subject alternative names in a CSR by default.  In the case of the certificate signing tools from Microsoft in Windows 2003 you can tell it to honor subject alternative names using the following:</p>
<div class="codeblock">
<pre>certutil -setreg policy\EditFlags +EDITF_ATTRIBUTESUBJECTALTNAME2
net stop certsvc
net start certsvc</pre>
</div>
<p>For openssl you need to use a policy that allows subject alternative names.  I believe the policy named <span style="font-style: italic">policy_anything</span> in the default openssl.cnf file will work.  To use that policy:</p>
<div class="codeblock">
<pre>$ openssl ca -policy policy_anything -in $CSR_FILENAME -out $CERT_FILENAME</pre>
</div>
<p>Finally to test that your certificate was created correctly use the following:</p>
<div class="codeblock">
<pre>$ openssl x509 -text -noout -in $CERT_FILENAME</pre>
</div>
<p>You should see something like this:</p>
<div class="codeblock">
<pre> X509v3 extensions:
            X509v3 Basic Constraints: critical
                CA:FALSE
            X509v3 Key Usage:
                Digital Signature, Key Encipherment
            X509v3 Subject Alternative Name:
                DNS:www.foo.org DNS:www.foo.org</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/01/08/creating-a-certificate-with-multiple-hostnames/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New tcl-dox Released</title>
		<link>http://therowes.net/~greg/2008/01/07/new-tcl-dox-released/</link>
		<comments>http://therowes.net/~greg/2008/01/07/new-tcl-dox-released/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 20:21:53 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://therowes.net/~greg/2008/01/07/new-tcl-dox-released/</guid>
		<description><![CDATA[A new version of tcl-dox has been released.  It fixes a bug in the handling of comments inside proc bodies.  Special thanks to Michele Joyce for reporting the bug.  The latest version is 0.7.
]]></description>
			<content:encoded><![CDATA[<p>A new version of tcl-dox has been released.  It fixes a bug in the handling of comments inside proc bodies.  Special thanks to Michele Joyce for reporting the bug.  The latest version is <a href="http://therowes.net/%7Egreg/download/tcl-doxygen-filter/tcl-dox-0.7.tar.gz">0.7</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/01/07/new-tcl-dox-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SPDIF with VIA M10000 and MythTV</title>
		<link>http://therowes.net/~greg/2008/01/01/spdif-with-via-m10000-and-mythtv/</link>
		<comments>http://therowes.net/~greg/2008/01/01/spdif-with-via-m10000-and-mythtv/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 23:49:40 +0000</pubDate>
		<dc:creator>greg</dc:creator>
		
		<category><![CDATA[Geek]]></category>

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

		<guid isPermaLink="false">http://therowes.net/~greg/2008/01/01/spdif-with-via-m10000-and-mythtv/</guid>
		<description><![CDATA[This spring I finally bought a modern receiver.  My new receiver, like nearly all modern receivers, has multiple digital inputs.  My Myth frontend machine is based on a VIA M10000 board which has a SPDIF (digital) output.  There are a lot of reasons to use a digital output.  One is that [...]]]></description>
			<content:encoded><![CDATA[<p>This spring I finally bought a modern receiver.  My new receiver, like nearly all modern receivers, has multiple digital inputs.  My Myth frontend machine is based on a VIA M10000 board which has a SPDIF (digital) output.  There are a lot of reasons to use a digital output.  One is that I suspect the digital to analog converters in the receiver are much higher quality than the cheap on-board ones found in most computer systems.  Also if you watch DVDs or HDTV through Myth you can get Dolby Digital (AC3) and DTS multi-channel audio.  I personally do not use MythTV for DVD watching nor for HDTV (without transcoding which trashes the AC3 audio stream) but I still wanted to use the digital audio output.</p>
<p>The basic setup steps are:</p>
<ol>
<li>Identify the correct jumper settings to enable SPDIF output on the VIA M10000.</li>
<li>Test digital audio connection using basic ALSA tools.</li>
<li>Setup MythTV to use SPDIF output device.</li>
<li>Setup alsa to re-sample audio to 48000Hz.</li>
</ol>
<p><span id="more-72"></span></p>
<ol></ol>
<h2>Jumper Setting</h2>
<p>I remember when I originally built the frontend that there was a jumper that allowed you to select between SPDIF and Composite Video for the RCA style jack on the back of the board.  I consulted the manual and set the jumper accordingly.  Next I hit the net to learn what I needed to do to get the SPDIF output working.  Try as I might the receiver would never output a peep.  It didn&#8217;t even detect a digital connection.  In desperation I set the jumper the <em>opposite</em> of what the manual said I should do for SPDIF.  That worked.  The version of the manual that I have for the M10000 is wrong.  Don&#8217;t set the jumper based on your manual.  Instead look at the printing on the circuit board.  On mine one of the jumpers is marked as the SPDIF setting.</p>
<h2>Testing Digital Connection</h2>
<p>Since Myth, like any app, relies on the OS for sound output it makes sense to get the sound working using simpler tools before attempting to get it working correctly in Myth.  ALSA includes a really handy tool called <em>speaker-test</em> that you can use to test your setup.  This tool is found in the package <em>alsa-utils</em> on Debian systems.  It generates a pink-noise signal alternating between channels.  You can tell it the number of channels to generate.  When it outputs to a channel it prints to stdout where it is sending audio to so you can be sure that you have everything wired correctly.  You can also tell it what audio device to direct output to.</p>
<p>This is the command I used to test my connection:</p>
<div class="codeblock">
<pre>speaker-test --channels 2 --device ALSA:iec958 --rate 48000</pre>
</div>
<h2>Setting up MythTV for SPDIF Output</h2>
<p>Setting up MythTV for SPDIF output is pretty simple.  All you have to do is tell MythTV what ALSA device to direct audio to.  There&#8217;s almost nothing beyond that (well there is, see the next section).  This setting for Myth is on the third page of the <em>general</em> setup section.  The SPDIF output for the VIA M10000 with a default ALSA configuration is <span style="font-style: italic">ALSA:cards.pcm.iec958</span>.  You can determine what ALSA devices are availble using the command <span style="font-style: italic">aplay -L</span>.  Apparently iec958 is a spec that means SPDIF.  You will have to type this in it is not automatically populated in the drop down box.</p>
<p>You should enable pass-through for DTS and AC3 so that if you watch sources with multi-channel audio your receiver will be able to play it.  I don&#8217;t use Myth to watch DVDs or HDTV content but if I did I&#8217;d be extremely happy using this option!</p>
<p>If you use MythVideo with mplayer you may need or want to change your configuration to tell mplayer to use the correct output device, to do AC3 and DTS passthrough, and to resample the audio (possible).  I found that mplayer would play videos and audio too quickly.  This is because, apparently, it uses the sound card driver for timing.  The videos had 44100 Hz sampling but the audio driver in the M10000 runs only at 48000 Hz.  This results in a chipmunk effect.  You can force mplayer to resample to 48000 Hz by specifying <span style="font-style: italic">-srate 48000</span>.  This step isn&#8217;t strictly necessary if you have resampling done by ALSA (see the next section).  An example configuration is <span style="font-style: italic">mplayer -ao alsa:device=cards.pcm.iec958 -ac hwac3 -srate 48000</span>.</p>
<h2>Configuring ALSA to Re-sample audio to 48000Hz</h2>
<p>The sound hardware in the Epia M10000 board from VIA supports only 48Khz output on the SPDIF output.  This can be frustrating as software playing back 44.1 Khz audio or other sampling rates will be played back too fast.  Luckily there is a way to have ALSA resample all of the audio.  This will result in a loss of fidelity but I can&#8217;t tell the difference.</p>
<p>I created a file  ~mythtv/.asoundrc.  You could also, and probably more appropriately put this in /etc/asound.conf.  Inside the file is:</p>
<div class="codeblock">
<pre>
pcm.!default {
        type plug
        slave.pcm "cards.pcm.iec958"
        slave {
                pcm "cards.pcm.iec958"
                rate 48000
        }
}</pre>
</div>
<p>I believe this instructs ALSA to resample all audio coming into ALSA:default to 48000 Hz and direct it to the ALSA device cards.pcm.iec958 (the SPDIF output).  I find the confiuration syntax to be very cryptic.  In particular, if my interpretation is correct, then I&#8217;m perplexed by &#8220;!default&#8221; as I would normally interpret that as &#8220;not default.&#8221;</p>
<p>If you use this technique be sure to change the Myth audio settings to use <span style="font-style: italic">ALSA:default</span> as the output device.  Once you do this playback in Myth will be correct.  You can also instruct mplayer and other ALSA capable software to use this device and playback should be correct.</p>
<h3>References</h3>
<p>I had a lot of help getting this to work.</p>
<ul>
<li><a href="http://www.mythtv.org/wiki/index.php/Configuring_Digital_Sound">MythTV Wiki:Configuring Digital Sound (This is a great resource)</a></li>
<li><a href="http://www.mythtv.org/wiki/index.php/Configuring_Digital_Sound_with_AC3_and_SPDIF">MythTV Wiki:Configuring Digital Sound with AC3 and SPDIF</a></li>
<li><a href="http://radagast.bglug.ca/epia/epia_howto/index.html">EPIA Linux Howto</a> (specifically the entire section on audio)</li>
<li><a href="http://alsa.opensrc.org/index.php/Via8233">ALSA Wiki:VIA8233</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://therowes.net/~greg/2008/01/01/spdif-with-via-m10000-and-mythtv/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.171 seconds -->
