<?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>You can imagine where it goes from here. &#187; Unix</title>
	<atom:link href="http://www.kgarner.com/blog/archives/category/geek/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kgarner.com/blog</link>
	<description>Keith&#039;s attempts to fix the cable of life</description>
	<lastBuildDate>Sun, 01 Jan 2012 20:27:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Thanks, Steve</title>
		<link>http://www.kgarner.com/blog/archives/2011/10/05/thanks-steve/</link>
		<comments>http://www.kgarner.com/blog/archives/2011/10/05/thanks-steve/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 01:43:10 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Omphaloskepsis]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Apple TV]]></category>
		<category><![CDATA[Dinah]]></category>
		<category><![CDATA[Doom]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[mac mini]]></category>
		<category><![CDATA[NeXT]]></category>
		<category><![CDATA[Pixar]]></category>
		<category><![CDATA[RIP]]></category>
		<category><![CDATA[Steve Jobs]]></category>
		<category><![CDATA[Time Capsule]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/?p=2259</guid>
		<description><![CDATA[Steve Jobs passed away today at age 56 after a battle with cancer.  Here&#8217;s a few random thoughts&#8230; On this day, I own a buttload of Apple gear: iPhone, iPod, iPad, MacBook Pro, Apple TV, Apple TV 2, Time Capsule, Mac Mini&#8230; I&#8217;m planning on getting an iPhone 4S as soon as possible. I was [...]]]></description>
			<content:encoded><![CDATA[<p>Steve Jobs passed away today at age 56 after a battle with cancer.  Here&#8217;s a few random thoughts&#8230;</p>
<p>On this day, I own a buttload of Apple gear: iPhone, iPod, iPad, MacBook Pro, Apple TV, Apple TV 2, Time Capsule, Mac Mini&#8230; I&#8217;m planning on getting an iPhone 4S as soon as possible.</p>
<p>I was (and am) a big open source dork at heart, but Apple&#8217;s simplicity and ease of use, especially the past 7 years really spoke to the pragmatic side of me.  It turned me into a fan boy, I guess.  It didn&#8217;t hurt that OS X is NeXTStep is UNIX&#8230; I touch OS X and Linux every day.</p>
<p>One of Dinah&#8217;s first words was iPod which she taught herself so she could ask me to turn on music for her.</p>
<p>In college, I loved using the <a href="http://en.wikipedia.org/wiki/NeXT">NeXT</a> computers we had. My first class in college used <a href="http://en.wikipedia.org/wiki/Scheme_(programming_language)">scheme</a> on the NeXT&#8217;s. The NeXT is one of the first places I played Doom.  I took calculus using Mathematica on the Mac in college.</p>
<p>Steve also touched my kids&#8217; lives via Pixar. (Okay, my life too, I saw Toy Story in the theater first run, long before I had kids.) Also through their first computer, a Mac Mini.</p>
<p>There were too other public figures who&#8217;s lives and deaths touched me the way Steve&#8217;s passing is touching me today: Jim Henson and Fred Rodgers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2011/10/05/thanks-steve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tivo2Podcast update</title>
		<link>http://www.kgarner.com/blog/archives/2010/03/14/tivo2podcast-update/</link>
		<comments>http://www.kgarner.com/blog/archives/2010/03/14/tivo2podcast-update/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 18:41:37 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TiVo2Podcast]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[bonjour]]></category>
		<category><![CDATA[dns-sd]]></category>
		<category><![CDATA[encap]]></category>
		<category><![CDATA[mdns]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[stow]]></category>
		<category><![CDATA[tivo]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/?p=842</guid>
		<description><![CDATA[I&#8217;ve made a few updates since my last release a few weeks ago. I thought I&#8217;d toss an updated version out there.  What&#8217;s new in this version: Duration is no longer hard-coded to 32:00 and actually reflects the duration of the show The script will attempt to find the TiVo via Bonjour/mDNS/ZeroConf/DNS-SD/whatever unless passed a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made a few updates since my <a href="http://www.kgarner.com/blog/archives/2010/03/04/tivo-video-podcast/">last release</a> a few weeks ago.  I thought I&#8217;d toss an updated version out there.  What&#8217;s new in this version:</p>
<ul>
<li>Duration is no longer hard-coded to 32:00 and actually reflects the duration of the show</li>
<li>The script will attempt to find the TiVo via <a href="http://en.wikipedia.org/wiki/Bonjour_%28software%29">Bonjour</a>/<a href="http://www.multicastdns.org/">mDNS</a>/ZeroConf/<a href="http://www.dns-sd.org/">DNS-SD</a>/whatever unless passed a -t flag with the TiVo&#8217;s IP address. If you have more than one TiVo, it will go with the first one it finds.</li>
<li>Moved the stuff in <code>lib</code> to <code>lib/tivo</code> so the package is more easier sucked in by something like <a href="http://encap.org/">encap</a> or <a href="http://www.gnu.org/software/stow/">stow</a></li>
</ul>
<p>Download: <a href="http://www.kgarner.com/blog/wp-content/tivoscripts-20100314.tar.gz">tivoscripts-20100314.tar.gz</a></p>
<p>When I get some motivation later in the week, I&#8217;ll put the git archive online, incase anyone wants to clone it and do some development on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2010/03/14/tivo2podcast-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TiVo -&gt; Video Podcast</title>
		<link>http://www.kgarner.com/blog/archives/2010/03/04/tivo-video-podcast/</link>
		<comments>http://www.kgarner.com/blog/archives/2010/03/04/tivo-video-podcast/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 05:15:23 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Podcasts]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TiVo2Podcast]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[AtomicParsley]]></category>
		<category><![CDATA[HandBrake]]></category>
		<category><![CDATA[placeshifting]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tivo]]></category>
		<category><![CDATA[tivodecode]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/?p=832</guid>
		<description><![CDATA[Previously on &#8220;You can imagine where it goes from here&#8221;: We released a script to download stuff from the tivo, and then made some improvements to it. After two years of saying I was going to fully automate the process of downloading and transcoding shows for my iPhone, I finally got off my ass and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Previously on &#8220;You can imagine where it goes from here&#8221;:</strong> We <a href="http://www.kgarner.com/blog/archives/2007/11/15/place-shifting-action-2/">released a script to download stuff from the tivo</a>, and then <a href="http://www.kgarner.com/blog/archives/2008/03/20/place-shifting-action-3-revenge-of-the-sith/">made some improvements to it</a>.</p>
<p>After two years of saying I was going to fully automate the process of downloading and transcoding shows for my iPhone, I finally got off my ass and did it.  The script is called TiVo2Podcast and it not only does the downloading and transcoding, but it stuffs the resultant video into a an RSS feed for easy consumption/playback by a podcatcher such as iTunes.  I&#8217;m now automatically getting the shows off my TiVo and onto my iPhone for easy commute-time consumption.  (I commute by train, I do not recommend commute-time consumption if you are driving.)</p>
<p>The ruby script wraps <a href="http://tivodecode.sourceforge.net/">tivodecode</a>, <a href="http://handbrake.fr/">HandbrakeCLI</a>, and <a href="http://atomicparsley.sourceforge.net/">AtomicParsley</a> and is intended to be run from cron.  I&#8217;ve tested this on Linux, but it should run on any UNIX-alike, but it won&#8217;t run on windows since I make liberal use of the <code>system()</code> call.  Also, this is intended for PERSONAL USE ONLY, do not set up podcast feeds and violate the ethics (and also the laws) of copyright left and right.</p>
<p>This is a very early version and can certainly use some tweaks and enhancements, primarily in configuring the shows you want to capture.  Right now, configuration is in the form of doing INSERT statements in SQLite.  Not very friendly, but it gets the job done until I can make a quick and dirty question based TUI.  Here&#8217;s an example of setting up getting the best fucking news team on the planet:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p832code2'); return false;">View Code</a> SQL</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8322"><td class="code" id="p832code2"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">insert</span> <span style="color: #993333; font-weight: bold;">into</span> configs <span style="color: #66cc66;">&#40;</span>config_name<span style="color: #66cc66;">,</span> show_name<span style="color: #66cc66;">,</span> rss_filename<span style="color: #66cc66;">,</span> rss_link<span style="color: #66cc66;">,</span>
                     rss_baseurl<span style="color: #66cc66;">,</span> rss_ownername<span style="color: #66cc66;">,</span> rss_owneremail<span style="color: #66cc66;">,</span> ep_to_keep<span style="color: #66cc66;">,</span> encode_decomb<span style="color: #66cc66;">&#41;</span>
            <span style="color: #993333; font-weight: bold;">values</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'tds'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'The Daily Show'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'tds.xml'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.thedailyshow.com/'</span><span style="color: #66cc66;">,</span> 
                    <span style="color: #ff0000;">'http://example.com/podcasts/'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Keith T. Garner'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'kgarner@example.com'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Download <a href="http://www.kgarner.com/blog/wp-content/tivoscripts-20100304.tar.gz">tivoscripts-20100304.tar.gz</a> and let me know what you think.  Make sure you read the README!</p>
<p>[<strong>Update 3/5:</strong> <em>Forgot to add that all the code I wrote is under the <a href="http://en.wikipedia.org/wiki/BSD_licenses#2-clause_license_.28.22Simplified_BSD_License.22_or_.22FreeBSD_License.22.29">Simplified BSD License</a>, so have at it.</em>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2010/03/04/tivo-video-podcast/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fix/Tricks for plugin auto-update on WordPress 2.5</title>
		<link>http://www.kgarner.com/blog/archives/2008/03/31/fix-tricks-for-plugin-auto-update-on-wordpress-25/</link>
		<comments>http://www.kgarner.com/blog/archives/2008/03/31/fix-tricks-for-plugin-auto-update-on-wordpress-25/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 16:47:09 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/?p=453</guid>
		<description><![CDATA[[READ THIS FIRST!!!  Update 6/13/2009: If you've come here looking to get plugin updates to work and you're using WordPress 2.8, you really want to start with this more recent post on the topic and then come back for the permission information.] One of the neat features of WordPress 2.5 is the click to install [...]]]></description>
			<content:encoded><![CDATA[<p>[<strong>READ THIS FIRST!!!  Update 6/13/2009</strong>: <em>If you've come here looking to get plugin updates to work and you're using WordPress 2.8, you really want to start with this <a href="http://www.kgarner.com/blog/archives/2009/06/13/direct-auto-update-on-wordpress-2-8/">more recent post</a> on the topic and then come back for the permission information.</em>]</p>
<p>One of the neat features of WordPress 2.5 is the click to install plugin upgrades, assuming the plugin is registered in the <a href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a>.  If certain conditions are correct on the server it can do it in place, otherwise it tries to do it via FTP.</p>
<p>To make it so wordpress could upgrade them on the server without FTP requires doing some permission changes.  You should be aware, the changes I made allow the web server (Apache) to be able to write to the plugin directory.  This creates some security exposure.  Since I do nightly backups, for me this is an acceptable risk.  You may make a different call.</p>
<p>The way I&#8217;ve done it also assumes you have admin rights on the unix box or you&#8217;re friendly with (s)he who does.  Without admin rights to do the group ownership changes, you&#8217;re stuck having to make files writable by the world, and that&#8217;s not something I&#8217;d do.  Luckily, I hold the power on the box(es) I care about.<span id="more-453"></span></p>
<p>The changes I made were as follows:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p453code8'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4538"><td class="code" id="p453code8"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chgrp</span> <span style="color: #660033;">-R</span> apache wp-content<span style="color: #000000; font-weight: bold;">/</span>plugins
<span style="color: #c20cb9; font-weight: bold;">find</span> wp-content<span style="color: #000000; font-weight: bold;">/</span>plugins <span style="color: #660033;">-type</span> d <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> g+ws
<span style="color: #c20cb9; font-weight: bold;">find</span> wp-content<span style="color: #000000; font-weight: bold;">/</span>plugins <span style="color: #660033;">-type</span> f <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> g+<span style="color: #c20cb9; font-weight: bold;">w</span></pre></td></tr></table></div>

<p>After doing that, I fired off upgrading the <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">google-sitemap-generator</a> plugin, as that was out of date.  It brought me to a screen asking for FTP information, which means the server-side update failed.  That sent me to the code.  After walking the code I found two things:</p>
<ol>
<li>Without <code>WP_TEMP_DIR</code> specified in your config, the upgrade will use wp-content as a temp directory.</li>
<li>A bug/feature of the code that prevents it from work.</li>
</ol>
<p>To get around #1, I defined <code>WP_TEMP_DIR</code> in my wp-config so it looked like this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p453code9'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4539"><td class="code" id="p453code9"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_TEMP_DIR'</span><span style="color: #339933;">,</span> ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'wp-content/tmp'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I then created a tmp directory and set its permissions inline with what I have above.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p453code10'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45310"><td class="code" id="p453code10"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> wp-content<span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">chgrp</span> apache wp-content<span style="color: #000000; font-weight: bold;">/</span>tmp
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">2775</span> wp-content<span style="color: #000000; font-weight: bold;">/</span>tmp</pre></td></tr></table></div>

<p>As I called #2 above, I&#8217;m not sure if its a bug or a feature.  One of the sanity checks that wordpress does to see if it can do the update is to make sure it can write into the temp directory and if the current process owns the resultant file.  I&#8217;m thinking its a bug because it looks like they expected the PHP function call used to be reasonable rather than suffer from the occasional brain-dead PHPism.</p>
<p>The sanity check uses <a href="http://us.php.net/manual/en/function.getmyuid.php"><code>getmyuid()</code></a> which anyone with unix coding experience would assume its the user id of the running process.   Not so!  If you read the PHP documentation, it actually returns the UID of who owns the script file.  Since my user owns the file, but the script is being executed by apache&#8217;s user, it ends up returning the wrong information.  In reading the code, and guessing its intent, what they actually wanted to use was either <a href="http://us.php.net/manual/en/function.posix-getuid.php"><code>posix_getuid()</code></a> or <a href="http://us.php.net/manual/en/function.posix-geteuid.php"><code>posix_geteuid()</code></a>. Once I switched to using posix_getuid() everything worked as expected.</p>
<p>To make this change, open up wp-admin/includes/file.php in your editor of choice and go to somewhere around line 323.  You&#8217;ll want to change the line that looks like this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p453code11'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45311"><td class="code" id="p453code11"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">getmyuid</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #990000;">fileowner</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tempFile</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>To look something like this:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p453code12'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p45312"><td class="code" id="p453code12"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">posix_getuid</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #990000;">fileowner</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tempFile</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>And boom, I have working click to upgrade for plugins.</p>
<p>As a note, I have no idea if this will work on Windows or not as I&#8217;m not up with the permissions there or if the <code>posix_</code> functions are available on that platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2008/03/31/fix-tricks-for-plugin-auto-update-on-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Place shifting action</title>
		<link>http://www.kgarner.com/blog/archives/2007/11/15/place-shifting-action/</link>
		<comments>http://www.kgarner.com/blog/archives/2007/11/15/place-shifting-action/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 23:07:34 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2007/11/15/place-shifting-action/</guid>
		<description><![CDATA[I&#8217;ve whipped up a quick ruby script that wraps ffmpeg to turn anything ffmpeg understand into something suitable for watching on an iPhone. It&#8217;ll work for a normal iPod too, probably, but I&#8217;ve got it fully keyed to the resolution of the iPhone. Download it and check it out. (Fear my non-twitter content!)]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve whipped up a quick ruby script that wraps ffmpeg to turn anything ffmpeg understand into something suitable for watching on an iPhone.  It&#8217;ll work for a normal iPod too, probably, but I&#8217;ve got it fully keyed to the resolution of the iPhone.</p>
<p><a href="http://www.kgarner.com/code/iPhone-transcode.rb">Download it</a> and check it out.</p>
<p>(Fear my non-twitter content!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2007/11/15/place-shifting-action/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preach on (about SSH,) Brother Dave</title>
		<link>http://www.kgarner.com/blog/archives/2007/08/21/preach-on-about-ssh-brother-dave/</link>
		<comments>http://www.kgarner.com/blog/archives/2007/08/21/preach-on-about-ssh-brother-dave/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 16:35:48 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2007/08/21/preach-on-about-ssh-brother-dave/</guid>
		<description><![CDATA[Dave Dribin wrote up a nice post about people breaking some of the first &#8216;s&#8217; in ssh and how that annoys him and ways to get around it. Its really a good read and really hammers home the point of using ssh-agent, which Dave initially exposed me to. Being able to ssh around without typing [...]]]></description>
			<content:encoded><![CDATA[<p><img class="colorbox-318"  src="http://www.kgarner.com/blog/wp-content/uploads/2007/08/openssh.thumbnail.png" title="openssh.png" alt="openssh.png" align="right" />Dave Dribin wrote up a nice post about <a href="http://www.dribin.org/dave/blog/archives/2007/08/21/ssh_agent/">people breaking some of the first &#8216;s&#8217; in ssh</a> and how that annoys him and ways to get around it.  Its really a good read and really hammers home the point of using ssh-agent, which Dave initially exposed me to.  Being able to ssh around without typing my password each time was something I was missing back from when I had <a href="http://www.ssh.com/support/documentation/online/ssh/adminguide/32/Kerberos_Authentication.html">kerberized ssh</a> back at <a href="http://www.news.uiuc.edu/ii/07/0802/domain.html">UIUC.  Er..Illinois.edu.</a></p>
<p>While I agree with Dave about the empty password thing, one thing you can do in your .ssh/authorized_keys file is lock down a key to a specific IP and to a specific command.  So, while you may have a passwordless ssh access, you can somewhat mitigate the risk by locking down what they can can do.  For example, with a key truncated because it is long:</p>
<blockquote><p>from=&#8221;192.168.33.22&#8243;,command=&#8221;/usr/bin/uptime&#8221; ssh-rsa AAA&#8230;</p></blockquote>
<p>With this addition in the authorized_keys section, a user with this key from 192.168.33.22 will only be able to execute /usr/bin/uptime.  For more information on that and other options you can use, see the AUTHORIZED_KEYS FILE FORMAT section of the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sshd">sshd(8) man page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2007/08/21/preach-on-about-ssh-brother-dave/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CMake so far</title>
		<link>http://www.kgarner.com/blog/archives/2007/03/27/cmake-so-far/</link>
		<comments>http://www.kgarner.com/blog/archives/2007/03/27/cmake-so-far/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 16:10:07 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2007/03/27/cmake-so-far/</guid>
		<description><![CDATA[I&#8217;ve been investigating cmake at work as a better build system for our cross platform C based projects. I&#8217;m thinking about starting up a third one, so now is the prefect time to really go after this as for one project we have a build system per platform and on the other we have two [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been investigating <a href="http://www.cmake.org/">cmake</a> at work as a better build system for our cross platform C based projects.  I&#8217;m thinking about starting up a third one, so now is the prefect time to really go after this as for one project we have a build system per platform and on the other we have two build systems.  When you mix in wanting to make universal binaries on OS X its yet another wrinkle.  cmake was recently chosen by KDE to be the <a href="https://lwn.net/Articles/188693/">build system for KDE4</a> since KDE4 will be fully supporting Windows and OS X, as well as the other unicies via X.  I used a small convenience library as the test piece as it was only two files big, but it had the requirement of at least two external libraries.</p>
<p>Some pros for cmake that I&#8217;ve found so far (compared to what we&#8217;ve been doing):</p>
<ul>
<li>support a big number of build environments on the different platforms.  On windows it sports 11 different build environments, OS X 3, and Linux 2.  For OS X and Linux, you only really need those two or three, but on windows it supports 4 different versions of visual studio as well as Borland, Watcom, and gcc.</li>
<li>Takes care of the flags needed to build executables and libraries on those supported platforms.</li>
<li>Does out of source builds on windows.</li>
<li>Tracks dependences on all platforms without an external application</li>
<li>Does search and replacing on things like .in files without having to call out to external applications</li>
</ul>
<p>Some cons I&#8217;ve found so far:</p>
<ul>
<li>The <a href="http://cmake.org/HTML/Documentation.html">documentation on the web page</a> is pretty horrid.  <a href="http://www.kitware.com/products/cmakebook.html">The book</a> is pretty bad too, especially when compared to other technical books I&#8217;ve read recently, but its much better than the website.  When combined with the book and experimentation, the <a href="http://www.kitware.com/products/cmakebook.html">FAQ</a> is helpful.</li>
<li><a href="http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F">Doesn&#8217;t really have the concept of convenience libraries.</a>  This will result in common files being built multiple times.  I don&#8217;t like this, but its not fatal.</li>
<li>The CMakeCache is getting in my way more than being a help, but that might be the side effect of my learning process right now.</li>
<li>I haven&#8217;t yet figured out how to make it query the person compiling the app if it can&#8217;t find something.  This may not be possible.  At the very least I want to make it bitch and bomb out if a required dependency isn&#8217;t there.  I just haven&#8217;t found it yet, I&#8217;m thinking.</li>
</ul>
<p>This isn&#8217;t an exhaustive review yet, but I wanted to get down what was in my mind before I forgot.  I had just found the convenience library thing and that&#8217;s what inspired the post.  My next step is to move a full existing project over to being built with cmake.  This is a library that depends on <a href="http://expat.sourceforge.net/">expat</a>, <a href="http://boost.org/">boost</a>, <a href="http://curl.haxx.se/">curl</a>, <a href="http://www.antlr.org/">antlr</a>, and (optionally) <a href="http://www.swig.org/">swig</a>.  Should be a good challenge.</p>
<p>[<strong>Update 11:58</strong>: <em>I found an answer to my "<a href="http://tools.devchannel.org/devtoolschannel/04/03/14/0252233.shtml?tid=46">bomb out if the dependencies are missing</a>" question.  Thanks, devchannel!</em>]</p>
<p>[<strong>Update 2:51:</strong>  <em>No this isn't here just for g0ff.  Turns out the latest cmake has modules to Find Java, Doxygen, Boost, Curl, Expat, and Swig already.  It looks like just custom items for antlr and cppunit will be needed.  Also, it only ever wants to link against dynamic libraries, not static ones.  That's a PITA.</em>]</p>
<p>[<strong>Update 5:52</strong>: <em>Okay, the convenience library thing is upsetting.  The output of what I was working on is a static library and there are same example command line tools that link against it.  From my reading of the cmake stuff, I should just include the library source files to the target for the executables being created.  The problem with this is for <strong>n</strong> example programs, I'm compiling librets <strong>n</strong> times.  This doesn't seem very optimal.]</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2007/03/27/cmake-so-far/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zsh word splitting</title>
		<link>http://www.kgarner.com/blog/archives/2006/10/08/zsh-word-splitting/</link>
		<comments>http://www.kgarner.com/blog/archives/2006/10/08/zsh-word-splitting/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 18:24:25 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2006/10/08/zsh-word-splitting/</guid>
		<description><![CDATA[Awhile ago, after I showed him how I indexed my mail with mairix, MARK gave me a zsh function to wrap a call to mairix and then invoke mutt.&#160; For some reason, when using the function, I was never able to pass multiple search terms to mairix and have it return results.&#160; It always failed. [...]]]></description>
			<content:encoded><![CDATA[<p>Awhile ago, after I showed him how I indexed my mail with <a href="http://www.rpcurnow.force9.co.uk/mairix/">mairix</a>, MARK gave me a zsh function to wrap a call to mairix and then invoke mutt.&nbsp; For some reason, when using the function, I was never able to pass multiple search terms to mairix and have it return results.&nbsp; It always failed.</p>
<p>It turns out that this was a zshism that I wasn&#8217;t aware of, and Mark might not have been as well.&nbsp; I finally took the time to get to the bottom of this and I found <a href="http://zsh.dotsrc.org/FAQ/zshfaq03.html#31">this FAQ</a>  which explains how word splitting differs in zsh.&nbsp; (All OTHER shells do it wrong, of course.)&nbsp; In any case, my multiple search terms were being passed to mairix as a single command line argument, so, of course nothing matched.&nbsp; I edit the script to call <code>mairix ${=*}</code> instead of <code>mairix $*</code> and it works now.</p>
<p>MARK might not have run into this because he might have <code>SH_WORD_SPLIT</code> turned on.&nbsp; I do not.</p>
<p>Anyway, here&#8217;s the function:</p>
<p><code>mairix_mail (){<br />
&nbsp;&nbsp;if (( ${#argv} == 0 )); then<br />
&nbsp;&nbsp;&nbsp;&nbsp;# nothing to do<br />
&nbsp;&nbsp;&nbsp;&nbsp;mairix --help<br />
&nbsp;&nbsp;&nbsp;&nbsp;return<br />
&nbsp;&nbsp;fi<br />
&nbsp;&nbsp;# search<br />
&nbsp;&nbsp;mairix ${=*}<br />
&nbsp;&nbsp;# see the results<br />
&nbsp;&nbsp;# assumes results are in ~/Maildir/search_results<br />
&nbsp;&nbsp;mutt -f=search_results<br />
}<br />
alias gm='mairix_mail';</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2006/10/08/zsh-word-splitting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>color grep</title>
		<link>http://www.kgarner.com/blog/archives/2006/05/23/color-grep/</link>
		<comments>http://www.kgarner.com/blog/archives/2006/05/23/color-grep/#comments</comments>
		<pubDate>Tue, 23 May 2006 17:32:54 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2006/05/23/color-grep/</guid>
		<description><![CDATA[Every once in awhile I come across a feature of a piece of software, generally, a small utility that I hadn&#8217;t known about and that shows immediate value.&#160; Today Jon showed me the --color flag for GNU grep.&#160; It uses color to highlight the term you were searching for in the line returned.&#160; For example: [...]]]></description>
			<content:encoded><![CDATA[<p>Every once in awhile I come across a feature of a piece of software, generally, a small utility that I hadn&#8217;t known about and that shows immediate value.&nbsp; Today Jon showed me the <code>--color</code> flag for GNU grep.&nbsp; It uses color to highlight the term you were searching for in the line returned.&nbsp; For example:</p>
<blockquote>
<p>#&nbsp;grep &#8211;color=auto -i metadata todo.txt<br />
<font color="#ff0000">Metadata</font> Functions to Move:<br />
&nbsp;&nbsp;&nbsp;<font color="#ff0000">Metadata</font>View&#8230;Make sure only our indexed items are passed up.</p>
</blockquote>
<p>Its a very simple thing, but one of those that I&#8217;m surpised I haven&#8217;t been using.&nbsp; I know have a shell aliases for that.&nbsp; See the grep documentation for more information.</p>
<p>[<strong>Update 6/2:</strong> <em><a href="http://www.linux.com/">linux.com</a>  has a great article on <a href="http://www.linux.com/article.pl?sid=06/05/19/1920231">GNU grep's new features</a>  which talks about the color.&nbsp; One that I'm particularly expected about is the ability to use Perl-style regular expressions.</em>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2006/05/23/color-grep/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Concatenate PDFs</title>
		<link>http://www.kgarner.com/blog/archives/2006/05/03/concatenate-pdfs/</link>
		<comments>http://www.kgarner.com/blog/archives/2006/05/03/concatenate-pdfs/#comments</comments>
		<pubDate>Wed, 03 May 2006 19:09:47 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2006/05/03/concatenate-pdfs/</guid>
		<description><![CDATA[I often like to print out many web pages to read on the train.&#160; To not waste paper I like to print them 2 up and double sided.&#160; If the printer supports it, I also like to staple the pages.&#160; On Linux, I use Firefox to print to postscript, then used a2ps to have the [...]]]></description>
			<content:encoded><![CDATA[<p>I often like to print out many web pages to read on the train.&nbsp; To not waste paper I like to print them 2 up and double sided.&nbsp; If the printer supports it, I also like to staple the pages.&nbsp; On Linux, I use Firefox to print to postscript, then used <a href="http://www.inf.enst.fr/~demaille/">a2ps</a>  to have the PS files combined, 2-uped, and short-side duplexed.&nbsp; I&#8217;d then manually staple it, as there was no good way to tell the print center at work to staple it.&nbsp; I&#8217;d use a command line similar to this:</p>
<blockquote>
<p><code>a2ps -Eps -Afill -stumble 1.ps 2.ps 3.ps 4.ps</code></p>
</blockquote>
<p>I tried this approach under OS X, but the problem is that the postscript that is generated on OS X is so detailed that it takes forever to process to print out, on the order of 2 minutes of processing per article.&nbsp; Since PDF is the spooling format for printing in OS X (<a href="http://www.linux.com/article.pl?sid=06/04/18/2114252">coming soon to linux</a>) I thought I&#8217;d look to see if there was an easy way to concatinate PDF files so I could then have the regular printing interface (via Preview) handle the 2-up, double-sided, stapling goodness.</p>
<p>After much searching around I found <a href="http://www.macosxhints.com/article.php?story=20020714102702896">this article</a>  and later <a href="http://ansuz.sooke.bc.ca/software/pdf-append.php">this web page</a>.&nbsp; Combining a bit from both, I came up with following that works really well in my few days of testing.</p>
<blockquote>
<p><code>texexec --pdf --paper=letter --pdfarrange --result all.pdf 1.pdf 2.pdf 3.pdf 4.pdf</code></p>
</blockquote>
<p>It runs really quickly (especially in comparison to the a2ps method) and then I just <code>open all.pdf</code> and print from there.&nbsp; It requires that you have <a href="http://www.tug.org/tetex/">teTeX</a>  installed.&nbsp; On both Linux and OS X I had this installed as part of the prerequesets for <a href="http://www.docbook.org/">docbook</a>  and <a href="http://www.stack.nl/~dimitri/doxygen/">doxygen</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2006/05/03/concatenate-pdfs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Things we have relearned today</title>
		<link>http://www.kgarner.com/blog/archives/2006/01/18/things-we-have-relearned-today/</link>
		<comments>http://www.kgarner.com/blog/archives/2006/01/18/things-we-have-relearned-today/#comments</comments>
		<pubDate>Wed, 18 Jan 2006 06:28:11 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2006/01/18/things-we-have-relearned-today/</guid>
		<description><![CDATA[Regular backups are your friend. Also, if you can&#8217;t normally back something up (i.e. data in open ldap&#8217;s backend) do a regular dump and back that up. rsync/unison/scp data off your co-loc to a local machine, and back it up again, just for good measure. The new drive is the drive most likely to die [...]]]></description>
			<content:encoded><![CDATA[<p>Regular backups are your friend.  Also, if you can&#8217;t normally back something up (i.e. data in open ldap&#8217;s backend) do a regular dump and back that up.</p>
<p>rsync/unison/scp data off your co-loc to a local machine, and back it up again, just for good measure.</p>
<p>The new drive is the drive most likely to die first.</p>
<p>Losing <code>/var</code> really fucking sucks.</p>
<p>Recreating most of the information in ldap out of mail logs is cool, though.</p>
<p>Drinking doesn&#8217;t solve sysadmin nightmares, but it makes you feel good while you&#8217;re having the nightmare.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2006/01/18/things-we-have-relearned-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LEAP</title>
		<link>http://www.kgarner.com/blog/archives/2006/01/01/leap/</link>
		<comments>http://www.kgarner.com/blog/archives/2006/01/01/leap/#comments</comments>
		<pubDate>Mon, 02 Jan 2006 01:51:00 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/archives/2006/01/01/leap/</guid>
		<description><![CDATA[Jan 1 18:00:00 lithium kernel: Clock: inserting leap second 23:59:60 UTC]]></description>
			<content:encoded><![CDATA[<p><code>Jan  1 18:00:00 lithium kernel: Clock: inserting leap second 23:59:60 UTC</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2006/01/01/leap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH files that can bite you in the ass</title>
		<link>http://www.kgarner.com/blog/archives/2005/10/26/ssh-files-that-can-bite-you-in-the-ass/</link>
		<comments>http://www.kgarner.com/blog/archives/2005/10/26/ssh-files-that-can-bite-you-in-the-ass/#comments</comments>
		<pubDate>Wed, 26 Oct 2005 18:50:56 +0000</pubDate>
		<dc:creator>Keith Garner</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.kgarner.com/blog/?p=189</guid>
		<description><![CDATA[Today, I learned about the existence of ~/.ssh/rc and some of its side effects. Today, Dave couldn&#8217;t figure out why he was unable to launch an X application from a machine with both use. We both started looking into it, and it looked like xauth wasn&#8217;t being called to update the .Xauthority file. We spent [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I learned about the existence of <code>~/.ssh/rc</code> and some of its side effects.</p>
<p>Today, Dave couldn&#8217;t figure out why he was unable to launch an X application from a machine with both use.  We both started looking into it, and it looked like <code>xauth</code> wasn&#8217;t being called to update the <code>.Xauthority</code> file.  We spent a good half hour or more looking around trying to figure out if it was a bug in OpenSSH on his mac, or one on the Linux server, if <code>xauth</code> was wonky, or what other small differences there were between his server side environment and mine.</p>
<p>During the search I found <a href="http://lists.debian.org/debian-user/2004/07/msg02291.html">this post</a> on a Debian mailing list.  It was a red herring as it had us investigating a few dead ends.  However, it did point out to my mind the existence of the <code>~/.ssh/rc</code> file.  Up until this point, I didn&#8217;t know of this files existence.  Anyway, while looking in <code>~dave/.ssh/</code> I saw he had such a file.</p>
<p>To quote from the man page:</p>
<blockquote><p><code>     $HOME/.ssh/rc<br />
             Commands in this file are executed by ssh when the user logs in<br />
             just before the user’s shell (or command) is started.  See the<br />
             sshd(8) manual page for more information.</code></p></blockquote>
<p>There was an emacs backup file (<code>rc~</code>) there, which I looked into.  At one time Dave used it to set a <code>umask</code> for all his connections that came in via ssh.  For whatever reason, he must have decided that was not doing what he wanted, so he removed the <code>umask</code> line, but didn&#8217;t remove the file.  Because the file existed, <code>ssh</code> was trying to execute the commands in it, and since there was nothing in it, <code>ssh</code> did nothing and dumped him to a shell.</p>
<p>From the behavior of <code>ssh</code>, it appears there is a &#8220;default&#8221; <code>rc</code> that happens if you don&#8217;t have one or one doesn&#8217;t exist in <code>/etc/ssh</code>.  One of the tasks of this default includes calling <code>xauth</code> if you&#8217;re doing X11 forwarding.  By having an empty file there, Dave was bypassing all of it.  I haven&#8217;t taken the time to see what other side effects came about from that, but there must not have been much, as Dave hadn&#8217;t noticed it since last April (at least according to the mod time on the rc file.)</p>
<p>Dave just IMed me and told me to look at the <code>sshd</code> man page and see the following:</p>
<blockquote><p><code>When a user successfully logs in, sshd does the following:</code><br />
[snip]<br />
<code>           8.   If $HOME/.ssh/rc exists, runs it; else if /etc/ssh/sshrc<br />
                exists, runs it; otherwise runs xauth.  The “rc” files are<br />
                given the X11 authentication protocol and cookie in standard<br />
                input.</code></p></blockquote>
<p>One other thing we learned in this is that <code>xauth</code> is dumb dumb stupid.  <code>xauth</code> won&#8217;t create a <code>.Xauthority</code> file if there is nothing to put into it, such as when you call &#8220;<code>xauth list</code>&#8221; when a file doesn&#8217;t exist.  However, if you do an &#8220;<code>xauth list</code>&#8221; and you don&#8217;t have a <code>.Xauthority</code> file, <code>xauth</code> spits out a diagnostic message saying its creating it.  In reality, it doesn&#8217;t really create the file.  Bad coding on someone&#8217;s part.  This wasted us time, as we though it was <code>xauth</code> that was broken, not Dave&#8217;s ssh environment.  One could argue that <code>xauth</code> <strong>IS</strong> broken by demonstrating this behavior, but that&#8217;s a different rant.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kgarner.com/blog/archives/2005/10/26/ssh-files-that-can-bite-you-in-the-ass/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

