<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Stephan Sokolow's Blog</title>
	
	<link>http://blog.ssokolow.com</link>
	<description>Programming, Linux, Web, and the odd Fiction Review</description>
	<lastBuildDate>Sat, 28 Jan 2012 05:10:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>

	
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ssokolow_blog" /><feedburner:info uri="ssokolow_blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://superfeedr.com/hubbub" /><image><link>http://creativecommons.org/licenses/by-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><item>
		<title>Setting Custom Game Icons in Desura</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/2pAKBHZEZqU/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/28/setting-custom-game-icons-in-desura/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 05:10:09 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1177</guid>
		<description><![CDATA[I just discovered Desura&#8217;s Linux client and, given the opportunity to have a DRM-free package repository system for my Humble Bundle games, I jumped at the chance. Of course, I still wanted to keep all my games together in one &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/28/setting-custom-game-icons-in-desura/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just discovered Desura&#8217;s Linux client and, given the opportunity to have a DRM-free package repository system for my Humble Bundle games, I jumped at the chance.</p>
<p>Of course, I still wanted to keep all my games together in one launcher menu, so I went looking for a way to give the manually installed things like Super Meat Boy proper icons. Luckily, Desura turned out to have a pretty simple approach to specifying icons. Just a couple of columns in an ordinary SQLite database.</p>
<p>Here&#8217;s a little Python script I wrote which, in theory, should let you set/change the icon on ANY game in your Linux Desura library. I&#8217;ve only tested it on local ones though.</p>
<div id="gist-1692707" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">#!/usr/bin/env python</span></div><div class='line' id='LC2'><span class="c"># -*- coding: utf-8 -*-</span></div><div class='line' id='LC3'><span class="sd">&quot;&quot;&quot;Simple script to set icons on locally-installed games in Desura.</span></div><div class='line' id='LC4'><br/></div><div class='line' id='LC5'><span class="sd">--snip--</span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'><span class="sd">Requirements:</span></div><div class='line' id='LC8'><span class="sd">- Python 2.x</span></div><div class='line' id='LC9'><span class="sd">- PyXDG (python-xdg in Ubuntu)</span></div><div class='line' id='LC10'><br/></div><div class='line' id='LC11'><span class="sd">Usage:</span></div><div class='line' id='LC12'><span class="sd">1. Place inside the desura folder</span></div><div class='line' id='LC13'><span class="sd">2. Run `./set_icon.py GameName icon_name_or_path</span></div><div class='line' id='LC14'><br/></div><div class='line' id='LC15'><span class="sd">Examples:</span></div><div class='line' id='LC16'><span class="sd">    ./set_icon.py DOSBox dosbox</span></div><div class='line' id='LC17'><span class="sd">    ./set_icon.py &quot;Super Meat Boy&quot; /usr/share/icons/supermeatboy/32.png</span></div><div class='line' id='LC18'><span class="sd">&quot;&quot;&quot;</span></div><div class='line' id='LC19'><br/></div><div class='line' id='LC20'><span class="n">__appname__</span> <span class="o">=</span> <span class="s">&quot;Desura Game Icon Setter&quot;</span></div><div class='line' id='LC21'><span class="n">__author__</span>  <span class="o">=</span> <span class="s">&quot;Stephan Sokolow (deitarion/SSokolow)&quot;</span></div><div class='line' id='LC22'><span class="n">__version__</span> <span class="o">=</span> <span class="s">&quot;0.1&quot;</span></div><div class='line' id='LC23'><span class="n">__license__</span> <span class="o">=</span> <span class="s">&quot;MIT&quot;</span></div><div class='line' id='LC24'><br/></div><div class='line' id='LC25'><span class="kn">from</span> <span class="nn">urllib</span> <span class="kn">import</span> <span class="n">pathname2url</span></div><div class='line' id='LC26'><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">sqlite3</span><span class="o">,</span> <span class="nn">sys</span></div><div class='line' id='LC27'><br/></div><div class='line' id='LC28'><span class="kn">from</span> <span class="nn">xdg</span> <span class="kn">import</span> <span class="n">IconTheme</span></div><div class='line' id='LC29'><br/></div><div class='line' id='LC30'><span class="n">DESURA_PATH</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">)</span></div><div class='line' id='LC31'><span class="n">DB_PATH</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">DESURA_PATH</span><span class="p">,</span> <span class="s">&#39;.settings/iteminfo_c.sqlite&#39;</span><span class="p">)</span></div><div class='line' id='LC32'><br/></div><div class='line' id='LC33'><span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">DB_PATH</span><span class="p">):</span></div><div class='line' id='LC34'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%s</span><span class="s"> must be placed in the desura folder&quot;</span> <span class="o">%</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">__file__</span><span class="p">))</span></div><div class='line' id='LC35'><br/></div><div class='line' id='LC36'><span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&#39;__main__&#39;</span><span class="p">:</span></div><div class='line' id='LC37'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kn">from</span> <span class="nn">optparse</span> <span class="kn">import</span> <span class="n">OptionParser</span></div><div class='line' id='LC38'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">parser</span> <span class="o">=</span> <span class="n">OptionParser</span><span class="p">(</span><span class="n">version</span><span class="o">=</span><span class="s">&quot;</span><span class="si">%%</span><span class="s">prog v</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">__version__</span><span class="p">,</span></div><div class='line' id='LC39'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">usage</span><span class="o">=</span><span class="s">&quot;%prog &lt;game title&gt; &lt;icon name or path&gt;&quot;</span><span class="p">,</span></div><div class='line' id='LC40'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">description</span><span class="o">=</span><span class="n">__doc__</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s">&#39;</span><span class="se">\r\n</span><span class="s">&#39;</span><span class="p">,</span><span class="s">&#39;</span><span class="se">\n</span><span class="s">&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;</span><span class="se">\n</span><span class="s">--snip--</span><span class="se">\n</span><span class="s">&#39;</span><span class="p">)[</span><span class="mi">0</span><span class="p">])</span></div><div class='line' id='LC41'><br/></div><div class='line' id='LC42'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="c"># Allow pre-formatted descriptions</span></div><div class='line' id='LC43'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">parser</span><span class="o">.</span><span class="n">formatter</span><span class="o">.</span><span class="n">format_description</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">description</span><span class="p">:</span> <span class="n">description</span></div><div class='line' id='LC44'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">opts</span><span class="p">,</span> <span class="n">args</span>  <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span></div><div class='line' id='LC45'><br/></div><div class='line' id='LC46'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">2</span><span class="p">:</span></div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">parser</span><span class="o">.</span><span class="n">print_help</span><span class="p">()</span></div><div class='line' id='LC48'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span></div><div class='line' id='LC49'><br/></div><div class='line' id='LC50'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">title</span><span class="p">,</span> <span class="n">icon_name</span> <span class="o">=</span> <span class="n">args</span></div><div class='line' id='LC51'><br/></div><div class='line' id='LC52'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">iconpath</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">icon_name</span><span class="p">)</span></div><div class='line' id='LC53'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">iconpath</span><span class="p">):</span></div><div class='line' id='LC54'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">iconpath</span> <span class="o">=</span> <span class="n">IconTheme</span><span class="o">.</span><span class="n">getIconPath</span><span class="p">(</span><span class="n">icon_name</span><span class="p">)</span></div><div class='line' id='LC55'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="ow">not</span> <span class="n">iconpath</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">iconpath</span><span class="p">):</span></div><div class='line' id='LC56'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">print</span><span class="p">(</span><span class="s">&quot;Could not find icon: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">icon_name</span><span class="p">)</span></div><div class='line' id='LC57'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span></div><div class='line' id='LC58'><br/></div><div class='line' id='LC59'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="n">iconpath</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s">&#39;.svg&#39;</span><span class="p">)</span> <span class="ow">or</span> <span class="n">iconpath</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s">&#39;.xpm&#39;</span><span class="p">):</span></div><div class='line' id='LC60'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">print</span><span class="p">(</span><span class="s">&quot;Unsupported icon format for Desura: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">iconpath</span><span class="p">)</span></div><div class='line' id='LC61'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="c">#TODO: At least support converting XPM automatically.</span></div><div class='line' id='LC62'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span></div><div class='line' id='LC63'><br/></div><div class='line' id='LC64'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">conn</span> <span class="o">=</span> <span class="n">sqlite3</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="n">DB_PATH</span><span class="p">)</span></div><div class='line' id='LC65'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">conn</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&quot;UPDATE iteminfo SET iconurl=?, icon=? WHERE name=?&quot;</span><span class="p">,</span> <span class="p">[</span></div><div class='line' id='LC66'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="s">&#39;file://&#39;</span> <span class="o">+</span> <span class="n">pathname2url</span><span class="p">(</span><span class="n">iconpath</span><span class="p">),</span></div><div class='line' id='LC67'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">relpath</span><span class="p">(</span><span class="n">iconpath</span><span class="p">,</span> <span class="n">DESURA_PATH</span><span class="p">),</span></div><div class='line' id='LC68'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">title</span><span class="p">])</span></div><div class='line' id='LC69'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="n">conn</span><span class="o">.</span><span class="n">commit</span><span class="p">()</span></div><div class='line' id='LC70'><br/></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1692707/928e5f61cb0b89378fbe8b7266c3dd457bbdff6e/set_icon.py" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1692707#file_set_icon.py" style="float:right;margin-right:10px;color:#666">set_icon.py</a>
            <a href="https://gist.github.com/1692707">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1177&amp;md5=01895060362ef9803e83ff5bbd111ecc" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=2pAKBHZEZqU:cyE4Hd8MaSY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=2pAKBHZEZqU:cyE4Hd8MaSY:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/2pAKBHZEZqU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/28/setting-custom-game-icons-in-desura/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1177&amp;md5=01895060362ef9803e83ff5bbd111ecc" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/28/setting-custom-game-icons-in-desura/</feedburner:origLink></item>
		<item>
		<title>Good Villain, Bad Villain</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/G-hJIeMr_bc/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/26/good-villain-bad-villain/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 02:51:04 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1171</guid>
		<description><![CDATA[The difference between a well-done villain like Ursula in Disney&#8217;s The Little Mermaid and a poorly done one like Rasputin in Don Bluth&#8217;s Anastasia is actually pretty simple. With a well-done villain, you can understand and sympathize with whatever made &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/26/good-villain-bad-villain/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The difference between a well-done villain like Ursula in Disney&#8217;s The Little Mermaid and a poorly done one like Rasputin in Don Bluth&#8217;s Anastasia is actually pretty simple. With a well-done villain, you can understand and sympathize with whatever made them who they are&#8230; you just can&#8217;t agree with the decisions they made as a result of that past. With a sub-standard villain, they come across as too simplistic.</p>
<p>Rasputin is a good example of this because his primary motivator is obsession. While that&#8217;s a perfectly realistic motivator, it takes a lot of work to make obsession work in a literary context even though it&#8217;s actually a fairly simple emotion. (I know people who are at least as obsessive as Rasputin and have hurt others along the way, but truth is stranger than fiction after all.)</p>
<p>If you compare Ursula, she&#8217;s actually a surprisingly well-rounded villain for a Disney cartoon. Especially when you realize that, in a setting that seems completely innocent, she sings a &#8220;villain song&#8221; that hints at prior experience with misogyny and offers a readily metaphorical deal where a young girl can get her man but must give up her voice and her family.</p>
<p>Good characters lend themselves more readily to more constructive adjectives like &#8220;cynical&#8221; and &#8220;misanthropic&#8221; (Ursula) which, even on their own, readily imply potential character histories. Rasputin&#8217;s descriptors, by contrast (obsessive, evil, undead, basket-case), aren&#8217;t as helpful.</p>
<p>In other words, a good villain is someone who could have been a sympathetic protagonist but chose to go about things in a completely unacceptable way.</p>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1171&amp;md5=399999274e2ae837ede399c715ef65e0" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=G-hJIeMr_bc:lyULWGnYyLw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=G-hJIeMr_bc:lyULWGnYyLw:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/G-hJIeMr_bc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/26/good-villain-bad-villain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1171&amp;md5=399999274e2ae837ede399c715ef65e0" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/26/good-villain-bad-villain/</feedburner:origLink></item>
		<item>
		<title>Freeman’s Mind, Humor, And Themes As A Writing Aid</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/YFF1zborZds/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/16/freemans-mind-humor-and-themes-as-a-writing-aid/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 07:23:51 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1156</guid>
		<description><![CDATA[From a structural standpoint, one of the biggest reasons Freeman&#8217;s Mind works so well as humor is that, in the Half-Life story, Ross Scott&#8217;s version of Gordon Freeman embodies not one or even two, but three humorous juxtapositions which can &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/16/freemans-mind-humor-and-themes-as-a-writing-aid/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>From a structural standpoint, one of the biggest reasons <a href="http://www.youtube.com/show/freemansmind">Freeman&#8217;s Mind</a> works so well as humor is that, in the Half-Life story, Ross Scott&#8217;s version of Gordon Freeman embodies not one or even two, but three humorous juxtapositions which can take turns to ensure a steady flow of humor.</p>
<p>First, since Half-Life&#8217;s story and character interactions were written to imply a mature, serious, respectable silent protagonist, it&#8217;s quite amusing to see an <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=LJD0p4lgaA8#t=115s">immature</a> character with an apparent <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;list=SL&amp;v=7J80KD4BG7M#t=340s">lax</a> <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=wR3dfU8d1K4#t=9s">sense</a> of <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=wR3dfU8d1K4#t=93s">right and wrong</a> slotted into those interactions (As long as it&#8217;s done so it still makes sense) &#8230;not to mention the inherent humor potential in characters who somehow managed to achieve a university-level vocabulary and understanding of <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;list=SL&amp;v=a9FGnOp1PCs#t=19s">science</a>, <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=fqURJ0dw9EY#t=52s">philosophy</a>, <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=V0-vCnExCI4#t=58s">and</a> <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=wR3dfU8d1K4#t=148s">history</a> <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;list=SL&amp;v=a9FGnOp1PCs#t=124s">without</a> <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=fqURJ0dw9EY#t=68s">gaining</a> any maturity in the process.</p>
<p>Second, most of the time, Scott&#8217;s Freeman seems to treat his mental tangents with equal importance to the serious, immediate concerns of his surroundings. For example, when he returns to the giant, noise-making alien in the rocket test chamber and, having just been <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=1MNcAKTeTUE#t=145s">daydreaming about riding a sea turtle</a> to rob cruise ships, comments <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=1MNcAKTeTUE#t=200s">&#8220;Wow. You may be a reptile, but you&#8217;re really dangerous. You&#8217;re not like a turtle at all. I don&#8217;t like that.&#8221;</a></p>
<p>Both are forms of generating humor by denying a person or situation the respect/reverence/seriousness/deference we expect and, by using two or more humorous themes, you reduce the need to have one carry the whole burden of finding something to laugh about in every location or interaction.</p>
<p>Finally, Freeman tends to come to conclusions very notably different from what the designers of Half-Life intended (eg. that the soldiers who are trying to kill him are obviously <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;list=SL&amp;v=Z5YZTHfr1P4#t=175s">immature je</a><a href="http://www.youtube.com/watch?feature=player_detailpage&amp;list=SL&amp;v=Z5YZTHfr1P4#t=175s">rks</a> who <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;list=SL&amp;v=Z5YZTHfr1P4#t=120s">don&#8217;t understand</a> the meaning of &#8220;rescue operation&#8221;) and occasionally make <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=8JSa_1eyyK0#t=187s">obvious-in-retrospect comments</a> to support those viewpoints. (Jokes based around <a href="http://www.youtube.com/watch?feature=player_detailpage&amp;v=fqURJ0dw9EY#t=173s">not ignoring the rough edges</a> in the immersiveness of the game can also fall into this category.)</p>
<p>Fundamentally, all three boil down to the same core pattern which underlies all humor on the listener&#8217;s side: Make sure the audience has expectations, then break them in a way that doesn&#8217;t cause them discomfort. (Humor on the joke-teller&#8217;s side is generally rooted in empathy and social connectedness since it&#8217;s usually impossible to tell a joke properly before you&#8217;ve let its effect on you wear out)</p>
<p>Obviously these aren&#8217;t magic bullets but, by providing three different &#8220;jokes in the abstract&#8221;, they make it much easier for someone with a sense of humor to know where to start looking to find humor in any given situation. In other words, they&#8217;re excellent as guards against writer&#8217;s block or tools for coming up with multiple jokes and then keeping only the best one.</p>
<p>You can even go further and subdivide your themes into more specific areas if you feel it&#8217;ll help you to keep better track of which topics are getting overused and which ones might offer alternative jokes.</p>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1156&amp;md5=4812ee83e1e2a4b3405b230f8d10817e" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=YFF1zborZds:mDV5vs-HXq8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=YFF1zborZds:mDV5vs-HXq8:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/YFF1zborZds" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/16/freemans-mind-humor-and-themes-as-a-writing-aid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1156&amp;md5=4812ee83e1e2a4b3405b230f8d10817e" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/16/freemans-mind-humor-and-themes-as-a-writing-aid/</feedburner:origLink></item>
		<item>
		<title>My Sites: Now 100% Google-free (FeedBurner excepted)</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/M_gZLmOGd2Y/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/14/my-sites-now-100-google-free-feedburner-excepted/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 11:31:52 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1143</guid>
		<description><![CDATA[I&#8217;ve been meaning to minimize Google&#8217;s ability to track me and my visitors for quite a while now, but this post about Google+ which I stumbled across recently came as an appropriately timed reminder. I&#8217;d like to announce that every &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/14/my-sites-now-100-google-free-feedburner-excepted/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to minimize Google&#8217;s ability to track me and my visitors for quite a while now, but <a title="Trapped in the Googlehole. - DocPop.org" href="http://www.docpop.org/2011/07/trapped-in-the-googlehole/">this post</a> about Google+ which I stumbled across recently came as an appropriately timed reminder.</p>
<p>I&#8217;d like to announce that every site I remember running (it&#8217;s conceivable I forgot ones on free hosting similar to GitHub Pages) is now free of Google Libraries API and Google Analytics (I use a private <a href="http://piwik.org/">Piwik</a> install for stats now and I can assure you I&#8217;ve dialed data retention way down). I&#8217;ve never had a need to use reCAPTCHA even back when they weren&#8217;t owned by Google.</p>
<p>I still need to find alternatives to FeedBurner, FriendFeed (owned by Facebook), and Google Docs and find time to replace GMail and Google Talk with stuff I host myself, but it&#8217;s a good start.</p>
<p>(You never really realize how much Google knows about you until you start migrating yourself off them)</p>
<p>In the interest of full disclosure, here&#8217;s an up-to-date list of all 3rd-party dependencies in my sites which could theoretically be reworked for abuse:</p>
<dl>
<dt><a href="http://blog.ssokolow.com/">blog.ssokolow.com</a></dt>
<dd>
<ul>
<li>ProjectWonderful Ad</li>
<li>FriendFeed sidebar widget</li>
<li>Flattr buttons (Live counts require external requests)</li>
<li>FeedBurner feed analytics</li>
</ul>
</dd>
<dt><a href="http://vffa.ficfan.org/">Vanished FanFic Archive</a></dt>
<dd>
<ul>
<li>Fic downloads are currently served separately from Dropbox.com</li>
<li>FeedBurner feed analytics</li>
</ul>
</dd>
<dt><a href="http://ssokolow.github.com/quicktile/">GitHub Pages: QuickTile</a></dt>
<dd>
<ul>
<li>Ohloh Button</li>
<li>Flattr button</li>
</ul>
</dd>
<dt><a href="http://ssokolow.github.com/timeclock/">GitHub Pages: The Procrastinator&#8217;s Timeclock</a></dt>
<dd>
<ul>
<li>Ohloh Button</li>
</ul>
</dd>
<dt><a href="http://gbindex.ssokolow.com/">Gender-Bending Index</a></dt>
<dd>
<ul>
<li>FeedBurner feed analytics</li>
</ul>
</dd>
<dt><a href="https://dl.dropbox.com/u/14610481/story_ideas.html">Fanfiction Story Ideas</a></dt>
<dd>
<ul>
<li>FeedBurner feed analytics</li>
</ul>
</dd>
</dl>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1143&amp;md5=796e7d1a86127393401a7d171b2383c6" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=M_gZLmOGd2Y:6AIfBhLzlfE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=M_gZLmOGd2Y:6AIfBhLzlfE:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/M_gZLmOGd2Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/14/my-sites-now-100-google-free-feedburner-excepted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1143&amp;md5=796e7d1a86127393401a7d171b2383c6" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/14/my-sites-now-100-google-free-feedburner-excepted/</feedburner:origLink></item>
		<item>
		<title>WordPress: Flushing Spam Comments Quickly</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/Ndgfq4En1ZA/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/14/wordpress-flushing-spam-comments-quickly/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 09:58:03 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1137</guid>
		<description><![CDATA[While I love a well-configured copy of Spam Karma 2 as an effortless way to keep my blog free of spam, it doesn&#8217;t seem to have a way to automatically purge/expire comments after they sit in the spam bin for a &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/14/wordpress-flushing-spam-comments-quickly/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While I love a well-configured copy of <a href="http://code.google.com/p/spam-karma/">Spam Karma 2</a> as an effortless way to keep my blog free of spam, it doesn&#8217;t seem to have a way to automatically purge/expire comments after they sit in the spam bin for a while.</p>
<p>Until I can come up with a more automatic solution, here&#8217;s the simplest way to purge all binned spam in a few seconds using the <a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a> SQL query window (it&#8217;s an icon in the sidebar once you&#8217;ve picked a database):</p>
<ol>
<li>Delete all comments marked as spam:
<pre>DELETE FROM wp_comments WHERE comment_approved="spam";</pre>
</li>
<li>Look up all newly orphaned comment metadata entries:
<pre>SELECT m.comment_id FROM wp_commentmeta AS m 
  WHERE (SELECT COUNT(c.comment_ID) FROM wp_comments AS c
    WHERE m.comment_id = c.comment_ID) = 0;</pre>
</li>
<li>Click &#8220;Check All&#8221; at the bottom of the results list. (MySQL <a href="http://dev.mysql.com/doc/refman/5.0/en/delete.html">doesn&#8217;t let you</a> subquery a table you&#8217;re deleting from)</li>
<li>Click &#8220;Delete&#8221; to the right of &#8220;Check All&#8221;.</li>
</ol>
<p>How much faster is this? In the same time it took me to purge 20 comments via the WordPress web interface, I used this process to remove the remaining thousand or so. The actual SQL statements took fractions of a second.</p>
<p>Still&#8230; this is a bit outside my usual area of SQL expertise (I normally work mostly with SQLite and simple INNER JOINs), so I welcome cleaner, more automatic ways to do this without resorting to a little PHP or Python script to pass lists of IDs between statements.</p>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1137&amp;md5=8fc2c975ebaa35d2d6da44c6cb42b8f1" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=Ndgfq4En1ZA:LoS3PBNY2ZU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=Ndgfq4En1ZA:LoS3PBNY2ZU:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/Ndgfq4En1ZA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/14/wordpress-flushing-spam-comments-quickly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1137&amp;md5=8fc2c975ebaa35d2d6da44c6cb42b8f1" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/14/wordpress-flushing-spam-comments-quickly/</feedburner:origLink></item>
		<item>
		<title>Open-Source Licensing For The Lay Programmer</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/4ytW4wxiF4I/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/09/open-source-licensing-for-the-lay-programmer/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 02:54:34 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1105</guid>
		<description><![CDATA[When trying to get a new project off the ground, there&#8217;s no doubt that community is important, but from all the stuff I&#8217;ve run across, one of the least understood and most important aspects of doing so seems to be &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/09/open-source-licensing-for-the-lay-programmer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When trying to get a new project off the ground, there&#8217;s no doubt that community is important, but from all the stuff I&#8217;ve run across, one of the least understood and most important aspects of doing so seems to be licensing. Your project&#8217;s license is its constitution. It tells potential users and contributors what your attitude is and sets the tone of the dialogue&#8230; and if you get it wrong, you can easily prevent like-minded people from joining you by accidentally picking a license that doesn&#8217;t actually allow what you think it does.</p>
<p>What follows is a lay programmer&#8217;s quick overview of the relevant terms, followed by a guide to choosing the most appropriate license. Not all of the terms are exact, but they should be understandable and that&#8217;s what&#8217;s most important.</p>
<p><strong>Important:</strong> Because of the legal consequences of a misunderstanding, it is important to keep things simple by minimizing the number of licenses in use in the wild. This page lists the most popular license for each scenario you might find yourself in and choosing an alternative to the licenses here is strongly discouraged.</p>
<h2>Terms</h2>
<dl>
<dt>Derivative vs. Aggregate</dt>
<dd>The law makes a distinction between &#8220;derivative&#8221; works like modifying an icon, forking a project, or linking against a shared library and &#8220;aggregate&#8221; works like zip files and DVDs full of things.</dd>
<dd>That means that you can put two things with incompatible licenses in the same zip file or on the same DVD because that&#8217;s &#8220;aggregation&#8221;. This is a popular way to freely release a game&#8217;s engine for any use but restrict the game&#8217;s resources (level files, graphics, music, etc.) so only the original creator can sell them.</dd>
<dd>Licenses <em>can</em> set terms on aggregation, but generally that only happens in the kind you find in commercial software. For example, you&#8217;re not allowed to put Flash on a Linux CD. End users have to individually download it from Adobe&#8217;s site. (though that process can be automated by Linux package managers)</dd>
<dt>Free Software</dt>
<dd>The term &#8220;open source&#8221; is a fairly weak term and doesn&#8217;t encompass all of the <a href="https://www.gnu.org/philosophy/free-sw.html">freedoms</a> we&#8217;ve come to expect in popular licenses. &#8220;Free software&#8221; is the older, more strict (but less popular) term coined by Richard Stallman to talk about licenses which explicitly grant these freedoms.</dd>
<dd>It is variously referred to by the terms FOSS, FLOSS, Free/Libre Software, and various others because English doesn&#8217;t have a word specifically meaning &#8220;free as in freedom&#8221;. (&#8220;Libre&#8221; is French, from the same Latin root as &#8220;Liberty&#8221;)</dd>
<dt>Copyleft and ShareAlike</dt>
<dd>A &#8220;copyleft&#8221; or &#8220;ShareAlike&#8221; license is a license which requires you to give others the same rights you received&#8230; so if you have access to the source code, you must give others access to the source for any modified versions you make.</dd>
<dt>Copyleft and &#8220;Distribution&#8221;</dt>
<dd>With one exception (The Affero GPL), copyleft licenses like the GNU GPL only require you to share your source if you share something built from it. Keep the binaries to yourself, and you have no obligation to share your changes.</dd>
<dd>For this reason, requiring end users to click &#8220;agree&#8221; in an installer is meaningless. Free Software licenses aren&#8217;t <acronym title="End-User License Agreement">EULA</acronym>s.</dd>
<dt>&#8220;Creative Commons License&#8221;</dt>
<dd>The term &#8220;Creative Commons License&#8221; is practically meaningless in and of itself, much like a &#8220;you must be human to ride&#8221; sign at an amusement park. The term refers to a large family of licenses with various properties and using the term without being more specific only makes things worse by spreading the misconception that it&#8217;s OK.</dd>
<dt>License Incompatibility</dt>
<dd>When two licenses require conflicting things, they&#8217;re said to be incompatible.</dd>
<dd>For example, the GNU GPL forbids people from imposing additional restrictions down the line and requires that derivative works also be GPLed. The license for Douglas Crockford&#8217;s JSMin contains a line that says &#8220;The Software shall be used for Good, not Evil.&#8221; (An admirable sentiment, but dangerously ambiguous) Because that counts as an additional restriction, you can&#8217;t use GPLed code and code from JSMin in the same program.</dd>
<dt>Dual/Triple-License</dt>
<dd>When a piece of software is &#8220;dual-licensed&#8221; or &#8220;triple-licensed&#8221;, it means that its creators have granted you permission to use it under your choice of two or more licenses.</dd>
<dd>While this is a perfectly acceptable option, it generally makes things more complicated and combinations like BSD/GPL should be avoided since, if you&#8217;re willing to license under BSD, you&#8217;re already GPL-compatible.</dd>
</dl>
<h2>Licenses for Code</h2>
<table>
<tbody>
<tr>
<th>License</th>
<th>Compatible with&#8230;</th>
<th>Use when&#8230;</th>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a> or <a href="http://en.wikipedia.org/wiki/BSD_license#2-clause_license_.28.22Simplified_BSD_License.22_or_.22FreeBSD_License.22.29">2-clause BSD</a></td>
<td>Everything</td>
<td>You just want credit for your work. Others can use it however they want. (Also a good alternative to public domain. Not all countries recognize the right to give up your copyright.)</td>
</tr>
<tr>
<td><a href="http://creativecommons.org/licenses/by/3.0/"><acronym title="Creative Commons Attribution 3.0 Unported">CC-BY 3.0</acronym></a></td>
<td>Everything</td>
<td>You want MIT/BSD-like terms, but with a pretty icon and some RDFa metadata to embed.</td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/Apache_License">Apache 2.0</a></td>
<td>CC-BY, MPL 1.1+, LGPL 3.0+, GPL 3.0+, AGPL 3.0+</td>
<td>You don&#8217;t mind being incompatible with &#8220;GPL 2.0 only&#8221; libraries and you want BSD-like terms, but with clearer legal language and an explicit patent grant.</td>
</tr>
<tr>
<td><a href="https://mpl.mozilla.org/2012/01/03/announcing-mpl-2-0/"><acronym title="Mozilla Public License">MPL</acronym> 2.0</a></td>
<td>Apache, GPL 2.0+, LGPL 2.1+, AGPL 3.0+</td>
<td>You want to copyleft-protect changes on a file-by-file basis but you don&#8217;t care what happens to the program as a whole.</td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License">LGPL 2.1+</a></td>
<td>LGPL 2.1+, GPL 2.0+, AGPL 3.0+</td>
<td>You want modifications to your library to be copyleft but use in closed-source programs is fine and you want to stay compatible with projects that removed the &#8220;or later&#8221; line from their LGPL declarations.</td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License">LGPL 3.0+</a></td>
<td>LGPL 3.0+, GPL 3.0+, AGPL 3.0+</td>
<td>You want modifications to your library to be copyleft but use in closed-source programs is fine and you want an explicit patent grant on contributed code.</td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/GNU_General_Public_License">GPL 2.0+</a></td>
<td>GPL 2.0+, AGPL 2.0+</td>
<td>You want project-level copyleft licensing while staying compatible with projects that removed the &#8220;or later&#8221; line from their GPL declarations.</td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/GNU_General_Public_License">GPL 3.0+</a></td>
<td>GPL 3.0+, AGPL 3.0+</td>
<td>You want project-level copyleft licensing with an explicit patent grant and the option to forbid companies from using your software on devices which control upgrades with DRM.</td>
</tr>
<tr>
<td><a href="http://en.wikipedia.org/wiki/Affero_General_Public_License">Affero GPL 3.0+</a></td>
<td>Itself only</td>
<td>You want websites using your code to share their changes&#8230; assuming any are willing to use your code in the first place.</td>
</tr>
</tbody>
</table>
<p>There are also various community licenses like the <a href="http://en.wikipedia.org/wiki/Python_Software_Foundation_License">Python Software Foundation license</a> and the <a href="http://en.wikipedia.org/wiki/Artistic_License">Artistic License</a> which you might want to use to follow community conventions.</p>
<p>When you are unsure about what a community-specific license entails, convention for large, popular communities is usually safe to follow. If in doubt, either dual-license between the community recommendation and one of the licenses listed here or pick one from this list that&#8217;s permissive enough to be compatible with the community preference.</p>
<p><strong>Important:</strong>Unless you really know what you&#8217;re doing, don&#8217;t remove the &#8220;or any later version&#8221; clauses from GPL-family license declarations. If unsure, keep in mind that 3.0-series GPL-family licenses <em>do</em> allow you to specify a person responsible for making that judgement call on behalf of all contributors at a later date.</p>
<h2>Licenses for Resources</h2>
<p>As long as you&#8217;re not embedding them in your <code>.exe</code> files, your images (eg. icons), sounds, and so on don&#8217;t have to share the same license as your code. In fact, it&#8217;s better they don&#8217;t because someone might want to produce a derivative work and copyleft code licenses are incompatible with copyleft non-code licenses. (You can&#8217;t combine a GPLed image and a CC-BY-SA image into a new poster, for example)</p>
<table>
<tbody>
<tr>
<th>License</th>
<th>Compatible with&#8230;</th>
<th>Use when&#8230;</th>
</tr>
<tr>
<td><a href="http://creativecommons.org/licenses/by/3.0/"><acronym title="Creative Commons Attribution 3.0 Unported">CC-BY 3.0</acronym></a></td>
<td>Everything</td>
<td>You just want credit for your work. You <em>can</em> specify how people must credit you, but remember that you&#8217;re competing with the world and don&#8217;t get too greedy.</td>
</tr>
<tr>
<td><a href="http://creativecommons.org/licenses/by-sa/3.0/"><acronym title="Creative Commons Attribution-ShareAlike 3.0 Unported">CC-BY-SA 3.0</acronym></a></td>
<td>Itself only</td>
<td>You want CC-BY&#8217;s attribution provisions, but you also want people to have to share derivative works under the same terms. (This is the recommended way to scare off predatory commercial use)</td>
</tr>
</tbody>
</table>
<p><strong>Important:</strong> The NoDerivs and NonCommercial variants of Creative Commons licenses are not included here because they have <a href="http://news.cnet.com/8301-13556_3-9823336-61.html">non-intuitive consequences</a>, <a href="http://createdigitalmusic.com/2010/10/cbc-dumps-creative-commons-non-commercial-licensing-to-blame/">don&#8217;t achieve</a> what is generally intended, and their incompatibility with the popular CC-BY-SA variant makes them a deal-breaker for many potential users/fans.</p>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1105&amp;md5=c0598939d0fe8bf64253765cbf4f9e64" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=4ytW4wxiF4I:acW9NNEOVs4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=4ytW4wxiF4I:acW9NNEOVs4:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/4ytW4wxiF4I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/09/open-source-licensing-for-the-lay-programmer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1105&amp;md5=c0598939d0fe8bf64253765cbf4f9e64" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/09/open-source-licensing-for-the-lay-programmer/</feedburner:origLink></item>
		<item>
		<title>Second-Tier Cartoon Classics and The Effects of Perspective</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/eFtu5eToPUQ/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/04/second-tier-cartoon-classics/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 08:22:00 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Otaku Stuff]]></category>
		<category><![CDATA[Web Wandering & Opinion]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1096</guid>
		<description><![CDATA[I just discovered something rather interesting about the cartoons I and those of my generation grew up with. If you ask us about companies, everyone can probably name the top-tier ones: Disney, Warner Brothers and Hanna-Barbera&#8230; and deservedly so. Walt &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/04/second-tier-cartoon-classics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just discovered something rather interesting about the cartoons I and those of my generation grew up with. If you ask us about companies, everyone can probably name the top-tier ones: <a href="https://en.wikipedia.org/wiki/Disney">Disney</a>, <a href="https://en.wikipedia.org/wiki/Warner_Bros._Animation">Warner Brothers</a> and <a href="https://en.wikipedia.org/wiki/Hanna-Barbera">Hanna-Barbera</a>&#8230; and <a href="http://www.escapistmagazine.com/videos/view/the-big-picture/3854-The-Collar">deservedly</a> <a href="http://www.escapistmagazine.com/videos/view/the-big-picture/3935-Smarter-Than-the-Average-Bear">so</a>. Walt Disney wasn&#8217;t the only innovator around and, while Disney was the best at what they did, quantity does have a quality all its own (a quote usually credited to Josef Stalin) &#8230;especially in reruns.</p>
<p>What I just realized is that many of the things we remember from our childhood <em>were</em> actually from a single source, rather than a mish-mash of one-hit wonders like <a href="https://en.wikipedia.org/wiki/The_Swan_Princess">The Swan Princess</a>, <a href="https://en.wikipedia.org/wiki/Ferngully">Ferngully</a>, and <a href="https://en.wikipedia.org/wiki/The_Nutcracker_Prince">The Nutcracker Prince</a>. (Or the ones like <a href="https://en.wikipedia.org/wiki/Quest_for_Camelot">Quest for Camelot</a> which just didn&#8217;t shout out that Warner Brothers made them.)</p>
<p>The more aware of you might be thinking I&#8217;m going to be talking about <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/DonBluth">Don Bluth</a>, who brought us cartoons like <a href="https://en.wikipedia.org/wiki/The_Land_Before_Time">The Land Before Time</a>, <a href="https://en.wikipedia.org/wiki/An_American_Tail">An American Tail</a>, <a href="https://en.wikipedia.org/wiki/The_Secret_of_NIMH">The Secret of NIMH</a>, <a href="https://en.wikipedia.org/wiki/Thumbelina_%281994_film%29">Thumbelina</a>, and <a href="https://en.wikipedia.org/wiki/Anastasia_%281997_film%29">Anastasia</a> (among many other less classic ones), but this isn&#8217;t about him.</p>
<p>This is about a little company named <a href="https://en.wikipedia.org/wiki/Rankin/Bass">Rankin/Bass Productions</a> which sometimes published through Warner Brothers, but was quite visibly not them.</p>
<p>Do you remember those old stop-motion holiday films like Rudolph or <a href="https://en.wikipedia.org/wiki/Here_Comes_Peter_Cottontail">Here Comes Peter Cottontail</a>? Early Rankin/Bass Productions.</p>
<p>How about the animated version of <a href="https://en.wikipedia.org/wiki/The_Hobbit_%281977_film%29">The Hobbit</a> or things like <a href="https://en.wikipedia.org/wiki/Flight_of_Dragons">Flight of Dragons</a> and <a href="https://en.wikipedia.org/wiki/The_Last_Unicorn_%28film%29">The Last Unicorn</a>, which, as an adult, I now find deeper than their better-drawn Disney contemporaries in some ways? You guessed it. Rankin/Bass again.</p>
<p>Incidentally, they contracted a Japanese studio named Topcraft to <a href="http://utd500.utdallas.edu/~hairston/luanimage.html">do the animation</a>. The core members of Topcraft would later found <a href="https://en.wikipedia.org/wiki/Studio_Ghibli">Studio Ghibli</a>, (And <a href="https://en.wikipedia.org/wiki/The_Snow_Queen_%281957_film%29">The Snow Queen</a> was one of <a href="https://en.wikipedia.org/wiki/Hayao_Miyazaki">Hayao Miyazaki</a>&#8216;s big inspirations, but that&#8217;s as far off-track as I&#8217;ll let myself go.)</p>
<p>So, is there a point to this ramble? I suppose, if anything, it&#8217;s that, nostalgia and re-examining old favorites aside, learning details like these can help to see your past in a new light. I don&#8217;t know about you, but I love that feeling of understanding that comes when a new detail finally &#8220;clicks&#8221;.</p>
<p>For example, If you&#8217;ve watched any significant number of Miyazaki films, take a look at <a href="https://en.wikipedia.org/wiki/The_Snow_Queen_%281957_film%29">The Snow Queen</a>. It&#8217;s fascinating to see what thematic and stylistic elements of it he chose to borrow and refine. <a href="https://en.wikipedia.org/wiki/Sailor_Moon">Sailor Moon</a> wasn&#8217;t on the TV channels I got as a kid but, if you watched it, you probably weren&#8217;t aware that it basically introduced the idea of magical girls working in a group to fight off large-scale villains. (Up until that point, that was the domain of <a href="https://en.wikipedia.org/wiki/Super_Sentai">Super Sentai</a>. Stuff like Voltron and Power Rangers which I also didn&#8217;t watch.)</p>
<p>As for comments, what do <em>you</em> find most memorable about these second-tier classics? The song, <a href="https://www.youtube.com/watch?v=8kx4YYWWINo">This Is My Idea</a>, from The Swan Princess? Amalthea&#8217;s words from the end of The Last Unicorn? The <a title="The Last Unicorn Opening [High Quality] - YouTube" href="https://www.youtube.com/watch?v=fEIXUNKA9NY">intro</a>? James Horner&#8217;s <a href="https://www.youtube.com/watch?v=zO06EdQt9sA">soundtrack</a> for the original The Land Before Time? Share it.</p>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1096&amp;md5=4f3360f772b350dee984c0dbb9660cd1" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=eFtu5eToPUQ:aQyMxhg1mgk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=eFtu5eToPUQ:aQyMxhg1mgk:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/eFtu5eToPUQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/04/second-tier-cartoon-classics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1096&amp;md5=4f3360f772b350dee984c0dbb9660cd1" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/04/second-tier-cartoon-classics/</feedburner:origLink></item>
		<item>
		<title>A Few New Projects Up on GitHub</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/ucQQi6JpGu4/</link>
		<comments>http://blog.ssokolow.com/archives/2012/01/02/a-few-new-projects-up-on-github/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 08:42:13 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1091</guid>
		<description><![CDATA[Over the last few days, I&#8217;ve been trying to clean out a bunch of old TODO notes. One of the more procrastinated ones has been to tidy up as many of my in-progress projects as possible and get them up &#8230; <a href="http://blog.ssokolow.com/archives/2012/01/02/a-few-new-projects-up-on-github/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Over the last few days, I&#8217;ve been trying to clean out a bunch of old TODO notes. One of the more procrastinated ones has been to tidy up as many of my in-progress projects as possible and get them up on GitHub, both so they&#8217;ll have some offsite backup, and so I&#8217;m practicing what I preach.</p>
<p>So far, here are the ones I&#8217;ve added:</p>
<ul>
<li><a href="https://github.com/ssokolow/gvrun">gvrun</a> (A partially complete <a href="http://sourceforge.net/projects/gmrun/">gmrun</a> clone written in <a href="http://live.gnome.org/Vala">Vala</a> and begun as a port of the <a href="https://github.com/ssokolow/profile/blob/ff39d009b58d931a4adc97e06e706447cd89f1de/home/.icewm/address_bar.py">address_bar.py</a> backend I wrote for IceWM)</li>
<li><a href="https://gist.github.com/1521494">png2pdf</a> (Python script for turning a bunch of PNGs into a PDF, with partial caching on regeneration. Uses PyPDF and ImageMagick. Uses far less memory than letting ImageMagick do the whole process but still has room for improvement.)</li>
<li><a href="https://github.com/ssokolow/languagetool-fanfiction">languagetool-fanfiction</a> (In-development set of <a href="http://www.languagetool.org/">LanguageTool</a> rules for catching common fanfiction grammar and spelling mistakes)</li>
</ul>
<p>I should probably also draw attention to these specific, older gists, since they can easily get lost among the ones I&#8217;ve already blogged about:</p>
<ul>
<li><a href="https://gist.github.com/135673">Shell-like Tab completion for gtk.Entry</a> (Lets you use Tab for both field switching and completion. Changed somewhat since I blogged about it.)</li>
<li><a href="https://gist.github.com/940290">Python port of Tjb0607&#8242;s Minecraft level backup script with minor enhancements</a></li>
<li><a href="https://gist.github.com/1133645">XDG basedir wrapper for Crayon Physics</a> (Puts the Linux Humble Bundle version&#8217;s files in a hidden directory like they should be)</li>
</ul>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1091&amp;md5=60ca69627ee1b0c9ccc44fa8d64116a6" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=ucQQi6JpGu4:ZuLwHnh2HrI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=ucQQi6JpGu4:ZuLwHnh2HrI:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/ucQQi6JpGu4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2012/01/02/a-few-new-projects-up-on-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1091&amp;md5=60ca69627ee1b0c9ccc44fa8d64116a6" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2012/01/02/a-few-new-projects-up-on-github/</feedburner:origLink></item>
		<item>
		<title>Cleaner Firefox Context Menus Using Stylish</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/NGkK-Xd350I/</link>
		<comments>http://blog.ssokolow.com/archives/2011/12/26/cleaner-firefox-context-menus-using-stylish/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 18:15:12 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1086</guid>
		<description><![CDATA[Since the Firefox Menu Editor extension doesn&#8217;t get along with the new HTML5 context menu support in Firefox 8 and up (it prevents site-added entries from appearing with no option to allow them), I thought I&#8217;d whip up a few &#8230; <a href="http://blog.ssokolow.com/archives/2011/12/26/cleaner-firefox-context-menus-using-stylish/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since the Firefox <a href="https://addons.mozilla.org/en-US/firefox/addon/menu-editor/">Menu Editor</a> extension doesn&#8217;t get along with the new HTML5 context menu support in Firefox 8 and up (it prevents site-added entries from appearing with no option to allow them), I thought I&#8217;d whip up a few userstyles to get the same, more Chrome-like (useful, but cruft-free) context menu I normally have without sacrificing that feature.</p>
<p>Here are the ones I&#8217;ve written:</p>
<ul>
<li><a href="http://userstyles.org/styles/58450/firefox-un-cluttered-chrome-like-context-menu">Firefox &#8211; Un-cluttered, Chrome-like Context Menu </a></li>
<li><a href="http://userstyles.org/styles/58448/stumbleupon-hide-context-menu-entries">StumbleUpon &#8211; Hide Context Menu Entries </a> (Especially nice since they have eye-grabbing icons)</li>
</ul>
<p>The one to clean out Firefox-native entries is especially important to me since Firefox devs seem to care more about moving the RSS icon out of the address bar (<a title="RSS Icon - Firefox Add-ons" href="https://addons.mozilla.org/en-US/firefox/addon/rss-icon/">fix)</a> and hiding behind their toolbar heatmaps than even <em>doing</em> a heatmap study on the context menu. I seriously doubt things like &#8220;Send Image&#8230;&#8221; get used often enough to be in the top level of a context menu without Chrome&#8217;s &#8220;one entry or submenu per extension&#8221; rule. (And why is &#8220;Select All&#8221; not shown only in text fields in this day and age?)</p>
<p>If you want to make your own, the process is very simple. Use mine as an example and then follow the instructions on Mozillazine&#8217;s <a href="http://kb.mozillazine.org/Firefox_:_Tips_:_Customize_context_menu">Menu customization</a> page.</p>
<p>If you want to remove something with a name that changes based on what you select or you want to &#8220;do it right&#8221; so your script works for everyone, rather than just people who share your locale, follow the &#8220;Using ID selectors&#8221; instructions rather than the &#8220;Using attribute selectors&#8221; ones. Finding the ID is a bit technical, but, here&#8217;s how I do it:</p>
<ul>
<li><a href="http://kb.mozillazine.org/Profile_folder">locate your profile folder</a>, then go into the <code>extensions</code> folder.</li>
<li>One of those files or folders holds the code to the extension, so use your favorite archive tool to poke around until you find the right one. (<code>.xpi</code> files are <code>.zip</code> files with a different extension, so use your favorite archive tool)</li>
<li>Use <code>grep -r "text from the menu item" path/to/unpacked/xpi</code> or a <a href="http://stackoverflow.com/questions/87350/what-are-good-grep-tool-for-windows">grep-like tool</a> to find the file and line number to start at. (If you get no results, try a smaller fragment)</li>
<li>Go to that line number in that file using your favorite text editor. The ID should be nearby, either as <code>id="waggawagga"</code> or in a bit of Javascript which looks up the object by ID</li>
</ul>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1086&amp;md5=5db14d844b030afc02d3af0c5c963979" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=NGkK-Xd350I:9_jp-_ZbRws:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=NGkK-Xd350I:9_jp-_ZbRws:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/NGkK-Xd350I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2011/12/26/cleaner-firefox-context-menus-using-stylish/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1086&amp;md5=5db14d844b030afc02d3af0c5c963979" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2011/12/26/cleaner-firefox-context-menus-using-stylish/</feedburner:origLink></item>
		<item>
		<title>Getting your way with setxkbmap</title>
		<link>http://feedproxy.google.com/~r/ssokolow_blog/~3/wMQS4WldhRM/</link>
		<comments>http://blog.ssokolow.com/archives/2011/12/24/getting-your-way-with-setxkbmap/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 10:47:00 +0000</pubDate>
		<dc:creator>Stephan Sokolow</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.ssokolow.com/?p=1079</guid>
		<description><![CDATA[If you&#8217;ve ever poked around in the KDE or GNOME control panels, you know that the X11 keyboard system is very customizable and, as the KDE keyboard controls clearly show, that it&#8217;s all done using a little command named setxkbmap. &#8230; <a href="http://blog.ssokolow.com/archives/2011/12/24/getting-your-way-with-setxkbmap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever poked around in the KDE or GNOME control panels, you know that the X11 keyboard system is <strong>very</strong> customizable and, as the KDE keyboard controls clearly show, that it&#8217;s all done using a little command named <code>setxkbmap</code>.</p>
<p>The problem is, Google isn&#8217;t very helpful if you want to use this tool directly. All the results seem to tell you to read the raw config files or only give you single, purpose-specific examples.</p>
<p>The good news is that your system actually DOES include a single file equivalent to (and probably the source for) the listings you get in the GUI tools:</p>
<pre>/usr/share/X11/xkb/rules/base.lst</pre>
<p>For those who haven&#8217;t used KDE and need an example, here&#8217;s the command I run on login (These can also be specified in xorg.conf via Option directives, but I prefer something I can keep in my roaming profile):<br />
<code></code></p>
<pre>setxkbmap \
  -variant altgr-intl \
  -option \
  -option compose:rctrl \
  -option lv3:ralt_switch \
  -option terminate:ctrl_alt_bkspc \
  -option eurosign:e \
  -option nbsp:level3n</pre>
<p>As usual, the backslashes are only necessary if you&#8217;re splitting it across multiple lines. Here&#8217;s what they actually do when used with a <code>us104</code> or <code>us105</code> layout:</p>
<dl>
<dt>-variant altgr-intl</dt>
<dd>The default variant of the US 104 layout doesn&#8217;t have tertiary symbols like ¢ and þ for AltGr to access, so I&#8217;m selecting one that does.</dd>
<dd>You can also use the <code>intl</code> variant here but, for some reason, it maps ² to AltGr+2 and ³ to AltGr+3 but ¹ to AltGr+Shift+1.</dd>
<dt>-option</dt>
<dd>An empty <code>-option</code> resets the layout options so I&#8217;m starting from a clean slate.</dd>
<dt>-option compose:rctrl</dt>
<dd>This remaps the <code>Control_R</code> keysym to <code>Compose</code>, so I can access glyphs like ½, ±, and é by typing &#8220;<code>Ctrl 1 2</code>&#8221; or &#8220;<code>Ctrl + -" or "</code><code>Ctrl e '</code>&#8220;.</dd>
<dt>-option lv3:ralt_switch</dt>
<dd>This remaps <code>Alt_R</code> to <code>AltGr</code>, granting access to ¬ (AltGr+\) for making ¬_¬ smileys and giving me simpler key combos for commonly-used glyphs like µ (AltGr+m) and © (AltGr+c).</dd>
<dd>You can also use <code>ralt_switch_multikey</code> here to make Shift+AltGr the Compose key on compact keyboards but my muscle memory has already settled on <code>Control_R</code>. (Note: Make sure you press Shift first or it&#8217;ll just send an ordinary AltGr+Shift)</dd>
<dd><strong>Note:</strong>If anyone knows why ¬ is no longer on <code>AltGr+`</code>, please leave a comment.</dd>
<dt>-option terminate:ctrl_alt_bkspc</dt>
<dd>Restore Ctrl+Alt+Backspace as the &#8220;Kill X Server&#8221; shortcut without relying on a superior but root-privileged and Linux-only <a title="Linux 2.4.2 Secure Attention Key (SAK) handling" href="http://www.mjmwired.net/kernel/Documentation/SAK.txt">config tweak</a>.</dd>
<dd>(Again, I like settings I can store in my roaming profile)</dd>
<dt>-option eurosign:e</dt>
<dd>I&#8217;m Canadian, so on the occasions I need to type €, it can take me a while to remember that it has two cross-bars so I know to use &#8220;<code>Compose e =</code>&#8220;. Since my muscle memory already uses &#8220;<code>Compose e '</code>&#8221; for é anyway, let&#8217;s remap <code>AltGr+e</code> to €.</dd>
<dt>-option nbsp:level3n</dt>
<dd>Lets me type non-breaking spaces with <code>AltGr+Space</code> for those times when <code>&amp;nbsp;</code> doesn&#8217;t have special meaning.</dd>
<dd>Using <code>level3n</code> rather than <code>level3</code> lets me type thin non-breaking spaces with <code>Shift+AltGr+Space</code>.</dd>
</dl>
<hr />
<p>The beauty of doing things this way is that you&#8217;re unlikely to break things badly. It&#8217;s nearly impossible to paint yourself into a corner using variants and options alone (It&#8217;s models and layouts you have to be careful with) and, if you ever try to apply your settings to a keyboard they weren&#8217;t intended for, an unrecognized variant will abort the process and unrecognized options will simply have no effect.</p>
<p>Have fun and, if you&#8217;ve got any other interesting keyboard tweaks, share them in the comments. If I like one that applies to <code>us104</code> enough to use it myself, I&#8217;ll update the example in the post body.</p>
 <p><a href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1079&amp;md5=631270d81ff0a71716e60a6622629111" title="Flattr" target="_blank"><img src="http://blog.ssokolow.com/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=wMQS4WldhRM:i-LyJcAR2xg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ssokolow_blog?a=wMQS4WldhRM:i-LyJcAR2xg:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/ssokolow_blog?d=YwkR-u9nhCs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ssokolow_blog/~4/wMQS4WldhRM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ssokolow.com/archives/2011/12/24/getting-your-way-with-setxkbmap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	<atom:link rel="payment" href="http://blog.ssokolow.com/?flattrss_redirect&amp;id=1079&amp;md5=631270d81ff0a71716e60a6622629111" type="text/html" />"
	<feedburner:origLink>http://blog.ssokolow.com/archives/2011/12/24/getting-your-way-with-setxkbmap/</feedburner:origLink></item>
	</channel>
</rss>

