<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Karol Krizka</title>
	
	<link>http://www.krizka.net</link>
	<description>A geek's view of the world...</description>
	<lastBuildDate>Wed, 30 Jun 2010 19:36:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/KarolKrizkaBlog" /><feedburner:info uri="karolkrizkablog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>KarolKrizkaBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Linux and Passwordless Login To A SSH Sever</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/3cpxgL1-iw4/</link>
		<comments>http://www.krizka.net/2010/06/30/linux-and-passwordless-login-to-a-ssh-sever/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 19:30:47 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1152</guid>
		<description><![CDATA[This is a follow up to my tutorial about setting up a secure shell server on an iPhone. The problem with the first tutorial is that you have to type in your password everytime you want to login. This is can get annoying, especially if you connect a lot. For example, you would have to [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p>This is a follow up to my tutorial about <a href="http://www.krizka.net/2010/06/28/setup-ssh-on-a-jailbroken-iphone/">setting up a secure shell server on an iPhone</a>. The problem with the first tutorial is that you have to type in your password everytime you want to login. This is can get annoying, especially if you connect a lot. For example, you would have to type in your password everytime you sync your iPhone over WiFi or do debugging on it (more on that later). In this tutorial, I will show you how you can set it up in a way such that you won&#8217;t have to type in the password. This tutorial should also work with any SSH server (as long as it is not explicitly disabled), not just on an iPhone.</p>
<p>Passwordless login is very good for convenience and it is relatively secure. It works by generating a private-public key on your Linux PC and copying the public key to the iPhone. Then when you connect, the SSH server checks your private key against the public key, and if they match, it lets you in. You cannot compare a public key with another public key, so if someone steals your iPhone, they won&#8217;t be able to get in. Heck, you can even post your public key on your website and let others download it. However if someone steals your private key, then they will be able to get in. So make sure to project your private key! To read more about private-public key authorization, read the <a href="http://simple.wikipedia.org/wiki/Public-key_cryptography">Simple Wikipedia page</a>.</p>
<p><strong>Requirements</strong></p>
<ul>
<li><strong>Linux based PC.</strong><strong> </strong>This guide was tested on Ubuntu Lucid. Also a Mac OS X computer might work also, I have not tried.</li>
<li><strong>iPhone with a SSH server installed.</strong> Again, <a href="http://www.krizka.net/2010/06/28/setup-ssh-on-a-jailbroken-iphone/">follow this guide if you do not know how to install it</a>.</li>
</ul>
<p><strong>Instructions</strong></p>
<ol>
<li>Make sure you have the OpenSSH client installed on your PC.
<p> </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> openssh-client</pre></div></div>

</li>
<li>Create a private/public key pair using the following command. It will ask you some questions, but just hit enter to accept the defaults. If you already have a SSH key, you can skip this step. By default, the key pair is saved into ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub, where the .pub file is the public key. That is the one you want to copy. If you saved your key pair somewhere else, don&#8217;t forget to edit the location in any of the future steps.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> rsa</pre></div></div>

</li>
<li>Append the contents of the public key into the <em>~/.ssh/authorized_keys</em> file on the iPhone. The following command does just that. Don&#8217;t forget to replace 192.168.1.111 with the IP address of your iPhone.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> root<span style="color: #000000; font-weight: bold;">@</span>192.168.1.111 <span style="color: #ff0000;">&quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; echo <span style="color: #780078;">`cat ~/.ssh/id_rsa.pub`</span> &amp;gt;&amp;gt; ~/.ssh/authorized_keys&quot;</span></pre></div></div>

</li>
<li>Try to login to your iPhone. You shouldn&#8217;t be asked for the password if everything worked.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> root<span style="color: #000000; font-weight: bold;">@</span>192.168.1.111</pre></div></div>

</li>
<li>Repeat steps 1-4 on any additional computers that you own and will use to connect to your iPhone. For step 3, make sure that you append the contents of your public keys as a new line at the end of the authorozed_keys file.</li>
</ol>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/sCw28QGBvo9Guz0nflfYZQ-Unoo/0/da"><img src="http://feedads.g.doubleclick.net/~a/sCw28QGBvo9Guz0nflfYZQ-Unoo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/sCw28QGBvo9Guz0nflfYZQ-Unoo/1/da"><img src="http://feedads.g.doubleclick.net/~a/sCw28QGBvo9Guz0nflfYZQ-Unoo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3cpxgL1-iw4:ucREuxsSiQs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=3cpxgL1-iw4:ucREuxsSiQs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3cpxgL1-iw4:ucREuxsSiQs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=3cpxgL1-iw4:ucREuxsSiQs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3cpxgL1-iw4:ucREuxsSiQs:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3cpxgL1-iw4:ucREuxsSiQs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3cpxgL1-iw4:ucREuxsSiQs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3cpxgL1-iw4:ucREuxsSiQs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/3cpxgL1-iw4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/06/30/linux-and-passwordless-login-to-a-ssh-sever/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/06/30/linux-and-passwordless-login-to-a-ssh-sever/</feedburner:origLink></item>
		<item>
		<title>Setup SSH On A Jailbroken iPhone</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/rv0-T0UsBgE/</link>
		<comments>http://www.krizka.net/2010/06/28/setup-ssh-on-a-jailbroken-iphone/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 22:18:42 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1151</guid>
		<description><![CDATA[One of the advantages of having a jailbroken iPhone is that it is possible to setup a Secure SHell server (SSH) on it. SSH gives you access to the underlying Unix system. If you do not know what that means, then probably you do not need it. However, it is a very useful tool for [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p>One of the advantages of having a jailbroken iPhone is that it is possible to setup a Secure SHell server (SSH) on it. SSH gives you access to the underlying Unix system. If you do not know what that means, then probably you do not need it. However, it is a very useful tool for programmers like me. This guide goes over how to setup a OpenSSH server on the iPhone and connect to it from either a Linux, Windows or Mac OS X based computer. In the future, I plan to write a guide on how to setup passwordless login, meaning you don&#8217;t have to type in your password every time and still have a level of security.</p>
<p>I originally wrote this tutorial before iOS4 came out, using iPhone OS 3.1.3 running on my iPod Touch 2G. However I&#8217;ve also tested this tutorial on iOS4 and none of the steps have changed.</p>
<p><strong>Warning:</strong> <em><strong>Make sure to change the default password after you setup the SSH server!!!</strong></em> The default password is &#8216;alpine&#8217; and is well known. The first iPhone worm exploited the fact that <a href="http://www.maximumpc.com/article/news/first_virus_hits_jailbroken_iphone">people didn&#8217;t change the default password</a>!</p>
<p><strong>Requirements</strong></p>
<ul>
<li><em>Jailbroken iPhone/iPod Touch. </em>The SSH server is only available through Cydia, since Apple didn&#8217;t (and most likely never will) allow it into their App Store.</li>
<li><em>Wireless Router. </em>SSH is a network server, meaning that you need to have it connected to some network. The simplest way to do that with the iPhone is via a WiFi connection.</li>
</ul>
<p><strong>Setup SSH Server Instructions</strong></p>
<ol>
<li>Locate Cydia on your iPhone and start it.<a href="http://www.krizka.net/wp-content/uploads/2010/03/1.png"><img class="aligncenter size-full wp-image-1154" title="1" src="http://www.krizka.net/wp-content/uploads/2010/03/1.png" alt="" width="320" height="480" /></a></li>
<li>Click on the <em>Search</em> tab.<a href="http://www.krizka.net/wp-content/uploads/2010/03/2.png"><img class="aligncenter size-full wp-image-1155" title="2" src="http://www.krizka.net/wp-content/uploads/2010/03/2.png" alt="" width="320" height="480" /></a></li>
<li>Click on the search bar on top, and type in <em>openssh</em>. There should be only one result, as shown below.  Select it.<a href="http://www.krizka.net/wp-content/uploads/2010/03/3.png"><img class="aligncenter size-full wp-image-1156" title="3" src="http://www.krizka.net/wp-content/uploads/2010/03/3.png" alt="" width="320" height="480" /></a></li>
<li>Click the <em>Install</em> button in top right corner.<a href="http://www.krizka.net/wp-content/uploads/2010/03/4.png"><img class="aligncenter size-full wp-image-1157" title="4" src="http://www.krizka.net/wp-content/uploads/2010/03/4.png" alt="" width="320" height="480" /></a></li>
<li>Click the <em>Confirm</em> button and wait. <a href="http://www.krizka.net/wp-content/uploads/2010/03/5.png"><img class="aligncenter size-full wp-image-1158" title="5" src="http://www.krizka.net/wp-content/uploads/2010/03/5.png" alt="" width="320" height="480" /></a></li>
<li>After the SSH server is downloaded and installed, you can click the <em>Return to Cydia</em> button on the bottom of the screen. Do not exist Cydia yet, because we need to install one more tool.<a href="http://www.krizka.net/wp-content/uploads/2010/03/6.png"><img class="aligncenter size-full wp-image-1159" title="6" src="http://www.krizka.net/wp-content/uploads/2010/03/6.png" alt="" width="320" height="480" /></a></li>
<li>Now that we have installed the SSH server, we need to install a convenient way to turn it on and off. I prefer to use SBSettings, which is a drop-down menu that allows you to toggle SSH, WiFi and Bluetooth ON/OFF, and lists some useful informations. To install SBSettings, continue from the previous step by clicking the <em>Search</em> button to return to the search menu.<a href="http://www.krizka.net/wp-content/uploads/2010/03/7.png"><img class="aligncenter size-full wp-image-1160" title="7" src="http://www.krizka.net/wp-content/uploads/2010/03/7.png" alt="" width="320" height="480" /></a></li>
<li>Type in <em>SBSettings</em> and scroll down until you see the entry that just says SBSettings, as shown in the picture below. Select it.<a href="http://www.krizka.net/wp-content/uploads/2010/03/8.png"><img class="aligncenter size-full wp-image-1161" title="8" src="http://www.krizka.net/wp-content/uploads/2010/03/8.png" alt="" width="320" height="480" /></a></li>
<li>Click the <em>Install</em> button in the top right corner.<a href="http://www.krizka.net/wp-content/uploads/2010/03/9.png"><img class="aligncenter size-full wp-image-1162" title="9" src="http://www.krizka.net/wp-content/uploads/2010/03/9.png" alt="" width="320" height="480" /></a></li>
<li>Click the <em>Confirm</em> button and wait.<a href="http://www.krizka.net/wp-content/uploads/2010/03/10.png"><img class="aligncenter size-full wp-image-1163" title="10" src="http://www.krizka.net/wp-content/uploads/2010/03/10.png" alt="" width="320" height="480" /></a></li>
<li>After SBSettings is downloaded and installed, you need to restart your iPhone. This will start up SBSettings. Do so by clicking the <em>Reboot Device</em> button. (On iOS4.0, the button will say <em>Reload SpringBoard</em>. You do not have to reboot your device.)<a href="http://www.krizka.net/wp-content/uploads/2010/03/11.png"><img class="aligncenter size-full wp-image-1164" title="11" src="http://www.krizka.net/wp-content/uploads/2010/03/11.png" alt="" width="320" height="480" /></a></li>
<li>After your iPhone starts up again, place your finger in the top left corner of the screen, and slide it from left to right. SBSettings will pop down, listing all of the information. The best thing is that you do not have to be on the home screen to do this. You can do it while running any application.<a href="http://www.krizka.net/wp-content/uploads/2010/03/12.png"><img class="aligncenter size-full wp-image-1165" title="12" src="http://www.krizka.net/wp-content/uploads/2010/03/12.png" alt="" width="320" height="480" /></a></li>
<li>There are two important pieces of information that you see in the SBSettings window. The first is the SSH button in the top right corner. You can click it to toggle the SSH server on and off. Make sure it is in the <em>On</em> position. The second piece of information is the WiFi IP Address. This address is what you use when you connect to your iPhone, so write it down. It will be used in the next few steps.<a href="http://www.krizka.net/wp-content/uploads/2010/03/13.png"><img class="aligncenter size-full wp-image-1166" title="13" src="http://www.krizka.net/wp-content/uploads/2010/03/13.png" alt="" width="320" height="480" /></a></li>
<li>You can hide the SBSettings window by clicking the X button in the top left corner. The next few steps will show you how to connect to your iPhone from a computer. When you try connecting, make sure that the iPhone is turned on or otherwise it will be disconnected from the Internet. I suggest that you turn Autolock off.<a href="http://www.krizka.net/wp-content/uploads/2010/03/14.png"><img class="aligncenter size-full wp-image-1167" title="14" src="http://www.krizka.net/wp-content/uploads/2010/03/14.png" alt="" width="320" height="480" /></a></li>
</ol>
<p><strong>Connecting From Linux<br /></strong></p>
<ol>
<li>Make sure that you have the SSH clients installed. On Ubuntu, type in the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> openssh-client</pre></div></div>

</li>
<li>Connect to the iPhone using the following command. This will connect to the iPhone at IP address 192.168.1.111 (make sure to change it to what you wrote down before) using the root account.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> root<span style="color: #000000; font-weight: bold;">@</span>192.168.1.111</pre></div></div>

</li>
<li>You will be asked for a password. If this is your first time logging in, type in <em>alpine</em>. This is the default password, and we&#8217;ll change it in the next step.</li>
<li>If you typed in the correct password, you should see a prompt. Any commands that you type in will be executed on your iPhone!</li>
</ol>
<p><strong>Connecting From Windows</strong></p>
<p>None of the Windows versions come with an SSH client. However there are numerous free options that you can install. I prefer to use the <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY client</a>, which is what I&#8217;ll be using in the following steps</p>
<ol>
<li>Download PuTTY from the <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">download page</a> (<a href="http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe">direct link to 32-bit version</a>). The latest version at this moment is <em>0.60-beta</em>. The file you should download is putty.exe, which is the program itself. No installation is required.<a href="http://www.krizka.net/wp-content/uploads/2010/06/putty-download.png"><img class="aligncenter size-full wp-image-1262" title="putty-download" src="http://www.krizka.net/wp-content/uploads/2010/06/putty-download.png" alt="" width="1000" height="750" /></a></li>
<li>Find the downloaded program (<em>putty.exe</em>) and double-click it. Take a look at the screenshot below to see what the icon of the program looks like, to make it easier to locate it.<a href="http://www.krizka.net/wp-content/uploads/2010/06/putty-launch.png"><img class="aligncenter size-full wp-image-1263" title="putty-launch" src="http://www.krizka.net/wp-content/uploads/2010/06/putty-launch.png" alt="" width="570" height="570" /></a></li>
<li>The dialog displayed below should pop-up. Type the IP address of your iPhone into the textbox under <em>Host name (or IP address)</em> label. Also make sure <em>Connection type</em> is set to <em>SSH</em> (should be by default). When you are done, click the <em>Open</em> button to connect. The IP address I wrote into the picture below is different from that you see in the SBSettings picture, because I took this screenshot while connected to a different network. You should still use the IP address that you found via SBSettings.<a href="http://www.krizka.net/wp-content/uploads/2010/06/putty-dialog.png"><img class="aligncenter size-full wp-image-1266" title="putty-dialog" src="http://www.krizka.net/wp-content/uploads/2010/06/putty-dialog.png" alt="" width="456" height="442" /></a></li>
<li>A dialog box, displayed below, will pop-up asking you to accept a new fingerprint. Just click <em>Yes</em> to skip it. This just means that you haven&#8217;t connected to this server before and it wants to make sure that it is the correct one.<a href="http://www.krizka.net/wp-content/uploads/2010/06/putty-keyauth.png"><img class="aligncenter size-full wp-image-1270" title="putty-keyauth" src="http://www.krizka.net/wp-content/uploads/2010/06/putty-keyauth.png" alt="" width="386" height="237" /></a></li>
<li>You will be asked for a username. Type in <em>root</em>.</li>
<li>You will be asked for a password. The default password is <em>alpine</em>, but make sure to change it after you login!</li>
<li>If everything went right, you should see the prompt as displayed below.<br /><a href="http://www.krizka.net/wp-content/uploads/2010/06/putty-success.png"><img class="aligncenter size-full wp-image-1269" title="putty-success" src="http://www.krizka.net/wp-content/uploads/2010/06/putty-success.png" alt="" width="667" height="420" /></a></li>
</ol>
<p><strong>Connecting From Mac OS X</strong></p>
<p>The instructions for connecting to the SSH server from Mac OS X are the same as for Linux. Except you don&#8217;t have to install OpenSSH (Mac OS X comes with it) and you type the commands into the Terminal application.</p>
<ol>
<li>Open the Terminal application by searching for it via Spotlight.<a href="http://www.krizka.net/wp-content/uploads/2010/06/Screen-shot-2010-06-29-at-12.14.47-AM.png"><img class="aligncenter size-full wp-image-1272" title="Screen shot 2010-06-29 at 12.14.47 AM" src="http://www.krizka.net/wp-content/uploads/2010/06/Screen-shot-2010-06-29-at-12.14.47-AM.png" alt="" width="374" height="114" /></a></li>
<li>Connect to the iPhone using the following command. This will connect to the iPhone at IP address 192.168.1.111 (make sure to change it to what you wrote down before) using the root account.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> root<span style="color: #000000; font-weight: bold;">@</span>192.168.1.111</pre></div></div>

</li>
<li>You will be asked for a password. If this is your first time logging in, type in <em>alpine</em>. This is the default password, and we&#8217;ll change it in the next step.</li>
<li>If you typed in the correct password, you should see a prompt. Any commands that you type in will be executed on your iPhone!</li>
</ol>
<p><strong>Changing Password</strong></p>
<ol>
<li>Connect to your iPhone following the instructions above. All of the following commands will be run on it.</li>
<li>Lets change the password. Type in the following command.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">passwd</span></pre></div></div>

</li>
<li>You will be asked for a new password twice. Type in anything you want and hit enter to confirm it. As you type, no characters will appear on the screen, not even *. It is meant to be that way. If you make a mistake, I suggest that you hit the backspace key a lot of times and start typing over.</li>
<li>After you have changed the password, you can disconnect by typing in the following command. Next time you connect, don&#8217;t forget to use your new password instead of <em>alpine</em>.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">exit</span></pre></div></div>

</li>
</ol>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/XOq_uUF7dxeOKPxNchtaVAKQH5I/0/da"><img src="http://feedads.g.doubleclick.net/~a/XOq_uUF7dxeOKPxNchtaVAKQH5I/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/XOq_uUF7dxeOKPxNchtaVAKQH5I/1/da"><img src="http://feedads.g.doubleclick.net/~a/XOq_uUF7dxeOKPxNchtaVAKQH5I/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=rv0-T0UsBgE:gj0FMXDhtrM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=rv0-T0UsBgE:gj0FMXDhtrM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=rv0-T0UsBgE:gj0FMXDhtrM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=rv0-T0UsBgE:gj0FMXDhtrM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=rv0-T0UsBgE:gj0FMXDhtrM:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=rv0-T0UsBgE:gj0FMXDhtrM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=rv0-T0UsBgE:gj0FMXDhtrM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=rv0-T0UsBgE:gj0FMXDhtrM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/rv0-T0UsBgE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/06/28/setup-ssh-on-a-jailbroken-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<category domain="http://rss.financialcontent.com/stocksymbol">SSH</category><feedburner:origLink>http://www.krizka.net/2010/06/28/setup-ssh-on-a-jailbroken-iphone/</feedburner:origLink></item>
		<item>
		<title>Another Problem With Fingerprints And Linux: SSH and sudo</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/2SFEHPtz6XY/</link>
		<comments>http://www.krizka.net/2010/06/20/another-problem-with-fingerprints-and-linux-ssh-and-sudo/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 12:08:51 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1253</guid>
		<description><![CDATA[A few days ago I&#8217;ve managed to stumble across another problem with using fingerprint authentication on my X61 Tablet. The screenshot below summarizes it the best. If you run any command that asks you for your password over SSH, then it will ask you to swipe your finger. This is a problem because if you are SSH&#8217;ing [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p>A few days ago I&#8217;ve managed to stumble across another problem with using fingerprint authentication on my X61 Tablet. The screenshot below summarizes it the best.</p>
<p><img class="aligncenter size-full wp-image-1256" title="ssh-fingerprint" src="http://www.krizka.net/wp-content/uploads/2010/06/ssh-fingerprint.png" alt="" width="667" height="348" /></p>
<p>If you run any command that asks you for your password over SSH, then it will ask you to swipe your finger. This is a problem because if you are SSH&#8217;ing into your computer, then it most likely means that you are not physically present and so you cannot swipe your finger. The good news is that you don&#8217;t have to swipe your finger to actually login via SSH, so this isn&#8217;t as big of a problem. Only if you plan to use the <em>sudo</em> or <em>su</em> commands.</p>
<p>So what is the solution? I don&#8217;t think there is a good one. I did come up with a proposal for one, but it is not perfect since it doesn&#8217;t even work yet with my driver of choice (<a href="http://www.reactivated.net/fprint/wiki/Main_Page">fprint</a>). The best solution would be for the fingerprint driver to guess if it is being called from a remote machine or local machine, and fail based on that. However that is not possible yet. What I would propose instead is to prompt a user for a fingerprint, allow him to cancel it via a keyboard and then prompt him for a password.</p>
<p>This might not seem like a very good solution, since maybe you want your computer to be very secure and always want a biological identification. Asking for a password then defeats the purpose. If this is what you want, then I suggest you <a href="ftp://ftp.ccc.de/pub/documentation/Fingerabdruck_Hack/fingerabdruck.mpg">watch this video</a>. Fingerprints readers aren&#8217;t very secure and can be bypassed. I think the purpose of having a fingerprint reader is to provide a balance between security and practicality. Swiping a finger is much faster and easier than typing a long password. This is especially true when you are using a tablet and do not have access to a keyboard. And it is relatively secure, since an average person would not probably be able to bypass it. It does require a bit of work and equipment.</p>
<p>Before I begin, I will go over how the fingerprint drivers plug into the standard Linux authentication framework, <a href="http://en.wikipedia.org/wiki/Pluggable_Authentication_Modules">PAM</a>. This background information is not very throughout, since I have just learned it myself this morning. But it should give you enough knowledge to understand why this fingerprint problem is present and maybe to come up with alternate solutions. Please leave a comment if you do.</p>
<p>When a program wants to authenticate a user, it talks to PAM. PAM asks the program for a username and what <em>service</em> to authenticate for. The reason it asks for a service is that different services might have different rules for authentication. The rules for the service are stored in the file <em>/etc/pam.d/service-name</em>, where service-name is the name of the service. This file contains a list of rules, one rule per line. Comments start with the # symbol and are included. Each rule has the following syntax:</p>
<p><code>type control module</code></p>
<p>The <em>type</em> field is the type of the rule. There are different types. For example, the <em>auth</em> type is used to authenticate a user by prompting him for a password. The <em>control</em> field determines what action should be taken if the rule fails or succeeds. For example, a <em>required</em> control means that the rule must succeed for the user to be authenticated. On the other had, a <em>suffiecient</em> control means that if the rule succeed then the user is authenticated and if it fails, then the other rules will be tested. The <em>module</em> field is just a reference to which module will be used to test the rule. The <a href="http://linux.die.net/man/5/pam.d">pam.d manpage</a> contains a list of possible values for the <em>type</em> and <em>control</em> fields.</p>
<p>PAM starts by evaluating the rules in order. If the first rule tells it that the user is authenticated, then it finishes. If the first rule tells it that the user is not authenticated, then it proceeds to the next rule (or finishes) based on the value stored in the <em>control</em> field. A quirk is that a <em>required</em> rule is not always tested. For example, if the first rule is <em>sufficient</em>, then the user is authenticated whether any consequent <em>required</em> rules would fail or succeed.</p>
<p>If you followed <a href="http://www.krizka.net/2008/03/28/how-to-setup-fprint-for-fingerprint-authentication-on-ubuntu/">my tutorial</a> (or one of the many <a href="http://ubuntuforums.org/showthread.php?t=760018">countless</a> <a href="https://wiki.ubuntu.com/ThinkFinger">tutorials</a> <a href="http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger">on</a> <a href="http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader">the</a> <a href="http://www.krizka.net/2008/01/28/enabling-fingerprint-scanner-on-thinkpad-x61-running-ubuntu/">web</a>) to setup your finger print reader, then you added the following set of lines to the file /etc/pam.d/common-auth. This file is the set of rules that is included in almost every service defined in the same directory.</p>
<p><code>auth sufficient pam_fprint.so<br />auth required pam_unix.so nullok_secure</code></p>
<p>This means that PAM first asks for a fingerprint. If that fails (wrong finger, reader not present or hardware error&#8230;), then the first rule fails. Since the rule is only <em>sufficient</em>, then PAM proceeds to the next rule. The next rule is the rule for standard Unix password authentication. What I would like fprint to do is to fail (causing it to proceed to password prompt) if I hit a certain key. For example according to <a href="http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader#Configuring_pam">the ThinkWiki page, the properiaty bio_api driver already does this with the Ctrl+C key combination</a>. This way I could choose whether to use a fingerprint or proceed with typing in a password.</p>
<p>Of course, some people you use the keyboard more than the fingerprint reader. In that case, you can replace those two lines with the following.</p>
<p><code>auth sufficient pam_unix.so nullok_secure<br />auth required pam_fprint.so</code></p>
<p>This means &#8220;try password first, then fingerprint&#8221;. You can always cause the password prompt to fail by hitting Ctrl+C.</p>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/uOwwy28sdVJ8W66H9chv4_UJRDQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/uOwwy28sdVJ8W66H9chv4_UJRDQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/uOwwy28sdVJ8W66H9chv4_UJRDQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/uOwwy28sdVJ8W66H9chv4_UJRDQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=2SFEHPtz6XY:F5ix6KtI4T4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=2SFEHPtz6XY:F5ix6KtI4T4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=2SFEHPtz6XY:F5ix6KtI4T4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=2SFEHPtz6XY:F5ix6KtI4T4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=2SFEHPtz6XY:F5ix6KtI4T4:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=2SFEHPtz6XY:F5ix6KtI4T4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=2SFEHPtz6XY:F5ix6KtI4T4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=2SFEHPtz6XY:F5ix6KtI4T4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/2SFEHPtz6XY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/06/20/another-problem-with-fingerprints-and-linux-ssh-and-sudo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/06/20/another-problem-with-fingerprints-and-linux-ssh-and-sudo/</feedburner:origLink></item>
		<item>
		<title>ThinkPad X61 Tablet and Ubuntu Lucid Lynx</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/z3cD4UfkC0k/</link>
		<comments>http://www.krizka.net/2010/06/12/thinkpad-x61-tablet-and-ubuntu-lucid-lynx/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 16:44:50 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[lynx]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[x61t]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1244</guid>
		<description><![CDATA[I have been using my ThinkPad X61 Tablet on Ubuntu Lucid Lynx for about a month now, so I think I am comfortable in writing an update about how well those two work together. To make a long story short, most items are unchanged since Ubuntu Karmic Koala. What worked before still works, what didn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p><a href="http://www.krizka.net/wp-content/uploads/2010/06/lenovo_thinkpad_x60_tablet_pc.jpg"><img class="aligncenter size-full wp-image-1246" title="lenovo_thinkpad_x60_tablet_pc" src="http://www.krizka.net/wp-content/uploads/2010/06/lenovo_thinkpad_x60_tablet_pc.jpg" alt="" width="550" height="547" /></a>I have been using my ThinkPad X61 Tablet on <a href="https://wiki.ubuntu.com/LucidLynx">Ubuntu Lucid Lynx</a> for about a month now, so I think I am comfortable in writing an update about how well those two work together. To make a long story short, most items are unchanged since <a href="http://www.krizka.net/2009/11/05/thinkpad-x61-tablet-and-ubuntu-karmic-koala/">Ubuntu Karmic Koala</a>. What worked before still works, what didn&#8217;t work before still doesn&#8217;t work. The one thing that changed is that to get the scrolling via the TrackPoint to work, you have to create a new file. Read on to see what needs to be changed.</p>
<p>Further documentation is available on the X61T&#8217;s <a href="http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_(Lucid_Lynx)_on_an_X61_Tablet">Lucid</a> <a href="http://www.thinkwiki.org/wiki/Category:X61_Tablet">ThinkWiki</a> page and the <a href="https://help.ubuntu.com/community/X61T">Ubuntu Wiki</a>. However at the time of writing, neither has been updated for Lucid.</p>
<p>Before I start talking about Ubuntu Lucid Lynx, I want to write a quick summary about the hardware. My tablet is the one with the SWGA screen and does not have finger-touch capabilities. You have to use the cheap pen, included with the tablet, for input. The tablet also has 2 GB of memory and a Core 2 Duo processor running at a maximum of 1.6 GHz. The processor also supports other frequencies, like 800 MHz and 1.2 GHz. The frequencies can be changed using the standard Linux tools right away.</p>
<p><strong>Wireless</strong></p>
<p>The wireless connection works out of the box. It uses the <em>iwlagn</em> kernel module.</p>
<p><strong>Touchscreen (Pen Only)</strong></p>
<p>The touch screen works out of the box using the Wacom pen. I don&#8217;t know about finger-touch support, since as I do not have that capability.</p>
<p>I recommend that you instal <a href="http://xournal.sourceforge.net/">xournal</a> for note-taking and <a href="http://code.google.com/p/cellwriter/">cellwriter</a> (<a href="http://www.krizka.net/2008/01/02/cellwriter-handwritting-recognition-for-gnome/">my tips and tricks</a>) for handwriting recognition. Both are available in the official Ubuntu repository, but are not installed by default.</p>
<p><strong>Extra Buttons/Screen Buttons</strong></p>
<p>All of the extra keyboard buttons work out of the box, with the exception of the zoom button (Fn+Space). The buttons that work are the volume buttons, the ThinkVantage button and all Fn buttons. The buttonson the screen are the rotate button, the toolbox button, the escape button and the arrow buttons.</p>
<p>By work, I mean they report a valid symbol to X.Org. For some of them, you have to bind them to an action to make them do something useful.</p>
<p><strong>Middle Button Scrolling Using TrackPoint</strong></p>
<p>You cannot use the TrackPoint as a scroll button out of the box. In Karmic, you had to create a file, such that HAL would know to enable this feature. However Lucid no longer uses HAL, instead it reverted back to X.org&#8217;s own device configuration system. So you have to create a file for X.org. The contents are still the same, only the syntax changed.</p>
<p>To create this file, run the following command to open a text editor:</p>
<p><code>sudo gedit /usr/lib/X11/xorg.conf.d/20-thinkpad.conf</code></p>
<p>And place the following text into it:</p>
<p><code>Section "InputClass"<br /> Identifier "Trackpoint Wheel Emulation"<br /> MatchProduct "TrackPoint"<br /> MatchDevicePath "/dev/input/event*"<br /> Driver "evdev"<br /> Option "EmulateWheel" "true"<br /> Option "EmulateWheelButton" "2"<br /> Option "Emulate3Buttons" "false"<br /> Option "XAxisMapping" "6 7"<br /> Option "YAxisMapping" "4 5"<br /> EndSection</code></p>
<p>Save the file and restart X.org. After that, you can scroll by holding down the middle mouse button and moving your TrackPoint up-and-down at the same time.</p>
<p>I stole these instructions from <a href="http://psung.blogspot.com/2010/04/thinkpad-trackpoint-scrolling-in-ubuntu.html">Phil Sung</a>, who stole them from <a href="http://dlv.blogspot.com/2010/04/udev-xorgconfd-snippet.html">Samson Yeung</a>.</p>
<p><strong>Suspend/Hibernate</strong></p>
<p>Both work out of the box without any problems.</p>
<p><strong>Hard Drive Accelerometer</strong></p>
<p>The hard drive accelerometer <em>STILL</em> does not work out of the box. It will report the position (0,-3) regardless of the real position. My understanding is that there are some political problems (legal, ideal?) as to why it hasn&#8217;t been fixed yet.</p>
<p>To get the accelerometer to work, you have to compile it manually from the <a href="http://tpctl.sourceforge.net/">tp_smapi package</a>. I&#8217;ve already <a href="http://www.krizka.net/2009/11/01/thinkpad-x61-tablet-tilt-detection-and-ubuntu-karmic-koala/">documented how to do this for Karmic</a>, and the same steps apply to Lucid.</p>
<p>Of course, you still have to install some packages to make it do something useful. I suggest that you install <a href="http://sourceforge.net/projects/hdaps/">hdapsd</a>, which will spin down your disk when motion is detected. This prevents it from being damaged.</p>
<p><code>sudo aptitude install hdapsd</code></p>
<p>Also my <a href="http://www.krizka.net/projects/autorotate/">AutoRotate daemon</a> is quite cool. It rotates your screen automatically based on orientation.</p>
<p><strong>Fingerprint Scanner</strong></p>
<p>The scanner does not work out of the box. And even after manual configuration, you can only go so far. While the hardware is supported, the software that uses it isn&#8217;t that great. You can configure PAM to allow you to login via fingerprints, but it cannot identify the based on the fingerprint and it always asks for a specific finger at a time.</p>
<p>The best software for this is <a href="http://www.reactivated.net/fprint/wiki/Main_Page">fprint</a>. I have written a tutorial on <a href="http://www.krizka.net/2008/03/28/how-to-setup-fprint-for-fingerprint-authentication-on-ubuntu/">how to configure fprint</a>. However you no longer have to add the PPA in it, since fprint is now part of the official Ubuntu repository.</p>
<p>Another choice is <a href="http://thinkfinger.sourceforge.net/">thinkfinger</a>. I have also written a <a href="http://www.krizka.net/2008/01/28/enabling-fingerprint-scanner-on-thinkpad-x61-running-ubuntu/">tutorial for it</a>.</p>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/sdFZ9mM7fobUMdb9nfIEBYIGSo4/0/da"><img src="http://feedads.g.doubleclick.net/~a/sdFZ9mM7fobUMdb9nfIEBYIGSo4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/sdFZ9mM7fobUMdb9nfIEBYIGSo4/1/da"><img src="http://feedads.g.doubleclick.net/~a/sdFZ9mM7fobUMdb9nfIEBYIGSo4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=z3cD4UfkC0k:s8msQrRzRIY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=z3cD4UfkC0k:s8msQrRzRIY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=z3cD4UfkC0k:s8msQrRzRIY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=z3cD4UfkC0k:s8msQrRzRIY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=z3cD4UfkC0k:s8msQrRzRIY:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=z3cD4UfkC0k:s8msQrRzRIY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=z3cD4UfkC0k:s8msQrRzRIY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=z3cD4UfkC0k:s8msQrRzRIY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/z3cD4UfkC0k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/06/12/thinkpad-x61-tablet-and-ubuntu-lucid-lynx/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/06/12/thinkpad-x61-tablet-and-ubuntu-lucid-lynx/</feedburner:origLink></item>
		<item>
		<title>AutoRotate 0.4.1 Released</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/azwHunEemDc/</link>
		<comments>http://www.krizka.net/2010/06/11/autorotate-0-4-1-released/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 02:14:54 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[autorotate]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[x61t]]></category>
		<category><![CDATA[xrandr]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1237</guid>
		<description><![CDATA[Today I took some time to update the AutoRotate daemon to work with Ubuntu Lucid. There were a few small changes that I had to make, so I decided to slightly increment the version of the package. You can download the source code here. Also Ubuntu users can install it automatically from my PPA. Change Log [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p>Today I took some time to update the <a href="http://www.krizka.net/projects/autorotate/">AutoRotate daemon</a> to work with Ubuntu Lucid. There were a few small changes that I had to make, so I decided to slightly increment the version of the package. You can <a href="http://download.krizka.net/autorotate-0.4.1.tar.gz">download the source code here</a>. Also Ubuntu users can <a href="http://www.krizka.net/projects/autorotate/installation-ubuntu/">install it automatically</a> from <a href="https://launchpad.net/~kkrizka/+archive/thinkpad-x61t">my PPA</a>.</p>
<p><strong>Change Log</strong></p>
<ul>
<li>Use <em>xsetwacom &#8211;list</em> to get a list of all WACOM devices</li>
</ul>
<p>The next addition I am planning to work on next is to write a simple indicator menu to control the daemon. I&#8217;ve created a <a href="http://ubuntuforums.org/showthread.php?t=1507531">post on the Ubuntu Forums</a> asking for suggestions.</p>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/jhyLfZn9WwS9Yx9jlu4H68oxXD4/0/da"><img src="http://feedads.g.doubleclick.net/~a/jhyLfZn9WwS9Yx9jlu4H68oxXD4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jhyLfZn9WwS9Yx9jlu4H68oxXD4/1/da"><img src="http://feedads.g.doubleclick.net/~a/jhyLfZn9WwS9Yx9jlu4H68oxXD4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=azwHunEemDc:I5193o2NGyw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=azwHunEemDc:I5193o2NGyw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=azwHunEemDc:I5193o2NGyw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=azwHunEemDc:I5193o2NGyw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=azwHunEemDc:I5193o2NGyw:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=azwHunEemDc:I5193o2NGyw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=azwHunEemDc:I5193o2NGyw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=azwHunEemDc:I5193o2NGyw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/azwHunEemDc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/06/11/autorotate-0-4-1-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/06/11/autorotate-0-4-1-released/</feedburner:origLink></item>
		<item>
		<title>Symphony of Science – The Case For Mars</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/3klEM5dxj8E/</link>
		<comments>http://www.krizka.net/2010/06/07/symphony-of-science-the-case-for-mars/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 01:14:38 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1235</guid>
		<description><![CDATA[This is the sixth installment in the Symphony of Science musical series. This one includes Robert Zubrin, Carl Sagan, Brian Cox, and Penelope Boston. The topic is the exploration &#8230; or colonization&#8230; of Mars! The MP3 version can be downloaded from the Symphony of Science website.]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p><center><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/BZ5sWfhkpE0&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BZ5sWfhkpE0&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></center></p>
<p>This is the sixth installment in the Symphony of Science musical series. This one includes Robert Zubrin, Carl Sagan, Brian Cox, and Penelope Boston. The topic is the exploration &#8230; or colonization&#8230; of Mars!</p>
<p>The MP3 version can be downloaded from the <a href="http://symphonyofscience.com/">Symphony of Science</a> website.</p>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/ZIZS01VceNPNRHzmS6QBel7Vxag/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZIZS01VceNPNRHzmS6QBel7Vxag/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZIZS01VceNPNRHzmS6QBel7Vxag/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZIZS01VceNPNRHzmS6QBel7Vxag/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3klEM5dxj8E:HROnpCf6hCY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=3klEM5dxj8E:HROnpCf6hCY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3klEM5dxj8E:HROnpCf6hCY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=3klEM5dxj8E:HROnpCf6hCY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3klEM5dxj8E:HROnpCf6hCY:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3klEM5dxj8E:HROnpCf6hCY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3klEM5dxj8E:HROnpCf6hCY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3klEM5dxj8E:HROnpCf6hCY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/3klEM5dxj8E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/06/07/symphony-of-science-the-case-for-mars/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/06/07/symphony-of-science-the-case-for-mars/</feedburner:origLink></item>
		<item>
		<title>Converting Between kCGWindowBounds and NSWindow#frame</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/3PXLk7JnhGc/</link>
		<comments>http://www.krizka.net/2010/04/20/converting-between-kcgwindowbounds-and-nswindowframe/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 06:27:32 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Quartz]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[CGRect]]></category>
		<category><![CDATA[coordinates]]></category>
		<category><![CDATA[frame]]></category>
		<category><![CDATA[kCGWindowBounds]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[NSRect]]></category>
		<category><![CDATA[NSScreen]]></category>
		<category><![CDATA[NSWindow]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1227</guid>
		<description><![CDATA[kCGWindowBounds is a field in a dictionary returned by the CGWindowListCopyWindowInfo function. This fields lists the dimensions of a window displayed by the Quartz Window System (Mac OS X&#8217;s analogue of X11). I was trying to use this field to resize a NSWindow object that I was controlling, with the idea to create a window [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p><a href="http://developer.apple.com/mac/library/documentation/Carbon/Reference/CGWindow_Reference/Constants/Constants.html#//apple_ref/doc/c_ref/kCGWindowBounds">kCGWindowBounds</a> is a field in a dictionary returned by the <a href="http://developer.apple.com/mac/library/documentation/Carbon/Reference/CGWindow_Reference/Reference/Functions.html#//apple_ref/doc/uid/TP40008073-CH2-SW1">CGWindowListCopyWindowInfo</a> function. This fields lists the dimensions of a window displayed by the Quartz Window System (Mac OS X&#8217;s analogue of X11). I was trying to use this field to resize a <a href="http://developer.apple.com/mac/library/documentation/cocoa/reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html">NSWindow</a> object that I was controlling, with the idea to create a window picker. The problem is that kCGWindowBounds&#8217; coordinates are not the same ones as used by <a href="http://developer.apple.com/mac/library/documentation/cocoa/reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html#//apple_ref/occ/instm/NSWindow/frame">NSWindow&#8217;s frame property</a>, and it took me a while to realize this. Which is why I am sharing what I found out.</p>
<p>Both kCGWindowBounds and NSWindow&#8217;s frame property are instances of CGRect (technically, NSWindow uses a NSRect but all literature I found says it is equivalent to CGRect). This object has two attributes; a point (origin) and dimensions (size). The difference between the CGRect returned by kCGWindowBounds and NSWindow&#8217;s frame property is that:</p>
<ul>
<li><strong>kCGWindowBounds</strong> measures the origin as the <em>top-left corner of the rectangle relative to the top-left corner of the screen</em></li>
<li><strong>NSWindow&#8217;s frame property</strong> measures the origin as the <em>bottom-left corner of the rectangle relative to the bottom-left corner of the screen</em></li>
</ul>
<p>So if you want to convert between the two representations of the same information, you have to do the following. It is the same conversion if you are going from kCGWindowBounds to NSWindow#frame or in the other direction.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">bounds.origin.y<span style="color: #002200;">=</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSScreen</span> mainScreen<span style="color: #002200;">&#93;</span> frame<span style="color: #002200;">&#93;</span>.size.height<span style="color: #002200;">-</span>bounds.origin.y<span style="color: #002200;">-</span>bounds.size.height;</pre></div></div>

</div>

<p><a href="http://feedads.g.doubleclick.net/~a/LjfYaJbyXOZz5d88-jcker_M3J0/0/da"><img src="http://feedads.g.doubleclick.net/~a/LjfYaJbyXOZz5d88-jcker_M3J0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/LjfYaJbyXOZz5d88-jcker_M3J0/1/da"><img src="http://feedads.g.doubleclick.net/~a/LjfYaJbyXOZz5d88-jcker_M3J0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3PXLk7JnhGc:PXJS8pMTpgA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=3PXLk7JnhGc:PXJS8pMTpgA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3PXLk7JnhGc:PXJS8pMTpgA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=3PXLk7JnhGc:PXJS8pMTpgA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3PXLk7JnhGc:PXJS8pMTpgA:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3PXLk7JnhGc:PXJS8pMTpgA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3PXLk7JnhGc:PXJS8pMTpgA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=3PXLk7JnhGc:PXJS8pMTpgA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/3PXLk7JnhGc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/04/20/converting-between-kcgwindowbounds-and-nswindowframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/04/20/converting-between-kcgwindowbounds-and-nswindowframe/</feedburner:origLink></item>
		<item>
		<title>Installing a Hard Drive Into The Antec 900 Case</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/BQTedTtUHsc/</link>
		<comments>http://www.krizka.net/2010/04/19/installing-a-hard-drive-into-the-antec-900-case/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 19:39:19 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1189</guid>
		<description><![CDATA[My main desktop computer, tiny101, recently run out of hard disk space. Instead of clearing out everything, I decided to visit NCIX and purchase 2 new 2 TB drives (Western Digital). However when I started installing them, I realized that my previous storage disk (1 TB, Samsung) was not installed properly. It was just placed [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p>My main desktop computer, <a href="http://www.krizka.net/2007/07/30/new-computer-tiny101/">tiny101</a>, recently run out of hard disk space. Instead of clearing out everything, I decided to visit <a href="http://www.ncix.com">NCIX</a> and purchase 2 new <a href="http://ncix.com/products/?sku=49591&amp;vpn=WD20EARS&amp;manufacture=Western%20Digital%20WD">2 TB drives (Western Digital)</a>. However when I started installing them, I realized that my previous storage disk (1 TB, Samsung) was not installed properly. It was just placed into one of the trays and connected to the motherboard. As you can imagine, this is not good for it. In this tutorial, I plan to go over how I rectified this problem by properly installing the hard drive into my <a href="http://www.antec.com/Believe_it/product.php?id=MjM=">Antec Nine Hundred Gaming Case</a>.</p>
<p>Before I begin with the tutorial, I want to say that <a href="http://www.antec.com">Antec</a> has great customer support. The Antec 900 case requires special hard drive screws, which I did not have. But when I asked them where I can buy those screws, this was their response:</p>
<blockquote><p>We can send the part/s out to you. Please reply back with your postal address.</p>
</blockquote>
<p>They did not charge for the parts or even ask to see a receipt to prove that I own an Antec case. After this experience, I am quite glad that three years ago I chose an Antec case.</p>
<p><strong>Requirements</strong></p>
<ul>
<li><em>Antec 900 Case</em>, but I would imagine that the other cases in the family have similar instructions.</li>
<li><em>4 Antec 900 hard drive screws</em>, per disk. These are special long screws and not the standard short screws. You should have received as spare set with your case, but if you lost them you can always contact Antec support and ask for more.</li>
<li><em>1 SATA cable</em>, per disk. I am assuming that your bought a SATA disk. If you have a different type of disk, you can still follow these instructions to install the disk into into the case. However you are on your own when it comes connecting the disk to the mother board.</li>
<li>1 <em>hard disk </em>(DUh?)</li>
<li><em>Phillips head screw-driver</em>, for the hard drive screws.</li>
<li>A<em> vaccum cleaner</em>. Since your case is open, I recommend that you take some time to clean out <a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090198.png">some of the dust</a>.</li>
</ul>
<p><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090167.png"><img class="aligncenter size-medium wp-image-1195" title="P3090167" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090167-300x225.png" alt="" width="300" height="225" /></a></p>
<p><strong>Instructions</strong></p>
<ol>
<li>Disconnect all of the external cables from the case and move the somewhere with a lot of space.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090172.png"><img class="aligncenter size-full wp-image-1198" title="P3090172" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090172.png" alt="" width="750" height="1000" /></a>Remove 4 of the big, black screws on the back of the case. There are two on each side, holding down the side panels. You do not need a screw-driver for them, instead use your hands. After you remove them, place them in a place where you won&#8217;t loose them.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090175.png"><img class="aligncenter size-full wp-image-1201" title="P3090175" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090175.png" alt="" width="1000" height="750" /></a>Remove the two side panels by moving them towards the back of the case for one centimeter, and then pulling them toward you.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090176.png"><img class="aligncenter size-full wp-image-1202" title="P3090176" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090176.png" alt="" width="1000" height="750" /></a>Disconnect any already connected hard drives. Make sure to remember how they were connected, because you will have to reconnect them later. If you are installing your hard drive in a cage different from the current hard drive, you can skip this step. The hard drive can be put into any of the two cages located in the front (each cage holds up to 3 hard drives). A cage is just a small box that can be pulled out from the case. Take a quick look at the picture in step 8 to see what a cage looks like.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090178.png"><img class="aligncenter size-full wp-image-1203" title="P3090178" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090178.png" alt="" width="1000" height="750" /></a>Disconnect the fans of the cage that you will be installing the hard drive into. Each fan is connected only to the power supply by a two thin wires. You can find those wires at the back of the case, as demonstrated in one of the pictures above. Then just follow the two wires until you reach the power cable. Both wires are connected to the power supply via the same plug. Unplug that plug, but remember which one it was! You will have to reconnect the fans after you are done!</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/gray.png"><img class="aligncenter size-full wp-image-1204" title="gray" src="http://www.krizka.net/wp-content/uploads/2010/04/gray.png" alt="" width="2000" height="750" /></a>Unscrew the thumb grayscrews from the cage that you will be using. There are two screws on each side of the cage (thus 4 in total). Place those screws somewhere safe, but make sure not to mix them up with the black screws from the side panels. They are different!</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090182.png"><img class="aligncenter size-full wp-image-1207" title="P3090182" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090182.png" alt="" width="1000" height="750" /></a>Gently pull out the cage through the front. Start by pushing it from inside the cage and end by pulling it from the outside after you can get a good grip. If for some reason you get stuck, investigate why! Maybe you forgot to unplug some wires. One more friendly warning: If you have not cleaned your computer in some time, make sure to have a vacuum cleaner turned on when you do this step. A handful of dust is guaranteed to come out.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090184.png"><img class="aligncenter size-full wp-image-1208" title="P3090184" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090184.png" alt="" width="1000" height="750" /></a>Put the cage somewhere where you can see it.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090185.png"><img class="aligncenter size-full wp-image-1209" title="P3090185" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090185.png" alt="" width="1000" height="750" /></a>Place your disk inside one of the free compartments inside the cage. Look at the picture above to see what a free compartment looks like.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090186.png"><img class="aligncenter size-full wp-image-1210" title="P3090186" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090186.png" alt="" width="1000" height="750" /></a>Make sure you place the disk in a way such that the connectors stick out. In the picture, I placed my new disk into the second compartment from bottom.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090188.png"><img class="aligncenter size-full wp-image-1211" title="P3090188" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090188.png" alt="" width="1000" height="750" /></a>Look for holes on the side of the cage. After you found them, screw the long hard drive screws into them. They should go through the cage and into the hard drive. Remember that there are 2 screws per side of the cage (4 in total). You will need a Phillips head screw driver for this.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090182-1.png"><img class="aligncenter size-full wp-image-1212" title="P3090182-1" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090182-1.png" alt="" width="1000" height="750" /></a>Slide the cage back into the case. Make sure to put in the fan wires first. This is essentially step 7 in reverse.</li>
<li>Reconnect the fans (and any old disks) you disconnected earlier.</li>
<li>Connect the new hard drive to the motherboard. I described how to do it in the next section of this tutorial.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090194.png"><img class="aligncenter size-full wp-image-1213" title="P3090194" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090194.png" alt="" width="750" height="1000" /></a>Put in the gray thumbscrews to hold the cage in place. If you forgot where they came from, then look at the picture above. They go through the wide slits.</li>
<li>Slide the two side panels back by doing step 3 in reverse. This step can be quite tricky, because there are slits in the side panels that the case has go through. After you are done, the panels should fit snuggly into the case.</li>
<li>Fasten the side panels by screwing in the black thumbscrews on the back.</li>
<li>Now you have successfully installed a hard drive in the Antec 900 case! In the next few steps, I will guide you through how to connect it to the motherboard (which you should already have done in step 14&#8230;). I assume your disk was SATA (very common for personal computers).</li>
</ol>
<p><strong>Connecting A SATA Hard Drive to the Motherboard</strong></p>
<ol>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090170.png"><img class="aligncenter size-full wp-image-1215" title="P3090170" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090170.png" alt="" width="1000" height="236" /></a>Familiarize yourself with the important ports on your hard drive. I described them above.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090190.png"><img class="aligncenter size-full wp-image-1220" title="P3090190" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090190.png" alt="" width="1000" height="750" /></a>Find an empty SATA power plug comming from your power supply. They look something like this. In my case, the plugs have &#8220;S-ATA 3&#8243; written on them.</li>
<li>Connect the plug to the power port on the hard drive. The plug goes in at a specific orentation. The yellow cable should point toward the motherboard. You should have located the port in step 1.</li>
<li><a href="http://www.krizka.net/wp-content/uploads/2010/04/P3090191.png"><img class="aligncenter size-full wp-image-1218" title="P3090191" src="http://www.krizka.net/wp-content/uploads/2010/04/P3090191.png" alt="" width="1000" height="750" /></a>Find an empty SATA plug on your motherboard. They look something like in the picture above. </li>
<li>Connect one end of the SATA cable into that plug. It does not matter which end of the cable you plug in, because both ends are the same. But there is a specific orientation at which the cable goes into the plug. Look at the shape of the plug and the cable to figure out which way it should go in. Sadly, there are no easy markings to describe it.</li>
<li>Connect the other end of the SATA cable into the SATA port on your hard disk. You should have located the port in step 1.</li>
<li>Turn on your computer and enter the BIOS. It should have detected your hard drive, if you have done everything correctly.</li>
</ol>
<p><strong>Further Resources</strong></p>
<ul>
<li><a href="http://www.antec.com/Believe_it/product.php?id=MjM=">Antec 900 Product Page</a></li>
<li><a href="http://www.antec.com/Believe_it/specs/900_spe.html">Antec 900 Specifications</a></li>
<li><a href="http://www.antec.com/Believe_it/index.php?page=support_productInfo_details&amp;ProdID=15900">Antec 900 Support Page</a></li>
<li><a href="http://www.antec.com/pdf/manuals/900_EN_manual_revised.pdf">Antec 900 Manual (English)</a></li>
</ul>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/XjcjZmnkTgj3Hs5znRNQh0sBkW4/0/da"><img src="http://feedads.g.doubleclick.net/~a/XjcjZmnkTgj3Hs5znRNQh0sBkW4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/XjcjZmnkTgj3Hs5znRNQh0sBkW4/1/da"><img src="http://feedads.g.doubleclick.net/~a/XjcjZmnkTgj3Hs5znRNQh0sBkW4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=BQTedTtUHsc:fPlhrr4_Eh0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=BQTedTtUHsc:fPlhrr4_Eh0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=BQTedTtUHsc:fPlhrr4_Eh0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=BQTedTtUHsc:fPlhrr4_Eh0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=BQTedTtUHsc:fPlhrr4_Eh0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=BQTedTtUHsc:fPlhrr4_Eh0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=BQTedTtUHsc:fPlhrr4_Eh0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=BQTedTtUHsc:fPlhrr4_Eh0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/BQTedTtUHsc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/04/19/installing-a-hard-drive-into-the-antec-900-case/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/04/19/installing-a-hard-drive-into-the-antec-900-case/</feedburner:origLink></item>
		<item>
		<title>Generating Random Music</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/AqEvQ6TgW2w/</link>
		<comments>http://www.krizka.net/2010/03/09/generating-random-music/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 19:23:13 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[libmidi]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1123</guid>
		<description><![CDATA[A while ago, I wrote a tutorial on how to get the NBC/NXC running on Linux in order to program an Mindstorm NXT brick. In the tutorial, I posted an example script that turns the robot into a dancer and plays some music. The only problem is that the music was just set of random [...]]]></description>
			<content:encoded><![CDATA[<div class="KonaBody">
<p>A while ago, I wrote a <a href="http://www.krizka.net/2009/12/27/starting-mindstorm-nxt-2-0-development-on-linux/">tutorial on how to get the NBC/NXC running on Linux in order to program an Mindstorm NXT brick</a>. In the tutorial, I posted an example script that turns the robot into a dancer and plays some music. The only problem is that the music was just set of random frequencies and thus was unbearable to listen to. So I though, is there a way to make it less random without the need to make it play the same thing over and over again?</p>
<p>Experimenting with this idea lead me to write the <a href="http://www.krizka.net/projects/libmidi/">libmidi library</a>. MIDI files are a collection of notes, so it seemed as the best format to use. It allowed me to just generate random notes and tell the MIDI player to play them in some order. The library also includes an example called <em>randommusic</em>, but just does the same thing as the dancing robot. It just plays 128 random notes. This is what it sounds like:</p>
<p>I am no expert on music theory, but from what I understand most songs contain only notes in one scale. And the idea also works the other way, playing notes in a scale can result in a song. The song won&#8217;t be a masterpiece, but it will be bearable. Since I am too lazy to pre-program every possible scale, I decided that I will only limit notes to ones found in an existing song instead of a scale.</p>
<p>After analyzing Piano Sonata No.1, that I grabbed from <a href="http://www.kunstderfuge.com/">Kunst der Fuge</a> some time ago, I get the following result:</p>
<p>It sounds much better than before, but it still sounds like it is all over the place. To fix this, I applied one more change to how the next note is picked by looking at one more piece of information when analyzing the song; the note that was played previously. That is if note B never follows note A in the existing song, then it should never do so in the random music. Here is the result:</p>
<p>That was a big improvement! I think that is where I will stop working on this. But more tweaks could be done in the future:</p>
<ul>
<li>Add random rhythm</li>
<li>Analyze multiple songs</li>
</ul>
<p>Of course, the code still needs to be ported to NXT to make a much more improved dancer robot.</p>
<p>The script that I wrote to do this can be downloaded here and is released under the GPL3 license. To use it, you need to have <a href="http://www.krizka.net/projects/libmidi/">libmidi</a> and ROOT installed. This is how it works:</p>
<ol>
<li>Analyze the song</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>analyze input.mid output.root</pre></div></div>

</li>
<li>Generate a random tune.
<ul>
<li>The first argument is the track of the orignal song to analyze, and should be set as <em>track1</em>, <em>track2</em> and so on. Also you can set it to <em>song</em>, which uses all tracks.</li>
<li>The second argument is the ROOT file with the analyzed song created in step 1</li>
<li>The third argument is the output MIDI where the result will be saved</li>
<li>The fourth argument is optional. Specifying it will ignore any previous note conditional probability.</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>generate track input.root output.mid <span style="color: #7a0874; font-weight: bold;">&#91;</span>unconditional<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

</li>
</ol>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/ElVkmNzWoCTg419s7_OiVt2rVH8/0/da"><img src="http://feedads.g.doubleclick.net/~a/ElVkmNzWoCTg419s7_OiVt2rVH8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ElVkmNzWoCTg419s7_OiVt2rVH8/1/da"><img src="http://feedads.g.doubleclick.net/~a/ElVkmNzWoCTg419s7_OiVt2rVH8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=AqEvQ6TgW2w:H11rE7UTPnA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=AqEvQ6TgW2w:H11rE7UTPnA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=AqEvQ6TgW2w:H11rE7UTPnA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=AqEvQ6TgW2w:H11rE7UTPnA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=AqEvQ6TgW2w:H11rE7UTPnA:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=AqEvQ6TgW2w:H11rE7UTPnA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=AqEvQ6TgW2w:H11rE7UTPnA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=AqEvQ6TgW2w:H11rE7UTPnA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/AqEvQ6TgW2w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/03/09/generating-random-music/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://www.krizka.net/wp-content/uploads/2010/02/conditional.mp3" length="3130215" type="audio/mpeg" />
<enclosure url="http://www.krizka.net/wp-content/uploads/2010/02/unconditional.mp3" length="3110520" type="audio/mpeg" />
<enclosure url="http://www.krizka.net/wp-content/uploads/2010/02/totallyrandommusic.mp3" length="471409" type="audio/mpeg" />
		<feedburner:origLink>http://www.krizka.net/2010/03/09/generating-random-music/</feedburner:origLink></item>
		<item>
		<title>GO CANADA GO!</title>
		<link>http://feedproxy.google.com/~r/KarolKrizkaBlog/~3/NKs-YiQGHyw/</link>
		<comments>http://www.krizka.net/2010/02/28/go-canada-go/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 00:14:32 +0000</pubDate>
		<dc:creator>Karol Krizka</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.krizka.net/?p=1139</guid>
		<description />
			<content:encoded><![CDATA[<div class="KonaBody">
<div style="text-align: center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/uZWxErEbQkY&amp;hl=en_GB&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/uZWxErEbQkY&amp;hl=en_GB&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/3ltqgMvUbXtYq2mMKo01pZxvk1M/0/da"><img src="http://feedads.g.doubleclick.net/~a/3ltqgMvUbXtYq2mMKo01pZxvk1M/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/3ltqgMvUbXtYq2mMKo01pZxvk1M/1/da"><img src="http://feedads.g.doubleclick.net/~a/3ltqgMvUbXtYq2mMKo01pZxvk1M/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=NKs-YiQGHyw:_jBYeqlJXr0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=NKs-YiQGHyw:_jBYeqlJXr0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=NKs-YiQGHyw:_jBYeqlJXr0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?i=NKs-YiQGHyw:_jBYeqlJXr0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=NKs-YiQGHyw:_jBYeqlJXr0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=NKs-YiQGHyw:_jBYeqlJXr0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=NKs-YiQGHyw:_jBYeqlJXr0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?a=NKs-YiQGHyw:_jBYeqlJXr0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/KarolKrizkaBlog?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/KarolKrizkaBlog/~4/NKs-YiQGHyw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.krizka.net/2010/02/28/go-canada-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.krizka.net/2010/02/28/go-canada-go/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 1.918 seconds -->
