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

<channel>
	<title>ButlerPC Blog &#187; technical</title>
	<atom:link href="http://www.butlerpc.net/blog/category/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.butlerpc.net/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 05 Apr 2012 18:10:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Execute a command for each file in a directory recursively on Linux</title>
		<link>http://www.butlerpc.net/blog/2012/02/execute-a-command-for-each-file-in-a-directory-recursively-on-linux/</link>
		<comments>http://www.butlerpc.net/blog/2012/02/execute-a-command-for-each-file-in-a-directory-recursively-on-linux/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 05:04:16 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=329</guid>
		<description><![CDATA[I recently wanted to make a change &#8212; actually a string replacement &#8212; in every file in the current directory and all directories beneath it, perhaps filtering by file extension. In this case, I wanted to change four spaces to &#8230; <a href="http://www.butlerpc.net/blog/2012/02/execute-a-command-for-each-file-in-a-directory-recursively-on-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently wanted to make a change &#8212; actually a string replacement &#8212; in every file in the current directory and all directories beneath it, perhaps filtering by file extension. In this case, I wanted to change four spaces to a tab character in every .php source file. I created a small BASH shell script file to do this, though you could also just run the command directly at the command line:</p>
<pre>find . -type f -name '*.php' -exec sed -i 's/    /\t/g' {} \;</pre>
<p>Explanation:</p>
<ul>
<li><strong><a href="http://linux.die.net/man/1/find">find</a></strong> lists all files, one per line, in the current directory and all subdirectories recursively</li>
<li><strong>.</strong> (period) means current directory</li>
<li><strong>-type f</strong> only list files, not directories.</li>
<li><strong>-name &#8216;*.php&#8217;</strong> only if the name matches * (wildcard) with &#8220;.php&#8221; at the end</li>
<li><strong>-exec</strong> execute the following command for each result that matched</li>
<li><strong><a title="Manual page for sed" href="http://unixhelp.ed.ac.uk/CGI/man-cgi?sed">sed</a> -i &#8216;s/    /\t/g&#8217;</strong> replace, or substitute, one string for another. I&#8217;m searching for four consecutive spaces and replacing with t, meaning tab character. the /g at the end means global, replace each instance wherever it may appear in the file on each line. <strong>-i</strong> means &#8220;edit file in place&#8221; so the modified file is saved back to itself.</li>
<li><strong>{}</strong> this inputs the file for the sed command</li>
<li><strong>\;</strong> I think this finishes the -exec parameter for find. Don&#8217;t forget the backslash</li>
</ul>
<p>To change spaces to tabs or tabs to spaces, you can also look into the <a title="Manual for expand" href="http://linux.die.net/man/1/expand">expand</a> and unexpand commands.</p>
<p>Overall I highly recommend learning the sed command for quick and easy find &amp; replace operations in text files.</p>
<h2>More examples of the find command with -exec:</h2>
<p><strong>Delete all directories matching a name, such as CVS, under the current directory:</strong></p>
<pre>cd /path/to/myproject/directory/src
find . -type d -name 'CVS' -exec rm -rf {} \;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2012/02/execute-a-command-for-each-file-in-a-directory-recursively-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux &#8211; Disk Usage (du) Sorted by Size</title>
		<link>http://www.butlerpc.net/blog/2012/01/linux-disk-usage-du-sorted-by-size/</link>
		<comments>http://www.butlerpc.net/blog/2012/01/linux-disk-usage-du-sorted-by-size/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 20:08:06 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=322</guid>
		<description><![CDATA[Here&#8217;s a simple way to find how much disk space is taken up by each folder in a directory, and sort it by size. This works in pretty much any Linux distribution (Ubuntu, Fedora, CentOS, and more). du --block-size=MiB --max-depth=1 &#8230; <a href="http://www.butlerpc.net/blog/2012/01/linux-disk-usage-du-sorted-by-size/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple way to find how much disk space is taken up by each folder in a directory, and sort it by size. This works in pretty much any Linux distribution (Ubuntu, Fedora, CentOS, and more).</p>
<pre>du --block-size=MiB --max-depth=1 | sort -n</pre>
<ul>
<li><strong>du</strong> is the disk usage and will, by default, recursively traverse every directory of the current one, listing the size of the directory by bytes. Without options, it isn&#8217;t very helpful (press Ctrl C to stop the process safely)</li>
<li><strong>&#8211;block-size=<a title="Mebibyte" href="http://en.wikipedia.org/wiki/MiB" target="_blank">MiB</a></strong> will convert the bytes amount to megabytes (or <a title="Mebibyte" href="http://en.wikipedia.org/wiki/MiB" target="_blank">Mebibytes</a>), so instead of showing 9437184 (bytes) it will show 9 MiB</li>
<li><strong>&#8211;max-depth=1</strong> will only list size of directories in the current directory. 2 will traverse an additional level down, and so on.</li>
<li><strong>| sort -n</strong> will transfer, or &#8220;pipe&#8221;,  the output of the du program to the sort utility which simple sorts lines sent to it. <strong>-n</strong> tells it to sort numerically.</li>
<li>If you want to sort in reverse order, simply change <strong>n</strong> to <strong>rn</strong></li>
</ul>
<div>Example output:</div>
<div>
<pre>statik@Phenom:~/Pictures$ du --block-size=MiB --max-depth=1 | sort -n
1MiB ./icons
1MiB ./USTM
1MiB ./vector
1MiB ./Webcam
3MiB ./animated
3MiB ./wallpaper
8MiB ./UltraMiami
688MiB ./2010
1600MiB ./2011
2306MiB .</pre>
<p>As you can see, when I run this command in my Pictures folder, I have 688 MB of pictures in 2010 and 1600 MB of pictures in 2011.</p>
<p>You can add a shortcut to the command (an &#8220;alias&#8221;) by adding this to your ~/.bashrc or ~/.bash_aliases file</p>
<pre>alias duinfo='du --block-size=MiB --max-depth=1 | sort -n'</pre>
<p>The next time you open a terminal you can simply type &#8220;duinfo&#8221; and it will execute the alias. Tab completion also works.</p>
<p>Additional Tip: the ls (directory listing) command also supports the &#8211;block-size=MiB statement. Use &#8211;block-size=KiB for kilobytes, GiB for gigabytes, and so on.</p>
<p>Related Article: <a href="http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/">http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2012/01/linux-disk-usage-du-sorted-by-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Solution to the Software Patent Problem?</title>
		<link>http://www.butlerpc.net/blog/2011/08/a-solution-to-the-software-patent-problem/</link>
		<comments>http://www.butlerpc.net/blog/2011/08/a-solution-to-the-software-patent-problem/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 15:31:03 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=269</guid>
		<description><![CDATA[Patents in the USA were intended to protect inventors against people copying, reproducing, and selling their own creations. But with software, things have gone awry with companies like Apple and Microsoft patenting the stupidest things &#8212; hoping they will slip &#8230; <a href="http://www.butlerpc.net/blog/2011/08/a-solution-to-the-software-patent-problem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Patents in the USA were intended to protect inventors against people copying, reproducing, and selling their own creations. But with software, things have gone awry with companies like Apple and Microsoft patenting the stupidest things &#8212; hoping they will slip through the US patent office and be accepted. And now to defend oneself from being sued for patent infringement, huge companies are scooping up patents in billion dollar buys. <a href="http://arstechnica.com/apple/news/2011/07/apple-ms-rim-nab-nortel-mobile-patents-for-45-billion.ars">Apple and Microsoft recently paid $4.5 billion for Nortel</a>&#8216;s patent pool, and <a href="http://techcrunch.com/2011/08/15/breaking-google-buys-motorola-for-12-5-billion/">Google bought Motorola Mobility</a> for $12 billion which included their patent pool.</p>
<p>This is a tremendous amount of money spent which isn&#8217;t even for any tangible product, research, or manpower. In the long run this is going to cost consumers by raising product prices (<a href="http://www.geek.com/articles/mobile/htc-pays-microsoft-5-per-android-phone-shipped-20110527/">Microsoft gets $5-10 for every HTC phone sold</a>, even though there is absolutely no Microsoft product or technology in it).</p>
<p>I was thinking about the patent problem and how it could be changed to protect the individual or company inventions but prevent big businesses from bullying other companies and hurting the consumer. <strong>What if patents could not be transferred to another individual or company without being released into the public domain?</strong> In other words if you hold a patent for something that you invented, you would still be fully protected by that patent, but you could not sell or transfer that patent power to someone else. If you decided to sell your company or go out of business, the patents automatically get released in the public domain.</p>
<p><strong>This solution would protect the inventor (person or company) that invented the &#8220;thing&#8221;, but prevent the fake companies that just buy up patents and sue everybody from existing.</strong></p>
<p>See also: <a href="http://www.techdirt.com/articles/20110819/14021115603/so-how-do-we-fix-patent-system.shtml">So How Do We Fix The Patent Problem?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2011/08/a-solution-to-the-software-patent-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SwiftKey X Keyboard for Android Review</title>
		<link>http://www.butlerpc.net/blog/2011/07/swiftkey-x-keyboard-for-android-review/</link>
		<comments>http://www.butlerpc.net/blog/2011/07/swiftkey-x-keyboard-for-android-review/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 02:55:35 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=255</guid>
		<description><![CDATA[UPDATE! Today only, SwiftKey X is free on the Amazon Appstore! Normally a $3.99 purchase. The fastest and most advanced keyboard for Android, SwiftKey, just got better with SwiftKey X. SwiftKey is an Android keyboard replacement, the first that introduced &#8230; <a href="http://www.butlerpc.net/blog/2011/07/swiftkey-x-keyboard-for-android-review/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft  wp-image-256" title="SwiftKey X" src="http://butlerpc.phenom.com/blog/wp-content/uploads/2011/07/hi-512-4.png" alt="SwiftKey X Icon" width="186" height="186" /></p>
<p><strong>UPDATE! Today only, SwiftKey X is free on the <a href="http://djmp.org/statik/2011/07/swiftkey-x-keyboard-for-android-review/">Amazon Appstore</a>! Normally a $3.99 purchase.</strong></p>
<p>The fastest and most advanced keyboard for Android, SwiftKey, just got better with <a href="http://www.swiftkey.net/">SwiftKey X</a>. SwiftKey is an Android keyboard replacement, the first that introduced the idea of next-word prediction and analyzing your e-mail and SMS messages to detect your own word and grammar patterns.</p>
<p>But is it really the best keyboard for Android right now? I think so. Read on past the break to find out why.<br />
<span id="more-255"></span></p>
<p><strong>Next Word Prediction</strong></p>
<p>I believe this is the only smartphone keyboard that does this. We all know all smartphone keyboards try to guess the word you are typing so you can quickly choose it and move on. But what if you haven&#8217;t typed anything yet, or finished a word or a sentence? SwiftKey utilizes this moment to present three possible words that frequently follow the previous. What this boils down to is that you&#8217;ll rarely have to type small words like &#8220;a&#8221;, &#8220;of&#8221;, &#8220;the&#8221;, or &#8220;am&#8221; ever again &#8212; just touch the word.</p>
<p><strong>Personal Pattern Pre-analysis</strong></p>
<p>Most virtual keyboards have a learning mechanism that store and give priority to words you use frequently &#8212; it learns as you use it. SwiftKey goes a step further and offers to scan all of your e-mail and text messages, and even Facebook messages, to retroactively learn your typing patterns which immediately puts it ahead of every other smartphone keyboard. You can start typing super fast without waiting through any &#8220;learning&#8221; period &#8212; and of course it will learn the more you use it, too.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-257" title="One of the three SwiftKey X Themes" src="http://butlerpc.phenom.com/blog/wp-content/uploads/2011/07/ss-480-1-5.jpg" alt="SwiftKey X Screenshot" width="336" height="560" /></p>
<p><strong>Arrow Buttons</strong></p>
<p>In the past, many Android phones had a track ball or trackpad to move the text cursor around, in addition to touching the  screen. Well now it seems the trackball is no more, leaving users just with the touchscreen to position the cursor. To assist, SwiftKey can optionally display arrow buttons to move the cursor precisely.<br />
<em>Drawback: HTC Sense comes with a nice iPhone style longpress to bring up a magnified cursor navigation box, but it seems the box closes immediately when going from one word to the next if you&#8217;re using SwiftKey. That means you won&#8217;t be able to use this nice HTC feature.</em></p>
<p>The app is $3.99 for Android 2.1 and up phones, and $4.99 for Tablets.<br />
<a title="SwiftKey X" href="https://market.android.com/details?id=com.touchtype.swiftkey">View in Android Market</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2011/07/swiftkey-x-keyboard-for-android-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Droid Incredible 2 Review (with Verizon Wireless)</title>
		<link>http://www.butlerpc.net/blog/2011/06/droid-incredible-2-by-htc-with-verizon-wireless/</link>
		<comments>http://www.butlerpc.net/blog/2011/06/droid-incredible-2-by-htc-with-verizon-wireless/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 04:02:46 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=239</guid>
		<description><![CDATA[When I decided to switch from T-Mobile to Verizon for my mobile wireless provider, I purchased the Droid Incredible 2 by HTC. There were a bunch of great new Android models to choose from, including: Samsung Droid Charge (4G) HTC &#8230; <a href="http://www.butlerpc.net/blog/2011/06/droid-incredible-2-by-htc-with-verizon-wireless/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div style="float:left; margin-right:25px;"><iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=bu05f-20&#038;o=1&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=B004WKBW60" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></div>
<p>When I decided to switch from T-Mobile to Verizon for my mobile wireless provider, I purchased the <a href="http://www.amazon.com/dp/B004WKBW60/ref=as_li_ss_til?tag=bu05f-20&#038;camp=213381&#038;creative=390973&#038;linkCode=as4&#038;creativeASIN=B004WKBW60&#038;adid=05AHSDRSNCZ1AY7N7V4C&#038;">Droid Incredible 2 by HTC</a>. There were a bunch of great new Android models to choose from, including:<br />
<span id="more-239"></span></p>
<ul>
<li>Samsung Droid Charge (4G)</li>
<li>HTC Thunderbolt (4G)</li>
<li>LG Revolution (4G)</li>
<li>HTC Incredible 2</li>
<li>Motorola Droid X2</li>
<li>Samsung Fascinate</li>
<li>Motorola Droid 2</li>
<li>Sony Ericsson Xperia Play</li>
</ul>
<p>After doing some research and assessing the pros and cons, it seemed like the Incredible 2 (Dinc2) was the best choice based on these strong points:</p>
<ul>
<li>Free with 2 year contract (0.01 actually)</li>
<li>Above average battery life</li>
<li>Successor to the Incredible 1 which was highly rated</li>
<li>Good custom ROM support (prediction for future)</li>
</ul>
<p>I was able to ignore these weak points:</p>
<ul>
<li>No 4G LTE</li>
<li>No physical camera button</li>
<li>Single core CPU</li>
</ul>
<p><span style="text-decoration: underline;">Quick Specs:</span></p>
<ul>
<li>1 GHz Qualcomm Snapdragon MSM8255 CPU</li>
<li>Adreno 205 GPU</li>
<li>768 MB RAM</li>
<li>1.1 GB Internal Storage</li>
<li>16 GB MicroSD card (14.5 GB usable)</li>
<li>1450 mAh battery</li>
<li>4&#8243; S-LCD Screen (480&#215;800)</li>
<li>8/1.3 MP Back/Front camera</li>
<li>Android 2.2</li>
</ul>
<p>After using it for a few days I am very pleased. Coming from a Nexus One which was limited to 192 MB internal storage for apps, I&#8217;m now free to explore and use more apps and games with the 1.1 GB storage. This is actually still lower than many other current generation phones, but plenty when you consider that many, if not all, apps can be moved to the expandable SD card. For that, the Dinc2 comes with a 16 GB microSD.</p>
<p><a href="http://butlerpc.phenom.com/blog/wp-content/uploads/2011/06/dinc2_y_u_no.png"><img src="http://butlerpc.phenom.com/blog/wp-content/uploads/2011/06/dinc2_y_u_no.png" alt="" title="INCREDIBLE 2 BATTERY, Y U NO DIE?" width="400" height="300" class="aligncenter size-full wp-image-247" /></a></p>
<p>The battery life has been amazing after an initial full drain/full charge break in period. Yesterday I had the phone running unplugged for 25 hours from 100% down to about 5%. Today it&#8217;s been 13 hours with heavier usage and is still at 25%.</p>
<p>The 1 GHz modern day snapdragon CPU combined with the 768 MB RAM means you won&#8217;t have any slow down running the latest applications or navigating the system and web, although this has not really been a problem since the early days of Android phones.</p>
<p>A sleek physical feature is the &#8220;rubberized&#8221; back side, which provides just the right amount of friction to safely handle while refraining from clinging to your pocket.</p>
<p>While not a fully &#8216;stock&#8217; Android OS configuration, the extra crap apps that Verizon puts on the phone (game trials, v-cast stuff) don&#8217;t get in your way as long as you never launch them.  And being HTC you get the Sense UI which comes in handy sometimes, but if you install a custom ROM like Cyanogenmod (not available yet) you might not miss it that much.</p>
<p><a href="http://butlerpc.phenom.com/blog/wp-content/uploads/2011/06/dinc2.jpg"><img src="http://butlerpc.phenom.com/blog/wp-content/uploads/2011/06/dinc2.jpg" alt="Droid Incredible 2" title="Droid Incredible 2" width="683" height="800" class="aligncenter size-full wp-image-248" /></a></p>
<p>If you&#8217;re looking for a great everyday phone with above average battery life, a beautiful form factor, and don&#8217;t need 4G, let this be the phone for you. At time of writing it can be had for $0.01 with a 2-year contract at <a href="http://www.amazon.com/dp/B004WKBW60/ref=as_li_ss_til?tag=bu05f-20&#038;camp=213381&#038;creative=390973&#038;linkCode=as4&#038;creativeASIN=B004WKBW60&#038;adid=05AHSDRSNCZ1AY7N7V4C&#038;">Amazon Wireless</a>.</p>
<p><strong>July 8, 2011 Update</strong> I&#8217;ve been using the phone for over a week now and I am still very pleased with it. I don&#8217;t think there is a better phone out there, especially if you can get this one for $0.00.  And with custom ROMs just around the corner, we&#8217;ll be customizing to our hearts desires!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2011/06/droid-incredible-2-by-htc-with-verizon-wireless/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu: Configure a Keystroke to Take a Screenshot</title>
		<link>http://www.butlerpc.net/blog/2011/01/ubuntu-configure-a-keystroke-to-take-a-screenshot/</link>
		<comments>http://www.butlerpc.net/blog/2011/01/ubuntu-configure-a-keystroke-to-take-a-screenshot/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 19:45:45 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=232</guid>
		<description><![CDATA[The Mac OS has a nice screenshot interface. You press Cmd Shift 3 to take a screenshot of the entire screen and save it to the desktop. Pressing Cmd Shift 4 will display a crosshair to take a screenshot of &#8230; <a href="http://www.butlerpc.net/blog/2011/01/ubuntu-configure-a-keystroke-to-take-a-screenshot/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The Mac OS has a nice screenshot interface. You press Cmd Shift 3 to take a screenshot of the entire screen and save it to the desktop. Pressing Cmd Shift 4 will display a crosshair to take a screenshot of any rectangle area of your choosing. This saves the step of cropping the image which you are most likely going to do.</p>
<p>You can replicate this exact functionality in Ubuntu Linux without installing anything else.</p>
<ol>
<li>Go to System -&gt; Preferences -&gt; Keyboard Shortcuts</li>
<li>In the desktop section, find Take a screenshot and highlight it</li>
<li>Press Ctrl Shift 3 (or whichever combination you would like)</li>
</ol>
<p>There is no entry for &#8220;Take a screenshot of an area&#8221;, so we must create it.</p>
<ol>
<li>Click the Add button</li>
<li>Name: Take a screenshot of an area</li>
<li>Command: gnome-screenshot -a</li>
<li>Click the newly created entry</li>
<li>Press Ctrl Shift 4 (or whichever combination you would like)</li>
<li>Close the window</li>
</ol>
<p>Thats it! Now you can press Ctrl Shift 4 and take a screen shot of an area.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2011/01/ubuntu-configure-a-keystroke-to-take-a-screenshot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using XBindKeys on Ubuntu Linux to Remap Key Commands</title>
		<link>http://www.butlerpc.net/blog/2011/01/using-xbindkeys-on-ubuntu-linux-to-remap-key-commands/</link>
		<comments>http://www.butlerpc.net/blog/2011/01/using-xbindkeys-on-ubuntu-linux-to-remap-key-commands/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 21:51:26 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=223</guid>
		<description><![CDATA[Once again I have started to use Ubuntu GNU/Linux to try to get away from Windows and explore more freedom respecting software. Of course there are going to be a lot of utilities you use in Windows that are not &#8230; <a href="http://www.butlerpc.net/blog/2011/01/using-xbindkeys-on-ubuntu-linux-to-remap-key-commands/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Once again I have started to use <a href="http://www.ubuntu.com">Ubuntu</a> GNU/Linux to try to get away from Windows and explore more <a href="http://fsf.org">freedom respecting software</a>. Of course there are going to be a lot of utilities you use in Windows that are not available in Linux so you have to find the equivalents. One of my must have utilities on Windows is <a href="http://autohotkey.com">AutoHotKey</a>, especially since I use a <a href="http://djmp.org/statik/2009/05/new-typematrix-2030-ergonomic-keyboard/">TypeMatrix</a> compact keyboard with a <a href="http://dvzine.org">Dvorak</a> layout. For example, my Z key is on the right side of the keyboard so I like to remap Ctrl + ; (semicolon) to activate Ctrl + z to undo things with my left hand.</p>
<p>The idea is that you use <strong><a href="http://www.nongnu.org/xbindkeys/xbindkeys.html">xbindkeys</a></strong> to listen for keyboard commands (<em>input</em>) and then you use <strong><a href="http://homepage3.nifty.com/tsato/xvkbd/">xvkbd</a></strong> to type your desired keys (<em>output</em>).</p>
<p>Here is how to remap a combination of keys to another combination of keys on linux:</p>
<h2><strong>Install xbindkeys</strong></h2>
<pre>sudo apt-get install xbindkeys</pre>
<p><strong>Create the default config file for xbindkeys</strong></p>
<pre>xbindkeys --defaults &gt; /home/your-user-name/.xbindkeysrc</pre>
<p><strong>When thats done, install xbindkeys-config, the GUI for xbindkeys (note: the GUI is optional, you could just edit the config file with a text editor).</strong></p>
<pre>sudo apt-get install xbindkeys-config</pre>
<p><strong>Now the utility the actually does the &#8220;typing&#8221;</strong></p>
<pre>sudo apt-get install xvkbd</pre>
<p><strong>Once each is installed, start xbindkeys by bringing up &#8220;Run Application&#8221; with ALT -F2.</strong></p>
<pre>xbindkeys</pre>
<p><strong>If you want to launch the GUI editor you can run xbindkeys-config, but I found it to be more confusing than the text file.</strong></p>
<h2>Configuring your Shortcuts and Macros</h2>
<p>Open your configuration file in your favorite text editor. It is called <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">.xbindkeysrc</span> in your home directory.  Use the # character to comment out lines, such as the default macros placed by the program&#8217;s author &#8212; after I installed it, Ctrl + F was launching an xterm window all the time.</p>
<p>At the end of the file, put this:</p>
<pre>"xvkbd -xsendevent -text "Cz""
   control + semicolon</pre>
<div>The <strong>second</strong> line is the keystroke to invoke the operation &#8212; kind of counterintuitive but that is how it is. Here it is listening for Control + semicolon.  To find the syntax for the key being pressed, you can run the xbindkeys-config utility and click the <strong>Get Key</strong> button. Press any key combination and it will print out what you did. From there you can just copy or edit the text of the command.</div>
<div>The <strong>first</strong> line is the command line operation to send when your desired key combination occurs. Here I&#8217;m running xvkbd with some flags. -xsendevent tells it to send an XEvent to whatever the active window is (and active input field). -text means type the block of text in quotes. C (backslash C) means hold Ctrl while pressing the next key, which is the letter &#8220;z&#8221;.   For more xvkbd syntax, look at <a href="http://man-wiki.net/index.php/1x:xvkbd">http://man-wiki.net/index.php/1x:xvkbd</a> or this chart:<br />
- r &#8211; Return<br />
- t &#8211; Tab<br />
- b &#8211; Backspace<br />
- e &#8211; Escape<br />
- d &#8211; Delete<br />
- S &#8211; Shift (modify the next character)<br />
- C &#8211; Control (modify the next character)<br />
- A &#8211; Alt (modify the next character)<br />
- M &#8211; Meta (modify the next character)<br />
- [keysym] &#8211; the keysym keysym<br />
Please note that modify with &#8220;S will be ignored in many cases.  For example,  &#8220;aCbScDCE  will  be<br />
interpreted as a, Control-b, c, Shift-D, and Control-Shift-E.</div>
<div>Instead of using xvkbd to send text strings, you could probably use the xmacro utility to create more advanced macros to playback. You can also run any program you want, just put the command within the double quotes.</div>
<div>Example: Launch Firefox with Ctrl + f</div>
<pre>"firefox"
   control + f</pre>
<p>Now I just have to find an easy way to reload my xbindkeysrc config file when I make changes. Right now I&#8217;m killing the process and launching it again.</p>
<p>Final note: you can set xbindkeys to launch on startup &#8212; in ubuntu, just go to System -&gt; Preferences -&gt; Startup Applications and add a new command <strong>xbindkeys</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2011/01/using-xbindkeys-on-ubuntu-linux-to-remap-key-commands/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Christmas Card with HTML and CSS3 (2010)</title>
		<link>http://www.butlerpc.net/blog/2010/12/christmas-card-with-html-and-css3-2010/</link>
		<comments>http://www.butlerpc.net/blog/2010/12/christmas-card-with-html-and-css3-2010/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 15:24:32 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=214</guid>
		<description><![CDATA[This year instead of sending out paper cards in the mail, I created a web page with a personal message protected by a password, and e-mailed it out to friends. The password and personal message system is made possible by &#8230; <a href="http://www.butlerpc.net/blog/2010/12/christmas-card-with-html-and-css3-2010/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.butlerpc.net/christmas/christmas2010.php"><img src="http://s3.amazonaws.com/html5img1/f_2X_christmascard.jpg" alt="" /></a></p>
<p>This year instead of sending out paper cards in the mail, I created a web page with a personal message protected by a password, and e-mailed it out to friends. The password and personal message system is made possible by PHP and MySQL. Some of the graphical effects were made possible by CSS3 rotations, such as the &#8220;gift&#8221; tag.</p>
<p>To accompany the personal message I also recorded a mix of Trance music that is downloadable or playable with a flash plugin. The mix was made possible with Numark&#8217;s iDJ2 and the <a href="http://djmp.org/statik/2010/09/behringer-uca222-review-and-faq/">Behringer UCA222</a> for recording.</p>
<p>You can view a generic version of the <a href="http://www.butlerpc.net/christmas/christmas2010.php">Christmas card</a>.</p>
<p>Or <a href="http://www.butlerpc.net/largefiles/Christmas_Mix_2010.mp3">download/play</a> the mix directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2010/12/christmas-card-with-html-and-css3-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.butlerpc.net/largefiles/Christmas_Mix_2010.mp3" length="85269443" type="audio/mpeg" />
		</item>
		<item>
		<title>Logitech RX1000 Laser Mouse Drivers for Windows 7</title>
		<link>http://www.butlerpc.net/blog/2010/12/logitech-rx1000-laser-mouse-drivers-for-windows-7/</link>
		<comments>http://www.butlerpc.net/blog/2010/12/logitech-rx1000-laser-mouse-drivers-for-windows-7/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 22:37:35 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[logitech]]></category>
		<category><![CDATA[RX1000]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=191</guid>
		<description><![CDATA[If you try to search for Logitech RX1000 laser mouse drivers for Windows 7 (32 bit or 64 bit) on www.logitech.com, you will find nothing. The mouse partially works in Windows 7 without drivers &#8212; however you won&#8217;t be able &#8230; <a href="http://www.butlerpc.net/blog/2010/12/logitech-rx1000-laser-mouse-drivers-for-windows-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=bu05f-20&#038;o=1&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=10FE9736YVPPT7A0FBG2&#038;asins=B000GFIDLC" style="width:120px;height:240px; float:left; margin-right:8px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>If you try to search for Logitech RX1000 laser mouse drivers for Windows 7 (32 bit or 64 bit) on www.logitech.com, you will find nothing. The mouse partially works in Windows 7 without drivers &#8212; however you won&#8217;t be able to customize the extra buttons. To do this, simply search for RX1500 on www.logitech.com for your operating system, install it, and you will be able to customize your mouse via the mouse control panel. </p>
<p>Or simply visit this link: <a href="http://www.logitech.com/en-us/428/4431?osid=14&#038;bit=64#section=downloads">http://www.logitech.com/en-us/428/4431?osid=14&#038;bit=64#section=downloads</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2010/12/logitech-rx1000-laser-mouse-drivers-for-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flying Saucers Retro Kitchenware Launched</title>
		<link>http://www.butlerpc.net/blog/2010/09/flying-saucers-retro-kitchenware-launched/</link>
		<comments>http://www.butlerpc.net/blog/2010/09/flying-saucers-retro-kitchenware-launched/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 01:34:47 +0000</pubDate>
		<dc:creator>mbutler</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://djmp.org/statik/?p=202</guid>
		<description><![CDATA[The first e-commerce website developed by ButlerPC has been launched! Anyone looking for fun, retro kitchenware and other vintage knick knacks can look no further than www.flyingsaucersAP.com. Due to the retro nature of the products in the store, we wanted &#8230; <a href="http://www.butlerpc.net/blog/2010/09/flying-saucers-retro-kitchenware-launched/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a style="float:left; margin-right:10px;" href="http://www.html5image.com/v/D" target="_blank"><img src="http://s3.amazonaws.com/html5img1/t_D_flyingsaucers.jpg" alt="click for full size"/></a><br />
The first e-commerce website developed by ButlerPC has been launched! Anyone looking for fun, retro kitchenware and other vintage knick knacks can look no further than <a href="http://www.flyingsaucersAP.com">www.flyingsaucersAP.com</a>. </p>
<p>Due to the retro nature of the products in the store, we wanted to give the site a kind of retro look from the 60s and 70s. That is why I went with a vibrant color scheme to match the store&#8217;s logo. The home page features unique &#8220;Brady Bunch&#8221; style boxes showcasing certain kitchen products, and they swap every few seconds via ajax requests in the background.</p>
<p>Visitors can check out the gallery, browse for fun products, and purchase using a credit card on a secure PayPal form.</p>
<p><a href="http://www.flyingsaucersap.com">Flying Saucers</a> is based in Asbury Park, NJ.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.butlerpc.net/blog/2010/09/flying-saucers-retro-kitchenware-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

