<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7205041512959092766</id><updated>2011-04-21T12:12:31.651-07:00</updated><title type='text'>$tail -f findings.out</title><subtitle type='html'>A rollicking adventure through systems administration and programming. Attempts to be useful, skinned with subtle humor.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1435644141683953907</id><published>2008-10-02T11:39:00.000-07:00</published><updated>2008-10-02T11:48:52.736-07:00</updated><title type='text'>Lost in a sea of terminals</title><content type='html'>Usually I enjoy my screen being covered with a variety of terminals across multiple servers. But on occasion, I type utterly the wrong thing, in utterly the wrong place, and calamity ensues.&lt;br /&gt;&lt;br /&gt;So to provide a slight buffer against this, I made a change in my bash prompt. It clues me in if I am on a remote server, a non-personal machine if you will, on which I need to exercise more caution before beating the enter key:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_75nXVfeyezs/SOUW0HIcoqI/AAAAAAAAADE/AauJbo6m89s/s1600-h/Screenshot-shuckins%40web.zenoss.com:+%7E.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_75nXVfeyezs/SOUW0HIcoqI/AAAAAAAAADE/AauJbo6m89s/s400/Screenshot-shuckins%40web.zenoss.com:+%7E.png" alt="" id="BLOGGER_PHOTO_ID_5252629624921039522" border="0" /&gt;&lt;/a&gt;Just something noticeable, but not overly intrusive. Won't stop idiocy, of course, but it can't hurt.&lt;br /&gt;&lt;br /&gt;To make it work:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# Prompt with easier to read coloring. Define and check for safe boxes:&lt;br /&gt;declare -a LOCALBOXES[0]="MyBox1" LOCALBOXES[1]="MyBox2"&lt;br /&gt;CURRENTBOX=`hostname`&lt;br /&gt;for box in $LOCALBOXES&lt;br /&gt;do&lt;br /&gt;   if [[ $CURRENTBOX = $box ]] ; then&lt;br /&gt;       PS1="\[\033[0;31m\][\T]\[\033[0;36m\]\u@\[\033[1;33m\]\H \[\033[1;34m\]\w: \[\033[0m\]"&lt;br /&gt;   else&lt;br /&gt;       PS1="\[\033[1;36m\]**REMOTE**\[\033[0;31m\][\T]\[\033[0;36m\]\u@\[\033[1;33m\]\H \[\033[1;34m\]\w: \[\033[0m\]"&lt;br /&gt;   fi&lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1435644141683953907?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1435644141683953907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1435644141683953907' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1435644141683953907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1435644141683953907'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/10/lost-in-sea-of-terminals.html' title='Lost in a sea of terminals'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_75nXVfeyezs/SOUW0HIcoqI/AAAAAAAAADE/AauJbo6m89s/s72-c/Screenshot-shuckins%40web.zenoss.com:+%7E.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1943050362020024757</id><published>2008-09-22T10:57:00.000-07:00</published><updated>2008-09-23T06:13:47.041-07:00</updated><title type='text'>ack: grep but better!</title><content type='html'>I came across &lt;a href="http://petdance.com/ack/"&gt;ack&lt;/a&gt; today, and now grep is sleeping outside. It's very much like grep, except it assumes all the little things that you always wanted grep to remember, but that it never did. It actually left the light on for you, and put the toilet seat down.&lt;br /&gt;&lt;br /&gt;Anyway, there were some rough bits with installation. On Ubuntu, it is installed by &lt;code&gt;sudo apt-get install ack-grep&lt;/code&gt;. If you think, hey, I will take the obvious path and install "ack"! You will be thinking with wrongitude. For &lt;code&gt;ack&lt;/code&gt; is, in fact, a Kanji code converter, which I discovered after not a little anger. On RHEL, CentOS, and the like, you have to install with &lt;code&gt;cpan -i App:Ack&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Once installed, just try some &lt;code&gt;ack-grep STRING&lt;/code&gt;.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_75nXVfeyezs/SNferk8NlPI/AAAAAAAAAC0/gIvv3tdNAjE/s1600-h/Screenshot-shuckins%40ZenSam:+%7E.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_75nXVfeyezs/SNferk8NlPI/AAAAAAAAAC0/gIvv3tdNAjE/s400/Screenshot-shuckins%40ZenSam:+%7E.png" alt="" id="BLOGGER_PHOTO_ID_5248908730955568370" border="0" /&gt;&lt;/a&gt;Want to ignore .svn dirs? It already did. Want to recursively search? It already did. And it brought over a bag of chips. Read the &lt;a href="http://petdance.com/ack/"&gt;Top 10&lt;/a&gt; for more goodies.&lt;br /&gt;&lt;br /&gt;Oh, and don't forget to add &lt;code&gt;ack-grep --thpppt&lt;/code&gt; to exit your shell scripts:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_75nXVfeyezs/SNjrbqRgNdI/AAAAAAAAAC8/oJNjM8SMpSk/s1600-h/Screenshot-shuckins%40ZenSam:+%7E.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_75nXVfeyezs/SNjrbqRgNdI/AAAAAAAAAC8/oJNjM8SMpSk/s400/Screenshot-shuckins%40ZenSam:+%7E.png" alt="" id="BLOGGER_PHOTO_ID_5249204226137011666" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1943050362020024757?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1943050362020024757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1943050362020024757' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1943050362020024757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1943050362020024757'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/09/ack-grep-but-better.html' title='ack: grep but better!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_75nXVfeyezs/SNferk8NlPI/AAAAAAAAAC0/gIvv3tdNAjE/s72-c/Screenshot-shuckins%40ZenSam:+%7E.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3466828495821327366</id><published>2008-08-11T21:15:00.000-07:00</published><updated>2008-08-11T21:26:01.829-07:00</updated><title type='text'>Wordpress contact forms and mailing made less complicated</title><content type='html'>After setting up some Wordpress blogs on my own server, I ran into the problem of wanting a basic contact form that would email myself and users. I in no way wanted to bother setting up my own mail server. I also would prefer not buying SMTP mail service. After a wretched chain of annoying plugins, I came across a salutary trio that met my needs: &lt;a href="http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-swift-smtp/"&gt;Cimy Swift SMTP&lt;/a&gt;, &lt;a href="http://ideasilo.wordpress.com/2007/04/30/contact-form-7/"&gt;Contact Form 7&lt;/a&gt;, and a Gmail surprise.&lt;br /&gt;&lt;br /&gt;Cimy Swift SMTP allows you to setup SMTP settings, which is perfect if you want to use an external service and not use PHP mail() function. Apparently, Google will let you send mail to any address from any domain using SMTP. Handy! So you just install Cimy, go to its Settings page, put in "smtp.gmail.com" as SMTP server, port 465 (it tells you this is for Gmail), your Gmail user and pass, and that you want TLS (it also notes this is for Gmail. Save, put in a test address, and it should just work. At least it did for me, where others failed.&lt;br /&gt;&lt;br /&gt;Now you are all dressed up with SMTP, but where to go? I tried a number of contact form plugins that looked great, had lots of features, etc. And none of them bothered using the SMTP settings I put in. Contact Form 7 did, however. It's simple, and takes a little customization to make it look decent. But still, it is a basic contact form that works, and that is all I needed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3466828495821327366?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3466828495821327366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3466828495821327366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3466828495821327366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3466828495821327366'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/08/wordpress-contact-forms-and-mailing.html' title='Wordpress contact forms and mailing made less complicated'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-549548225682582391</id><published>2008-07-16T08:58:00.000-07:00</published><updated>2008-07-16T09:05:49.378-07:00</updated><title type='text'>Needs more cow...say!</title><content type='html'>I stumbled across a wonderful program today: &lt;a href="http://www.nog.net/%7Etony/warez/cowsay.shtml"&gt;cowsay&lt;/a&gt;! It is just as cool as you would imagine: &lt;pre&gt;cowsay "Text"&lt;/pre&gt;gives you an ASCII-art cow saying your Text.&lt;br /&gt;&lt;br /&gt;I think I will use it as the welcome banner on all my servers:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_75nXVfeyezs/SH4cRi1CQXI/AAAAAAAAABs/sYJY92CMg2I/s1600-h/cowsay.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_75nXVfeyezs/SH4cRi1CQXI/AAAAAAAAABs/sYJY92CMg2I/s400/cowsay.png" alt="" id="BLOGGER_PHOTO_ID_5223643705528959346" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-549548225682582391?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/549548225682582391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=549548225682582391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/549548225682582391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/549548225682582391'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/07/needs-more-cowsay.html' title='Needs more cow...say!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_75nXVfeyezs/SH4cRi1CQXI/AAAAAAAAABs/sYJY92CMg2I/s72-c/cowsay.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2124668757263173861</id><published>2008-07-10T07:57:00.000-07:00</published><updated>2008-07-10T08:42:16.451-07:00</updated><title type='text'>Handy Network Utilities: nast, fping</title><content type='html'>I discovered a wonderful utility last night: &lt;a href="http://www.penguin-soft.com/penguin/man/8/nast.html"&gt;nast&lt;/a&gt;. I wanted to scan my local network, just to see what devices were on it, what their addresses were, etc. I could ping my entire subnet, but what if I had a machine that rejected ICMP packets? (Not that I do very often, but it can happen in larger environments). I thought using a protocol like ARP would be much more robust, since it is pretty much guaranteed to be available. Then I discovered nast.&lt;br /&gt;&lt;br /&gt;nast can do a lot of neat things. The first I found was mapping a subnet of course, which you can do by running &lt;pre&gt;sudo nast -i eth1 -m&lt;/pre&gt;adjusting the interface to fit. It will return something like: &lt;pre&gt;Nast V. 0.2.0&lt;br /&gt;&lt;br /&gt;Mapping the Lan for 255.255.255.0 subnet ... please wait&lt;br /&gt;&lt;br /&gt;MAC address             Ip address (hostname)&lt;br /&gt;===========================================================&lt;br /&gt;00:19:D2:92:20:CE       192.168.1.1 (MyGateway)&lt;br /&gt;00:1B:C0:B7:86:CB       192.168.1.2 (MyBox) (*)&lt;br /&gt;00:14:38:E5:76:10       192.168.1.5 (SomeOtherBox)&lt;br /&gt;&lt;/pre&gt; nast can also try to find out if there are any nodes on your subnet acting in promiscuous mode, which I think is pretty hot. Check out the main &lt;a href="http://www.penguin-soft.com/penguin/man/8/nast.html"&gt;nast&lt;/a&gt; page for the full feature set.&lt;br /&gt;&lt;br /&gt;In my searching, I also came across &lt;a href="http://fping.sourceforge.net/"&gt;fping&lt;/a&gt;. Its main improvements over regular old ping are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;More than one host can be passed (as well as a file containing hosts)&lt;/li&gt;&lt;li&gt;Its output is very simple and easy to parse, making it ideal for scripting&lt;/li&gt;&lt;li&gt;It tries each host and moves on if there is no response, making the whole process faster&lt;/li&gt;&lt;/ul&gt;Instead of &lt;pre&gt;ping -c 1 myhost1 ; ping -c 1 myhost2&lt;/pre&gt; you can just run &lt;pre&gt;fping myhost1 myhost2&lt;/pre&gt;which just returns &lt;pre&gt;myhost1 is alive&lt;br /&gt;myhost2 is alive&lt;br /&gt;&lt;/pre&gt;Both nast and fping are available in the Ubuntu repos.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2124668757263173861?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2124668757263173861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2124668757263173861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2124668757263173861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2124668757263173861'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/07/handy-network-utilities-nast-fping.html' title='Handy Network Utilities: nast, fping'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8193217639166438209</id><published>2008-07-09T18:52:00.000-07:00</published><updated>2008-07-09T18:58:35.820-07:00</updated><title type='text'>Crashing Application Greeter</title><content type='html'>I was playing around with themes and the like in Hardy Heron recently, and I ended up selecting a new login screen. Apparently, something was wrong with the one I installed, however, since the next time I went to login, I was presented with a black screen and the message "The greeter application appears to be crashing. Attempting to use a different one." Hitting Ok on this merely cycled through X starting up and led to the same message.&lt;br /&gt;&lt;br /&gt;To fix this, I went into another tty with Alt + F2, logged in, and ran "sudo vim /etc/gdm/gdm.conf". I commented out the line "Greeter=/usr/lib/gdm/gdmgreeter" and added "Greeter=/usr/lib/gdm/gdmlogin". After restarting, a simple Gnome login screen appeared fine, which allowed me to get in and change the login screen to a know safe default.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8193217639166438209?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8193217639166438209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8193217639166438209' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8193217639166438209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8193217639166438209'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/07/crashing-application-greeter.html' title='Crashing Application Greeter'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-5574656262690873731</id><published>2008-07-08T21:29:00.000-07:00</published><updated>2008-07-08T21:36:14.898-07:00</updated><title type='text'>Additional Tips for GNOME-Do</title><content type='html'>After having played with GNOME-Do for a few days, experiencing some pain and finding more fun things, I have some suggestions that may make your adoption of it smoother.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Get to 0.5. 0.4 will likely be in your repo, so beware! It is a paltry substitute. If you have installed that, remove it and delete the plugins dir. Then add the repos to your "/etc/apt/sources.list" as &lt;a href="https://wiki.ubuntu.com/GnomeDo/Installation"&gt;described here&lt;/a&gt;, then run "sudo apt-get install gnome-do". Also, make sure you kill GNOME-Do if it is running, BEFORE you remove the old version and try to install.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;0.5 has a lot of great features, mainly the built-in Preferences window, which lets you just check plugins you want. There is also a new Open With action, which comes in very handy. Get to 0.5.&lt;/li&gt;&lt;li&gt;Very neat plugins: Skype (lets you chat or call with Skype contacts, like the Pidgin plugin), Upload to Flickr, Locate Files, Rhythmbox.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Install "xclip" (is in repos). This will let you select any text, invoke GNOME-Do, and act on that text.&lt;/li&gt;&lt;/ul&gt;Once I got to 0.5 and got those plugins running, GNOME-Do started becoming even handier!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-5574656262690873731?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/5574656262690873731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=5574656262690873731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5574656262690873731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5574656262690873731'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/07/additional-tips-for-gnome-do.html' title='Additional Tips for GNOME-Do'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8691383842833135964</id><published>2008-07-03T13:26:00.000-07:00</published><updated>2008-07-07T05:57:54.486-07:00</updated><title type='text'>Killer App: GNOME-Do!</title><content type='html'>I started to doubt my beloved Ubuntu after a &lt;a href="http://www.catapult-creative.com/"&gt;co-worker&lt;/a&gt; showed me the various virtues of Quicksilver on the Mac. But, I have... Beagle? Yuck. Lunchbox was cute, but never seemed to work right. But today, I take that doubt back, great Linux gods. Behold: &lt;a href="http://do.davebsd.com/"&gt;GNOME Do!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you know what &lt;a href="http://www.blacktree.com/projects/quicksilver.html"&gt;Quicksilver&lt;/a&gt; is, then you are basically there. If you don't, just imagine a pretty app launched by a simple key combo that lets you do anything from open files, to play songs, to email people with just a few easy keystrokes.&lt;br /&gt;&lt;br /&gt;David Siegel's beautiful site has lots of documentation, plugins, and more. Just be on Gutsy or Heron, add a repo to your sources, install. In case you don't know what "super-space" is, as I didn't, super is the meta key, so the one with a Windows Logo on it on most keyboards.&lt;br /&gt;&lt;br /&gt;Some additional plugins I installed and found handy:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Del.icio.us - Search your bookmarks and public ones&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Rhythmbox - Play songs in your library, control volume, and more&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Pidgin - IM people in your Pidgin lists&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8691383842833135964?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8691383842833135964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8691383842833135964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8691383842833135964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8691383842833135964'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/07/killer-app-gnome-do.html' title='Killer App: GNOME-Do!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1359255821672474894</id><published>2008-07-02T21:51:00.000-07:00</published><updated>2008-07-03T04:45:47.680-07:00</updated><title type='text'>Handy script: LAMP stack version printer</title><content type='html'>Often when troubleshooting or setting up servers, I need to know the installed versions of applications commonly grouped into the "LAMP" stack. I dislike having to remember the slight differences between them when trying to coerce each to divulge their version. So I created a script that does that, and even prints it all in easy-to-read colors!&lt;br /&gt;&lt;br /&gt;The code:&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;###################################&lt;br /&gt;#&lt;br /&gt;# Written by Samuel Huckins&lt;br /&gt;#&lt;br /&gt;# July 2007&lt;br /&gt;#&lt;br /&gt;# Prints out version info for&lt;br /&gt;# things in the LAMP stack.&lt;br /&gt;#&lt;br /&gt;###################################&lt;br /&gt;#&lt;br /&gt;echo -e "\e[1;34mThis machine's LAMP stack:\e[0m"&lt;br /&gt;echo ""&lt;br /&gt;# Linux:&lt;br /&gt;LINUX=`cat /etc/issue`&lt;br /&gt;echo -e -n " * \e[31mL\e[1;33minux: \e[0m"&lt;br /&gt;echo "$LINUX"&lt;br /&gt;# Apache:&lt;br /&gt;echo -e -n " * \e[31mA\e[1;33mpache: \e[0m"&lt;br /&gt;if [ -e /usr/sbin/httpd ]&lt;br /&gt;then&lt;br /&gt;echo "`/usr/sbin/httpd -v| head -n 1 | awk '{print $3}'`"&lt;br /&gt;elif [ -e /usr/sbin/apache2 ]&lt;br /&gt;then&lt;br /&gt;echo "`/usr/sbin/apache2 -v| head -n 1 | awk '{print $3}'`"&lt;br /&gt;else&lt;br /&gt;echo -e "\e[37mNot present\e[0m"&lt;br /&gt;fi&lt;br /&gt;# MySQL:&lt;br /&gt;echo -e -n " * \e[31mM\e[1;33mySQL: \e[0m"&lt;br /&gt;if [ -e /usr/bin/mysql ]&lt;br /&gt;then&lt;br /&gt;echo "`/usr/bin/mysql --version | awk '/Ver/ {print $2, $3, $4, $5}' | sed 's/,//'`"&lt;br /&gt;else&lt;br /&gt;echo -e "\e[37mNot present\e[0m"&lt;br /&gt;fi&lt;br /&gt;# PHP:&lt;br /&gt;echo -e -n " * \e[31mP\e[1;33mHP: \e[0m"&lt;br /&gt;if [ -e /usr/bin/php ]&lt;br /&gt;then&lt;br /&gt;echo "`php -v`"&lt;br /&gt;else&lt;br /&gt;echo -e "\e[37mNot present\e[0m"&lt;br /&gt;fi&lt;br /&gt;# Perl:&lt;br /&gt;echo -e -n " * \e[31mP\e[1;33merl: \e[0m"&lt;br /&gt;if [ -e /usr/bin/perl ]&lt;br /&gt;then&lt;br /&gt;echo "`perl -v | awk '/This is perl/ {print $4}' | sed 's/v//'`"&lt;br /&gt;else&lt;br /&gt;echo -e "\e[37mNot present\e[0m"&lt;br /&gt;fi&lt;br /&gt;# Python:&lt;br /&gt;echo -e -n " * \e[31mP\e[1;33mython: \e[0m"&lt;br /&gt;if [ -e /usr/bin/python ]&lt;br /&gt;then&lt;br /&gt;echo "`/usr/bin/env python -V 2&gt;&amp;amp;1 | awk '/Python/ {print $2}'`"&lt;br /&gt;else&lt;br /&gt;echo -e "\e[37mNot present\e[0m"&lt;br /&gt;fi&lt;br /&gt;# done&lt;br /&gt;echo ""&lt;br /&gt;&lt;/pre&gt;The result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_75nXVfeyezs/SGy7mSglE5I/AAAAAAAAABk/guVFr5YGdAA/s1600-h/thing7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_75nXVfeyezs/SGy7mSglE5I/AAAAAAAAABk/guVFr5YGdAA/s400/thing7.png" alt="" id="BLOGGER_PHOTO_ID_5218752334693471122" border="0" /&gt;&lt;/a&gt;Call it "lamp-version-printer.sh", and add something like "alias lamp="~/my/code/lamp-version-printer.sh". Couldn't be easier.&lt;br /&gt;&lt;br /&gt;Minor caveat: While the script does check each program for existence, I only check the most common place. It could be better expanded to cover less used locations for applications, conventions on more OSes, etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1359255821672474894?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1359255821672474894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1359255821672474894' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1359255821672474894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1359255821672474894'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2008/07/handy-script-lamp-stack-version-printer.html' title='Handy script: LAMP stack version printer'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_75nXVfeyezs/SGy7mSglE5I/AAAAAAAAABk/guVFr5YGdAA/s72-c/thing7.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3381084233746254824</id><published>2007-10-31T11:08:00.000-07:00</published><updated>2007-10-31T11:20:49.397-07:00</updated><title type='text'>Reference script for CLI color codes</title><content type='html'>I have been experimenting with adding more color to my bash prompts of late. I find it easier to read when the fields are in distinct colors. The problem I always have is remembering what those wonderfully obscure ANSI escape sequences represent. I always have to look at a table to remind myself that "light red" maps to "1;31".&lt;br /&gt;&lt;br /&gt;In an interesting guide to configuring your bash prompt that I have been going through, there was a script listed that makes this much easier:&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;#&lt;br /&gt;#   This file echoes a bunch of color codes to the&lt;br /&gt;#   terminal to demonstrate what's available.  Each&lt;br /&gt;#   line is the color code of one forground color,&lt;br /&gt;#   out of 17 (default + 16 escapes), followed by a&lt;br /&gt;#   test use of that color on all nine background&lt;br /&gt;#   colors (default + 8 escapes).&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;T='gYw'   # The test text&lt;br /&gt;&lt;br /&gt;echo -e "\n                 40m     41m     42m     43m\&lt;br /&gt;44m     45m     46m     47m";&lt;br /&gt;&lt;br /&gt;for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \&lt;br /&gt;     '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \&lt;br /&gt;     '  36m' '1;36m' '  37m' '1;37m';&lt;br /&gt;do FG=${FGs// /}&lt;br /&gt;echo -en " $FGs \033[$FG  $T  "&lt;br /&gt;for BG in 40m 41m 42m 43m 44m 45m 46m 47m;&lt;br /&gt;do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";&lt;br /&gt;done&lt;br /&gt;echo;&lt;br /&gt;done&lt;br /&gt;echo&lt;br /&gt;&lt;/pre&gt;This is from the &lt;a href="http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html"&gt;Bash Prompt HOWTO&lt;/a&gt;, from a script by Daniel Crisman. It produces the following when run:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_75nXVfeyezs/RyjG4Rs3ciI/AAAAAAAAABM/BFEyJmYoP9Q/s1600-h/color-script-output.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_75nXVfeyezs/RyjG4Rs3ciI/AAAAAAAAABM/BFEyJmYoP9Q/s320/color-script-output.png" alt="" id="BLOGGER_PHOTO_ID_5127566845887869474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Just add an alias like &lt;code&gt;alias colors="~/dir/of/handy/scripts/print_shell_colors.sh"&lt;/code&gt;, and you can be reminded whenever you like.&lt;br /&gt;&lt;br /&gt;I am still experimenting with my prompt colors, but differentiating the fields I find useful has made things a lot easier:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_75nXVfeyezs/RyjHbRs3cjI/AAAAAAAAABU/wCJwsDvhu1Y/s1600-h/color-prompt.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_75nXVfeyezs/RyjHbRs3cjI/AAAAAAAAABU/wCJwsDvhu1Y/s320/color-prompt.png" alt="" id="BLOGGER_PHOTO_ID_5127567447183290930" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3381084233746254824?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3381084233746254824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3381084233746254824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3381084233746254824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3381084233746254824'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/reference-script-for-cli-color-codes.html' title='Reference script for CLI color codes'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_75nXVfeyezs/RyjG4Rs3ciI/AAAAAAAAABM/BFEyJmYoP9Q/s72-c/color-script-output.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-9042878539331431779</id><published>2007-10-30T12:20:00.000-07:00</published><updated>2007-10-30T12:33:48.964-07:00</updated><title type='text'>View compressed log files easily</title><content type='html'>Any linux distribution around these days will have compression and rotation in place for files in &lt;code&gt;/var/log&lt;/code&gt; (or wherever else they happen to go). So if you look in there, you will see one or two log files (current and the last one) for each process logged, as well as 3-7 compressed files for the same process. These then get rotated out.&lt;br /&gt;&lt;br /&gt;In any case, say you want to look inside one of those compressed log files. You could write out an untar command and then view the file. Then have to delete the temporary file. Messy. There is a better way.&lt;br /&gt;&lt;br /&gt;The first I found was interesting (from &lt;a href="http://puppylinux.org/wikka/bash"&gt;PuppyLinux&lt;/a&gt;): Simply run &lt;code&gt;man ./COMPRESSEDFILE&lt;/code&gt;. You view the contents of the file with the man file viewer. The annoying thing is that is does funny things with line breaks.&lt;br /&gt;&lt;br /&gt;A much better way: &lt;code&gt;&lt;a href="http://www.mkssoftware.com/docs/man1/zcat.1.asp"&gt;zcat&lt;/a&gt; COMPRESSEDFILE | less&lt;/code&gt;. You view the file in less, and when done, there is no temp file to delete. To make it faster, just add a simple alias: &lt;code&gt;alias viewlog="zcat $1 | less"&lt;/code&gt;. This makes viewing those compressed logfiles as painless as viewing the current ones.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-9042878539331431779?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/9042878539331431779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=9042878539331431779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/9042878539331431779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/9042878539331431779'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/view-compressed-log-files-easily.html' title='View compressed log files easily'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-486226558522786173</id><published>2007-10-23T19:55:00.000-07:00</published><updated>2007-10-25T19:52:44.324-07:00</updated><title type='text'>Loops in the CLI: Warm and Fuzzy</title><content type='html'>It seems nearly every week, I find something amazingly handy in bash that I had not used before. This time: Loops. I would bet nearly everyone who has written more than a handful of shell scripts over a few lines in length has used one or more of the loops bash has to offer. But, what I realized (not sure why it did not bash me sooner) is that loops are also very effective timesavers as one-off commands in everyday shell usage.&lt;br /&gt;&lt;br /&gt;I suppose the association came from first using the shell in a very simple way, of just giving commands singly, and only using constructs like loops in scripts I wrote out in files. But recently, I had several identical operations to perform on a series of files with consistent names, and a loop came to mind. The files were all mp4 videos, and I needed to convert them with ffmpeg, and send them through flvtool2. Instead of 2 commands typed out for each file, I ran:&lt;br /&gt;&lt;pre class="wiki"&gt;for FILE in $(find . -maxdepth 1 -type f -iname \*large.mp4); do ffmpeg -sameq -i $FILE -s 480x270 -ar 44100 -r 10 $FILE.flv; done &lt;/pre&gt;You can use loops as like in any shell script, just write the whole loop on one line, separating the conditions, parts in the suite, and the termination with semicolons (these are mostly optional when using line breaks in scripts in files).&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://penguinpetes.com/b2evo/index.php?title=how_the_one_liner_for_loop_in_bash_goes&amp;amp;more=1&amp;amp;c=1&amp;amp;tb=1&amp;amp;pb=1."&gt;Post that inspired me&lt;/a&gt;, with lots of practical tips for loop usage.&lt;/li&gt;&lt;li&gt;More &lt;a href="http://tldp.org/LDP/abs/html/loops1.html"&gt;advanced loop documentation&lt;/a&gt; from TLDP.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-486226558522786173?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/486226558522786173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=486226558522786173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/486226558522786173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/486226558522786173'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/loops-in-cli-warm-and-fuzzy.html' title='Loops in the CLI: Warm and Fuzzy'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8971552454399299499</id><published>2007-10-23T07:48:00.000-07:00</published><updated>2007-10-23T08:15:30.729-07:00</updated><title type='text'>Handy Command: Fuser</title><content type='html'>&lt;a href="http://www.linuxcommand.org/man_pages/fuser1.html"&gt;Fuser&lt;/a&gt; is a very handy command when you are trying to investigate what is listening on a box. Consider the following case. You, being a diligent systems administrator, have been performing regular nmap scans against your boxes from remote hosts. You discover that something is listening on port 587 on a server.&lt;br /&gt;&lt;br /&gt;What you immediately need to know is: what program is actually listening on that port? The quickest way to find out is to simply run &lt;code&gt;sudo fuser 587/tcp&lt;/code&gt; on the box in question. This queries the kernel for what PID is listening on the specified port and reveals almost what you need:&lt;br /&gt;&lt;pre&gt;587/tcp:              8102&lt;/pre&gt;The first column is the port you specified, the second is the PID using that port currently. This can be combined with ps to give you the desired output, such as via  &lt;code&gt;echo `sudo /sbin/fuser 587/tcp` | cut -d' ' -f 2 | xargs ps&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt; PID TTY      STAT   TIME COMMAND&lt;br /&gt;8102 ?        S     14:13 /usr/libexec/postfix/master&lt;/pre&gt;I used echo in this case because I was unable to decipher the delimiter used between the two columns in the default output. The whole thing should be aliased such that you run the alias and pass a port, and the ps output is produced.&lt;br /&gt;&lt;br /&gt;NOTE: &lt;code&gt;fuser&lt;/code&gt; is generally found in &lt;code&gt;/sbin&lt;/code&gt; or &lt;code&gt;/usr/sbin&lt;/code&gt;, which you may have to add to your path.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8971552454399299499?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8971552454399299499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8971552454399299499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8971552454399299499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8971552454399299499'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/handy-command-fuser.html' title='Handy Command: Fuser'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2519893699248347184</id><published>2007-10-20T20:21:00.000-07:00</published><updated>2007-10-20T21:24:52.163-07:00</updated><title type='text'>Easier Sharing: SSHFS</title><content type='html'>My last post was on how I used Samba to share files from my central media server to other machines on my local network. Seemed great at first, but having used it for a little while, I was rather disappointed. I had Rhythmbox looking at the mounted drive as my library. It started scanning the files once the directory was mounted. I could play them, but after a few minutes, Rhythmbox would freeze scanning the files. In addition, I could not even list the directory that contained the mounted directory. Something was getting frozen. This kept happening more and more, and was quite frustrating.&lt;br /&gt;&lt;br /&gt;I then tried of SSHFS for the same purpose, and it has been working &lt;span style="font-style: italic;"&gt;much&lt;/span&gt; better. If you can SSH to the machine with the files you want to share, then you don't have to make any changes to that computer. Just a few steps on the machine that will be accessing the remote store, and you are ready to go. From the top:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create the dir which to which the remote dir will be mounted (e.g. /home/myuser/Music)&lt;/li&gt;&lt;li&gt;Make sure you have ssh access on remote machine from the local machine&lt;/li&gt;&lt;li&gt;On the local machine:&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;sudo apt-get install sshfs&lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;sudo modprobe fuse&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;sudo usermod -G fuse -a youruser&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;sudo chgrp fuse /dev/fuse&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Logout of myuser on the local machine, then back in&lt;/li&gt;&lt;li&gt;&lt;code&gt;sshfs 192.168.1.6:/dir/on/remote/server LOCALDIR&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;code&gt;sudo modprobe fuse&lt;/code&gt; will make sure you have that kernel module loaded. You have to be in the fuse group to perform the mount, sudo or not. I am not exactly sure why you have to change the group of the fuse device, but you definitely have to to get it to work.&lt;br /&gt;&lt;br /&gt;At this point, you should be able to view all the files in /dir/on/remote/server from LOCALDIR. Performance wise, I had great success. Pointing Rhythmbox to the dir I mounted, it scanned all the files in a timely manner, and I was able to play them as if they were on the local machine without issue.&lt;br /&gt;&lt;br /&gt;If you wish to unmount the share, run &lt;code&gt;sudo fusermount -u LOCALDIR&lt;/code&gt;. One problem that has been suggested for which I do not have a fix yet is how to handle if the remote machine has a problem, reboots, or the network connection is otherwise dropped. I am not sure how this would be handled, since the mount would no longer work. fuse being a kernel module, this may cause freezing. If I find this addressed somewhere, I will post it.&lt;br /&gt;&lt;br /&gt;Additional information and links:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://ubuntu.wordpress.com/2005/10/28/how-to-mount-a-remote-ssh-filesystem-using-sshfs/"&gt;General HowTo&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://debaday.debian.net/2007/04/22/sshfs-easy-and-secure-access-to-a-remote-file-system/"&gt;Good reference&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://lists.ubuntu.com/archives/ubuntu-users/2006-June/080743.html"&gt;Post on changing /dev/fuse owner&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2519893699248347184?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2519893699248347184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2519893699248347184' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2519893699248347184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2519893699248347184'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/easier-sharing-sshfs.html' title='Easier Sharing: SSHFS'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8350864224163051650</id><published>2007-10-19T20:39:00.000-07:00</published><updated>2007-10-19T20:53:27.630-07:00</updated><title type='text'>Quick and Handy Samba Setup</title><content type='html'>I just never got around to setting up and using Samba on my home network. I had my files in SVN or would login to the box that had what I needed, or used some other mechanism. But a certain case kept popping up that forced me to get it in place.&lt;br /&gt;&lt;br /&gt;I have one server that has all of my movies, music, etc on my home network. I wanted to be able to access all my music from other machines. Using gnump3d was, aside from annoying for long term listening, a waste of bandwidth. Instead, I created a share on my media server accessible without password only on my LAN, and mounted this as my music library on my other machines.&lt;br /&gt;&lt;br /&gt;To set up the first part, I followed &lt;a href="http://www.debuntu.org/guest-file-sharing-with-samba"&gt;this handy tutorial&lt;/a&gt;. He has all the details, but basically you just installed samba on the machine you want to share from, edit the conf file to create a share with no password access locally, and restart samba.&lt;br /&gt;&lt;br /&gt;Then, on the machine you want to access the files from, you install smbfs. After that, create a dir you want to mount the shared files from (in my case ~/Music), then run&lt;br /&gt;&lt;code&gt;sudo smbmount //myserver/myshare ~/mnt.&lt;/code&gt; After that, you should be able to browse files you are sharing from the mountpoint you specified. Easy!&lt;br /&gt;&lt;br /&gt;More details on setting up Samba, as well as having a shared directory mount on boot, may be found &lt;a href="https://help.ubuntu.com/community/SettingUpSamba"&gt;here&lt;/a&gt;. One last thing. smbclient allows you to find information on local shares from the machine you are sharing from. For example, &lt;code&gt;smbclient -L SERVERNAME&lt;/code&gt; allows you to see all available shares on SERVERNAME.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8350864224163051650?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8350864224163051650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8350864224163051650' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8350864224163051650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8350864224163051650'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/quick-and-handy-samba-setup.html' title='Quick and Handy Samba Setup'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-5987280714165693082</id><published>2007-10-16T15:57:00.000-07:00</published><updated>2007-10-18T18:22:42.453-07:00</updated><title type='text'>More Tasty Tips for DenyHosts</title><content type='html'>After living with DenyHosts for some time, I have made some additional configuration changes that are quite helpful.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Whitelist known good IPs&lt;/span&gt;&lt;br /&gt;I found after not very long that my home IP address had been added to my webserver's hosts.deny file by DenyHosts. This was a result of having messed up my own login a few times. This could easily be an issue if you are regularly connecting to the box running DenyHosts (from work, home, etc).&lt;br /&gt;A simple solution: Add your IP to an allowed-hosts file in your DenyHosts working directory. Once that is in place, you might also need to find and remove the entry for the IP in question from your hosts.deny file (if it has already been added). It would be a wise choice to add known good IPs to allowed-hosts when you first setup DenyHosts. Otherwise, you might find yourself blocked from your server with no way to get access!&lt;br /&gt;For more details, see &lt;a href="http://denyhosts.sourceforge.net/faq.html#allowed"&gt;the FAQ&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Blacklist bad users&lt;/span&gt;&lt;br /&gt;It is also a good idea to add users you know are not allowed in a restricted-usernames file in your DenyHosts working directory. This keeps users that should never be allowed to login from trying, even once. There are two handy scripts provided to help in generating this list (located in the scripts dir of your DenyHosts working dir).&lt;br /&gt;The first, restricted_from_passwd.py, scans your /etc/passwd file and outputs users who have nologin set (print daemons, etc). You can redirect this to your restricted-usernames file.&lt;br /&gt;The second script is only handy after you have been running for some time. restricted_from_invalid.py, when passed your working dir, prints out the users which bad SSH attempts use most often. By default, it prints the top 10. You could also pass it a large number, say 10000, and it would print all the bad users ever attempted since DenyHosts was first started. I take this list, remove the users I have in place and know to be good, and use it as my restricted-usernames list.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Set the purge threshold and purge rate&lt;/span&gt;&lt;br /&gt;In your denyhosts,cfg file, set PURGE_DENY to something reasonable, 1 - 2 weeks perhaps. Otherwise, your hosts.deny might good huge.&lt;br /&gt;Then, set the PURGE_THRESHOLD to 2 -3. This means that while entries older than your PURGE_DENY will be removed from the deny list, if it occurs more than your PURGE_THRESHOLD, they will not be purged. This is more likely to stop the entries most often attempted.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Rotate log files&lt;/span&gt;&lt;br /&gt;Assuming you have logrotate installed (and why don't you?), the FAQ has &lt;a href="http://denyhosts.sourceforge.net/faq.html#2_25"&gt;a great example&lt;/a&gt; file for adding a rotate entry for DenyHosts.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Sync with central DenyHosts database&lt;/span&gt;&lt;br /&gt;One feature which really makes DenyHosts shine is the ability to share known rogue agents among DenyHosts instances. It is off by default, but to turn it on, edit denyhosts.cfg in your working dir. To enable synchronization, simply uncomment SYNC_SERVER. The value it is set to should be correct. By default, once synchronization is one, every hour the daemon will check with the server specified. It will upload hosts that you have denied, and download hosts that at least 3 others have denied. If you wish, you can tweak the timing of this process, just to upload, the threshold for downloading, etc.&lt;br /&gt;For more details, see &lt;a href="http://denyhosts.sourceforge.net/faq.html#4_0"&gt;the FAQ&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;After these changes are made, be sure to restart DenyHosts via &lt;code&gt;sudo /usr/share/denyhosts/daemon-control restart&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-5987280714165693082?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/5987280714165693082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=5987280714165693082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5987280714165693082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5987280714165693082'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/more-tasty-tips-for-denyhosts.html' title='More Tasty Tips for DenyHosts'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-7147821095344283885</id><published>2007-10-15T18:47:00.000-07:00</published><updated>2007-10-15T19:00:29.739-07:00</updated><title type='text'>DenyHosts: Watches your SSH log for you</title><content type='html'>While I knew that brute-force attacks on SSH servers are very common, I had not taken the time to look at the connection attempt logs on my home servers until recently (to do that, by the way, on Ubuntu, try &lt;code&gt;sudo tail -n 100 /var/log/auth.log&lt;/code&gt;). I was seeing attempts every few seconds for some periods, mostly on non-standard ports!&lt;br /&gt;&lt;br /&gt;So far as I knew, no one had gotten through, but why risk the worry. Instead I installed &lt;a href="http://denyhosts.sourceforge.net/"&gt;DenyHosts&lt;/a&gt;. DenyHosts is a Python script that watches your auth.log, and adds IPs that repeatedly try and fail to connect to the &lt;code&gt;/etc/hosts.deny list&lt;/code&gt;, effectively denying then future access.&lt;br /&gt;&lt;br /&gt;It is rather easy to install. There is a &lt;a href="http://packages.ubuntu.com/edgy/net/denyhosts"&gt;package&lt;/a&gt; in the repos, but I was unable to get this to work on my servers for some reason (it is still in testing). I instead followed &lt;a href="http://www.howtoforge.com/preventing_ssh_dictionary_attacks_with_denyhosts"&gt;this handy tutorial&lt;/a&gt;. It worked flawlessly, with one exception. I had to run &lt;code&gt;sudo touch /etc/hosts.deny&lt;/code&gt; right before starting the service. Otherwise it threw an error that the file did not exist and closed. With the touch, all went fine. That fix was listed in &lt;a href="https://bugs.launchpad.net/ubuntu/+source/denyhosts/+bug/87898"&gt;this bug report&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A few other notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you have not done so, be SURE to change this line in &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt;:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;PermitRootLogin no&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;While editing &lt;code&gt;/usr/share/denyhosts/denyhosts.cfg&lt;/code&gt; according to the tutorial, I recommend (following others posting this tip) to also change this line:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;BLOCK_SERVICE = ALL&lt;/code&gt;. Also, of course, comment the line: &lt;code&gt;BLOCK_SERVICE  = sshd&lt;/code&gt;. This blocks access on all ports to IPs that get denied. And really, if you want to block a potentially malicious IP from SSH access, why give them access to other services?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-7147821095344283885?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/7147821095344283885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=7147821095344283885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7147821095344283885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7147821095344283885'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/denyhosts-watches-your-ssh-log-for-you.html' title='DenyHosts: Watches your SSH log for you'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1451977529199249124</id><published>2007-10-13T08:33:00.000-07:00</published><updated>2007-10-13T17:53:37.093-07:00</updated><title type='text'>Topping top: htop</title><content type='html'>Top is a very handy and common application. But there is always room for improvement, even in common and simple programs. In this case, meet &lt;a href="http://htop.sourceforge.net/index.php?page=main"&gt;htop&lt;/a&gt;. It performs a similar function to top, viz. showing you what is using your system's CPU, memory, or other resources. However, htop presents this information is a much friendlier graphical way.&lt;br /&gt;&lt;br /&gt;On Ubuntu, install is a snap. Make sure you have the universe repos enabled, and then run &lt;code&gt;sudo apt-get install htop&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;And no more obscure commands to remember for configuring layout and appearance. There is a handy list of commands at the bottom of the display. In addition, that display is in a wide range of handy colors (also configurable of course).  The whole presentation is easier to read, and a lot easier to customize.&lt;br /&gt;&lt;br /&gt;As mentioned, there are a lot of options for htop. Once you configure things and exit htop, your changes are saved to a .htoprc in your home directory. To see the basic options I have set, you can check out &lt;a href="http://launchpod.homelinux.com:81/trac/configuration/browser/htop/.htoprc"&gt;my .htoprc.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I like to have top (and now htop) running in the top left of my dual monitor setup. Using fluxbox,  this is rather easy. See my .fluxbox &lt;a href="http://launchpod.homelinux.com:81/trac/configuration/browser/fluxbox/homepc/startup"&gt;startup&lt;/a&gt; and &lt;a href="http://launchpod.homelinux.com:81/trac/configuration/browser/fluxbox/homepc/apps"&gt;apps&lt;/a&gt; files.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_75nXVfeyezs/RxFodEUXgrI/AAAAAAAAABE/ljTWn-XyZiU/s1600-h/htop.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_75nXVfeyezs/RxFodEUXgrI/AAAAAAAAABE/ljTWn-XyZiU/s320/htop.png" alt="" id="BLOGGER_PHOTO_ID_5120989099881628338" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1451977529199249124?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1451977529199249124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1451977529199249124' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1451977529199249124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1451977529199249124'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/topping-top-htop.html' title='Topping top: htop'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_75nXVfeyezs/RxFodEUXgrI/AAAAAAAAABE/ljTWn-XyZiU/s72-c/htop.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2182075741804296992</id><published>2007-10-08T12:02:00.000-07:00</published><updated>2007-10-08T12:22:16.189-07:00</updated><title type='text'>Run vim without being there...</title><content type='html'>Say you have a text file. You need to alter it in some regular way before sending it on somewhere else. Instead of editing by hand, there is a neat option you can use to edit the file with familiar vim commands (instead of awk's lovely syntax), without having to open vim interactively.&lt;br /&gt;&lt;br /&gt;The principle is simple: You make a file containing each of the commands you want to run, one per line. They will be the same form as if you typed them in a vim session, starting with ":". Make sure that ":wq" is the last one. Then you run vim with:&lt;br /&gt;&lt;pre&gt;vim -s FILEOFCOMMANDS.txt FILETOEDIT.txt&lt;/pre&gt;Example case. My file to edit is tester.txt, contents being:&lt;br /&gt;&lt;pre&gt;64.114.33.23,www.example.com&lt;br /&gt;64.114.33.24,www.example.co.uk&lt;br /&gt;64.114.33.25,www.example.co.jp&lt;br /&gt;64.114.33.26,www.example.co.fr&lt;br /&gt;64.114.33.27,www.example.co.cz&lt;/pre&gt;Then I have a &lt;code&gt;commands.txt&lt;/code&gt; file containing:&lt;br /&gt;&lt;pre&gt;:%s/^/("&lt;br /&gt;:%s/,/","&lt;br /&gt;:%s/$/"),&lt;br /&gt;:wq&lt;/pre&gt;Finally I ran it as &lt;code&gt;vim -s commands.txt tester.txt&lt;/code&gt;. As a result, &lt;code&gt;cat tester.txt&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt;("64.114.33.23","www.zenoss.com.co.uk"),&lt;br /&gt;("64.114.33.24","www.zenoss.com.co.de"),&lt;br /&gt;("64.114.33.25","www.zenoss.com.co.fr"),&lt;br /&gt;("64.114.33.26","www.zenoss.com.co.cp"),&lt;br /&gt;("64.114.33.27","www.zenoss.com.co.jp"),&lt;br /&gt;&lt;/pre&gt;You could put something like this in a cron job, making transitions between data manipulation steps quick and easy, without having to mess with the files by hand each time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2182075741804296992?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2182075741804296992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2182075741804296992' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2182075741804296992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2182075741804296992'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/run-vim-without-being-there.html' title='Run vim without being there...'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-5207082445133877251</id><published>2007-10-07T12:33:00.000-07:00</published><updated>2007-10-08T11:17:08.532-07:00</updated><title type='text'>Handy Alias: Grab latest svn log</title><content type='html'>I keep having the occasion to view the log comments for the current revision in my SVN repository. This means:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Knowing the number of the current revision,&lt;/li&gt;&lt;li&gt;Passing this to &lt;code&gt;svn log -r&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;Instead of doing that by hand, I made an alias to do it for me:&lt;br /&gt;&lt;pre&gt;alias svnlastlog="svn info | grep 'Last Changed Rev' | cut -d ' ' -f 4 | xargs -I mystr svn log -r mystr"&lt;/pre&gt;So if you are in a directory that is versioned, you just run that command, and (after being prompted to authenticate to your repo, if applicable), out comes the log entry for the current revision. Perhaps there is a built in command to do this already, but I could not find it via Google and the SVN Book.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-5207082445133877251?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/5207082445133877251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=5207082445133877251' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5207082445133877251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5207082445133877251'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/handy-alias-grab-latest-svn-log.html' title='Handy Alias: Grab latest svn log'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3508992725237750163</id><published>2007-10-01T20:44:00.000-07:00</published><updated>2007-10-01T20:49:38.434-07:00</updated><title type='text'>What are all the wxPython Events?</title><content type='html'>On several occasions recently I found did not know what event to specify to trigger something in my wxPython apps. I had a hard time finding anything close to a comprehensive list of all events available, so I was limited to posting questions on the &lt;a href="http://www.wxpython.org/maillist.php"&gt;wxPython users mailing list&lt;/a&gt;. And, while this is a wonderful and active list, it would be nice to have a guide even closer at hand.&lt;br /&gt;&lt;br /&gt;Cody Precord on the list provided me with a handy way to get this:&lt;br /&gt;&lt;pre&gt;import wx&lt;br /&gt;&lt;br /&gt;for x in dir(wx):&lt;br /&gt;  if x.startswith('EVT_'):&lt;br /&gt;      print x&lt;/pre&gt;Run that, and out comes a list of all the &lt;code&gt;EVT&lt;/code&gt; types. Of course, in some cases you may not know what the event is just from the name, but they are mostly suitable self-explanatory. See for yourself:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;EVT_ACTIVATE&lt;br /&gt;EVT_ACTIVATE_APP&lt;br /&gt;EVT_BUTTON&lt;br /&gt;EVT_CALCULATE_LAYOUT&lt;br /&gt;EVT_CHAR&lt;br /&gt;EVT_CHAR_HOOK&lt;br /&gt;EVT_CHECKBOX&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3508992725237750163?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3508992725237750163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3508992725237750163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3508992725237750163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3508992725237750163'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/10/what-are-all-wxpython-events.html' title='What are all the wxPython Events?'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2318009049249699052</id><published>2007-09-26T20:48:00.000-07:00</published><updated>2007-09-26T17:49:17.618-07:00</updated><title type='text'>Clean your code: Pylint</title><content type='html'>&lt;a href="http://www.logilab.org/857"&gt;pylint&lt;/a&gt; is a tool that "analyzes Python source code looking for bugs and signs of poor quality". Now, that can mean optimizing and cleaning your code at a fairly advanced level at which, if you are a beginning programmer like me, you will not get much out of.&lt;br /&gt;&lt;br /&gt;However, it can help with lots of small checking too, and improve the form of your Python code in a quick and convenient manner. It will show you problems you might not even know were problems!  I have not gotten into too many of the features myself, but some quick examples should show you its utility. Getting it is pretty simple. On Ubuntu for example, installing is only a matter of &lt;code&gt;sudo apt-get install pylint&lt;/code&gt;. To run it, just do &lt;code&gt;pylint YOURAPP.py&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;It can take a little while to run, and then it spits out several blocks of results. Some examples:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;C: 68: Line too long (154/80)&lt;/code&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;One of the lines in the file has way too many characters. It is recommended to keep each line at 79 characters or less. To learn why, check out &lt;a href="http://www.python.org/dev/peps/pep-0008/"&gt;PEP 8&lt;/a&gt;, under "Code Lay-out", "Maximum Line Length".&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;code&gt;C:  5: Operator not preceded by a space&lt;br /&gt;__version__="0.1"&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;W: 40:Frame.__init__: Unused variable 'statusbar'&lt;/code&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;No need for this variable anymore, just taking up space.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;code&gt;C: 93:App.OnInit: Invalid name "OnInit" (should match [a-z_][a-z0-9_]{2,30}$)&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;As can be seen from these examples, the alerts are pretty easy to read. pylint also shows you how many lines are duplicated, metrics such as how many lines of code versus docstrings, how many modules, and more. In the end, it gives your code an overall score. If you fix some errors and re-run it, it will show you your current and previous scores.&lt;br /&gt;&lt;br /&gt;To start using the more advanced features, peruse &lt;a href="http://linux.die.net/man/1/pylint"&gt;the man page&lt;/a&gt;. Now, go clean your code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2318009049249699052?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2318009049249699052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2318009049249699052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2318009049249699052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2318009049249699052'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/08/clean-your-code-pylint.html' title='Clean your code: Pylint'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1298897856822528543</id><published>2007-09-24T19:13:00.000-07:00</published><updated>2007-09-24T19:34:27.205-07:00</updated><title type='text'>Tips: Toolbar icons in wxPython</title><content type='html'>I have started playing around with &lt;a href="http://www.wxpython.org/"&gt;wxPython&lt;/a&gt;, a great toolkit for making clean, cross-platform, flexible GUIs in Python. While there are a lot of great tutorials out there on how to get started making apps with wxPython, having &lt;a href="http://www.manning.com/rappin/"&gt;The Book&lt;/a&gt; has been a definite boon.&lt;br /&gt;&lt;br /&gt;While going through the basic exercises and starting to make my own GUIs, I kept running into an issue that got more and more annoying: toolbar icons. I wanted to have a toolbar, with some basic icons, for actions like New, Open, etc. In the book, Rappin and Dunn give an example of using toolbar icons (p49). The pertinent part:&lt;br /&gt;&lt;pre&gt;import wx&lt;br /&gt;import images&lt;br /&gt;[SNIP]&lt;br /&gt;toolbar =  self.CreateToolbar()&lt;br /&gt;toolbar.AddSimpleTool(wx.NewId(), images.getNewBitMap(), "New", "Long help for 'new'")&lt;br /&gt;toolbar.Realize()&lt;/pre&gt;This in no way works. When I ran it on Ubuntu (7.04), I got:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ImportError: No module named images&lt;/pre&gt;&lt;br /&gt;After some Googling, I found this is a common problem for beginners. Lots of related example code will be similar to the above, but specify something like "stock_new.png" for the image. To get all these to work, you actually need to download some images, and specify those. Seems obvious after the fact, but it seemed quite possible to me starting out there there would be a built-in facility to grab OS-specific icons for basic tasks such as New and Load.&lt;br /&gt;&lt;br /&gt;A great source of good-looking free icons for desktop applications is the &lt;a href="http://tango.freedesktop.org/Tango_Icon_Gallery"&gt;Tango Desktop Project&lt;/a&gt;. Sometimes that page is down or takes a very long time to load. If so, you can download the .zip on &lt;a href="http://art.gnome.org/themes/icon/1150"&gt;this page&lt;/a&gt;. Every icon you will likely want for a toolbar may be found in "actions", once you extract the Tango folder and select an icon size to use. I found it helpful to place the icons I wanted in a "resources" folder in the folder holding my application, and use them with code such as:&lt;br /&gt;&lt;pre&gt;    toolbar = self.CreateToolBar()&lt;br /&gt;   toolbar.AddSimpleTool(wx.NewId(), wx.Image('resources/document-new.png',&lt;br /&gt;       wx.BITMAP_TYPE_PNG).ConvertToBitmap(), 'New', 'Long help for New')&lt;br /&gt;   toolbar.AddSimpleTool(wx.NewId(), wx.Image('resources/document-open.png',&lt;br /&gt;       wx.BITMAP_TYPE_PNG).ConvertToBitmap(), 'Open', 'Long help for Open')&lt;br /&gt;   toolbar.AddSimpleTool(wx.NewId(), wx.Image('resources/document-save.png',&lt;br /&gt;       wx.BITMAP_TYPE_PNG).ConvertToBitmap(), 'Save', 'Long help for Save')&lt;br /&gt;   toolbar.Realize()&lt;/pre&gt;That will result in something like the following (Menubar added for positional context):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_75nXVfeyezs/RvhzLEUXgqI/AAAAAAAAAA8/NDterSh-UUc/s1600-h/toolbar.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_75nXVfeyezs/RvhzLEUXgqI/AAAAAAAAAA8/NDterSh-UUc/s320/toolbar.png" alt="" id="BLOGGER_PHOTO_ID_5113964010854122146" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1298897856822528543?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1298897856822528543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1298897856822528543' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1298897856822528543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1298897856822528543'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/09/tips-toolbar-icons-in-wxpython.html' title='Tips: Toolbar icons in wxPython'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_75nXVfeyezs/RvhzLEUXgqI/AAAAAAAAAA8/NDterSh-UUc/s72-c/toolbar.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-7053195417431522359</id><published>2007-08-25T20:43:00.001-07:00</published><updated>2007-08-25T20:53:34.370-07:00</updated><title type='text'>Quad terminal laser!</title><content type='html'>I find, not too infrequently, that I need to perform operations across several directories, or across several servers, at once. To best facilitate this, I usually open 3-5 terminals, and then move them around so that I can see them all at once. Why not automate this, I thought. Instead of hard coding sizes and positions for the terminals and assigning the sequence to a keypress, I thought I would do something more useful and write a Python script to find out this information based on the current display, and launch the terminals appropriately.&lt;br /&gt;&lt;br /&gt;This has been completed, but the script still has a lot to be desired. You still have to set as a variable whether dual monitors are being used (could not find a way to determine this programatically yet), and it only works with single monitor or TwinView in Linux. You can also set what sort of terminal you want to use (gnome-terminal is default), what side you want them to open on for dual monitor setups (right is default), and what directory they should be in (user's home dir is default). It gets your screen's dimensions, calculates where the terminals should be and how they should be separated, and launches them.&lt;br /&gt;&lt;br /&gt;I then added this to my &lt;code&gt;.fluxbox/keys&lt;/code&gt; file:&lt;br /&gt;&lt;pre&gt;Mod1 q :ExecCommand python /home/sam/code_homerepo/code/userextensions/quadterm.py&lt;/pre&gt;So now I just press "Alt + q", and four gnome-terminals launch perfectly spaced on my right monitor!&lt;br /&gt;&lt;br /&gt;The code is quite ugly right now, but as it stands:&lt;br /&gt;&lt;pre&gt;#/usr/bin/python&lt;br /&gt;#####################################################&lt;br /&gt;# Creates 4 terminals evenly quartering a screen&lt;br /&gt;#&lt;br /&gt;# Linux only right now. Map it to a keystroke for&lt;br /&gt;# maximum convenience.&lt;br /&gt;#&lt;br /&gt;# If you don't want to use gnome-terminal, change the&lt;br /&gt;# next variable. Warning: The width and height&lt;br /&gt;# specified are in characters and rows for gnome-&lt;br /&gt;# terminal; they might have to be in pixels for other&lt;br /&gt;# apps.&lt;br /&gt;#####################################################&lt;br /&gt;terminal = "gnome-terminal"&lt;br /&gt;#####################################################&lt;br /&gt;# If you are not using TwinView, toggle the following:&lt;br /&gt;#####################################################&lt;br /&gt;twinview = True&lt;br /&gt;#####################################################&lt;br /&gt;# Which monitor (if Dual) you want them on:&lt;br /&gt;#####################################################&lt;br /&gt;side = "right"&lt;br /&gt;#####################################################&lt;br /&gt;# Dir the terminals will be in:&lt;br /&gt;#####################################################&lt;br /&gt;workingdir = "~"&lt;br /&gt;#####################################################&lt;br /&gt;import commands&lt;br /&gt;# Get the screen dimensions:&lt;br /&gt;dimeninfo = commands.getoutput("xdpyinfo | grep dimensions")&lt;br /&gt;# Read out the needed numbers:&lt;br /&gt;dimeninfosplit = dimeninfo.split()&lt;br /&gt;dimensions = dimeninfosplit[1]&lt;br /&gt;prex = dimensions.split("x")&lt;br /&gt;x = int(prex[0])&lt;br /&gt;prey = dimensions.split("x")&lt;br /&gt;y = int(prey[1])&lt;br /&gt;# Take some visual buffers into account:&lt;br /&gt;widthsansborder = x - 50&lt;br /&gt;heightsansborder = y - 50&lt;br /&gt;# Calculate dimensions in pixels:&lt;br /&gt;termwidthpixels = widthsansborder / 2&lt;br /&gt;termheightpixels =  heightsansborder / 2&lt;br /&gt;# Convert to characters/rows for most apps (like gnome-terminal).&lt;br /&gt;# No idea what the conversion rate should be...&lt;br /&gt;termwidth = termwidthpixels / 16&lt;br /&gt;termheight = termwidthpixels / 60&lt;br /&gt;# Constant width/height for all 4.&lt;br /&gt;t1width = t2width = t3width = t4width = termwidth&lt;br /&gt;t1height = t2height = t3height = t4height = termheight&lt;br /&gt;# Find the offset position for appropriate pairs (in pixels):&lt;br /&gt;t1posx = t3posx = 50&lt;br /&gt;t2posx = t4posx = (50 * 2) + termwidthpixels&lt;br /&gt;t1posy = t2posy = 50&lt;br /&gt;t3posy = t4posy = 50 + termheightpixels&lt;br /&gt;# If TwinView is being used, we need to halve some offsets:&lt;br /&gt;if twinview is True:&lt;br /&gt;   t2posx = (((50 * 2) + termwidthpixels) / 2)&lt;br /&gt;   t4posx = (((50 * 2) + termwidthpixels) / 2)&lt;br /&gt;   if side == "right":&lt;br /&gt;       t1posx = 50 + (x / 2)&lt;br /&gt;       t2posx = x * .75&lt;br /&gt;       t3posx = 50 + (x / 2)&lt;br /&gt;       t4posx = x * .75&lt;br /&gt;# Spawn the 4 terminals, with needed positions and sizes, then exit quietly:&lt;br /&gt;commands.getoutput("%s --geometry=%dx%d+%d+%d --working-directory=%s" % \&lt;br /&gt;   (terminal, t1width, t1height, t1posx, t1posy, workingdir))&lt;br /&gt;commands.getoutput("%s --geometry=%dx%d+%d+%d --working-directory=%s" % \&lt;br /&gt;   (terminal, t2width, t2height, t2posx, t2posy, workingdir))&lt;br /&gt;commands.getoutput("%s --geometry=%dx%d+%d+%d --working-directory=%s" % \&lt;br /&gt;   (terminal, t3width, t3height, t3posx, t3posy, workingdir))&lt;br /&gt;commands.getoutput("%s --geometry=%dx%d+%d+%d --working-directory=%s" % \&lt;br /&gt;   (terminal, t4width, t4height, t4posx, t4posy, workingdir))&lt;br /&gt;# For debugging, print what we have calculated:&lt;br /&gt;#print "%s at: %d x %d + %d + %d" % (terminal, t1width, t1height, t1posx, t1posy)&lt;br /&gt;#print "%s at: %d x %d + %d + %d" % (terminal, t2width, t2height, t2posx, t2posy)&lt;br /&gt;#print "%s at: %d x %d + %d + %d" % (terminal, t3width, t3height, t3posx, t3posy)&lt;br /&gt;#print "%s at: %d x %d + %d + %d" % (terminal, t4width, t4height, t4posx, t4posy)&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-7053195417431522359?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/7053195417431522359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=7053195417431522359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7053195417431522359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7053195417431522359'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/08/quad-terminal-laser.html' title='Quad terminal laser!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-7767417519925550073</id><published>2007-08-23T11:21:00.001-07:00</published><updated>2007-08-23T11:34:14.705-07:00</updated><title type='text'>All your base...</title><content type='html'>Master Ian (whom I would link to, if his blog were not continually DOWN), showed me a very simple yet useful command: &lt;a href="http://www.mkssoftware.com/docs/man1/basename.1.asp"&gt;&lt;code&gt;basename&lt;/code&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You give it the path to a file, it gives you the filename and extension. If you also give it the extension, it just gives you the filename. Thus:&lt;br /&gt;&lt;pre&gt;sam@ZenSam:~$ basename unique-ip-list.csv&lt;br /&gt;unique-ip-list.csv&lt;br /&gt;sam@ZenSam:~$ basename unique-ip-list.csv .csv&lt;br /&gt;unique-ip-list&lt;/pre&gt;This could be quite useful in shell scripting, to grab a list of desired for various purposes. One implementation I thought of right off: If you wanted to throw an error message for the usage of a command in a script, instead of having it display "See /usr/bin/zip for details" or something similar, you could run it through basename, and get a better looking name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-7767417519925550073?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/7767417519925550073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=7767417519925550073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7767417519925550073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7767417519925550073'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/08/all-your-base.html' title='All your base...'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8585819094758159490</id><published>2007-08-12T00:52:00.000-07:00</published><updated>2007-08-16T20:51:02.477-07:00</updated><title type='text'>Domainspotter Project Homepage Launched!</title><content type='html'>I have spent some time thinking about what to do with my Domainspotter program. I believe that it can be further developed into something quite interesting, and somewhat useful. As a result, I decided to create a site to house its documentation, feature roadmap, source code, and other related items. This can now be viewed at &lt;a href="http://domainspotter.org/"&gt;domainspotter.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There is not a whole lot there right now, but I hope to keep adding to it. This will minimally include the feature map as I have it planned now, and access to the SVN code base. I am still working on the content for the site, but it will mainly link to my &lt;a href="http://launchpod.homelinux.com:81/trac/code/roadmap"&gt;roadmap in Trac&lt;/a&gt; for the project, as well as the &lt;a href="http://launchpod.homelinux.com:81/trac/code/browser/web/domainspotter/program"&gt;code browser&lt;/a&gt;. It will be the home for all things related to Domainspotter.&lt;br /&gt;&lt;br /&gt;In the longer term, I will also create a frontend to view results from domainspotter, updated weekly. In addition, I will also be adding various statistics and graphing displays to show the results in different ways.&lt;br /&gt;&lt;br /&gt;So check there soon, hopefully things of interest will be found!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8585819094758159490?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8585819094758159490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8585819094758159490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8585819094758159490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8585819094758159490'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/08/domainspotter-project-homepage-launched.html' title='Domainspotter Project Homepage Launched!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8959191646145980938</id><published>2007-08-04T06:57:00.000-07:00</published><updated>2007-09-17T19:38:52.032-07:00</updated><title type='text'>Fun with Python: Domainspotter</title><content type='html'>In an effort to learn Python better, I will be writing a number of relatively small scripts to perform set tasks. I find that giving myself some goal and having to code towards it is more effective in learning syntax than going through coding exercises in a tutorial.&lt;br /&gt;&lt;br /&gt;For the first such project, I wanted to determine how many words in a current English dictionary are not taken as domain names. This could have become a rather complicated exercise, but I limited it to the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;single English words, using the &lt;a href="http://wordlist.sourceforge.net/"&gt;AGID-4 dictionary&lt;/a&gt;&lt;/li&gt;&lt;li&gt;.com and .net TLDs only&lt;/li&gt;&lt;/ul&gt;There are many domains made with acronyms, combinations of names, made up words, and many other forms. But I was curious just how many of the more common terms in the language were still available.&lt;br /&gt;&lt;br /&gt;The code as it stands is at the end of this post.&lt;br /&gt;&lt;br /&gt;Before you look at how &lt;span style="font-style: italic;"&gt;I&lt;/span&gt; did it, however (which is far from optimal anyway), I would encourage you to try out the exercise on your own, given the basic requirements stated above. I found that this program was perfect for learning more Python, since it required learning how to perform a number of disparate activities, such as reading and parsing files, using external modules, performing web lookups, and displaying desired data. These are, of course, some of the most general tasks most programs of use must perform.&lt;br /&gt;&lt;br /&gt;A few notes. The whois lookups was the only section of the program that I assumed would require something outside of core Python. I came across &lt;a href="http://sourceforge.net/projects/rwhois/"&gt;rwhois.py&lt;/a&gt;, a module for performing whois lookups. I still have the code to implement this listed in the program as it stands for illustration, but found it did not meet my needs. It could not locate many domains I confirmed were taken using the simple command &lt;code&gt;whois&lt;/code&gt;. So, I decided to fall back on something I knew: the command &lt;code&gt;whois&lt;/code&gt;! This seemed to work fine for my needs.&lt;br /&gt;&lt;br /&gt;Additionally, while I know the code could stand for optimization all over the place, I was curious how long the web lookups would take. To do this, I modified the lookup function to the following:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import time&lt;br /&gt;self.totalchecked = 0&lt;br /&gt;self.availdomains = []&lt;br /&gt;times = []&lt;br /&gt;for potdomain in self.potdomains:&lt;br /&gt;start = time.time()&lt;br /&gt;runthis = "whois %s" % potdomain&lt;br /&gt;check = commands.getoutput(runthis).split('\n')&lt;br /&gt;if check[8] == 'No match for "%s".' % potdomain.upper():&lt;br /&gt;self.availdomains.append(potdomain)&lt;br /&gt;else:&lt;br /&gt;pass&lt;br /&gt;self.totalchecked+=1&lt;br /&gt;end = time.time()&lt;br /&gt;timeforquery = end - start&lt;br /&gt;times.append(timeforquery)&lt;br /&gt;import pdb&lt;br /&gt;pdb.set_trace()&lt;br /&gt;&lt;/pre&gt;I ran this against a much shortened dictionary file (the top 10 lines of the real one). Once the debugger launched, I did the following:&lt;br /&gt;&lt;pre&gt;(Pdb) print sum(times) / len(times)&lt;br /&gt;0.884103870392&lt;br /&gt;&lt;/pre&gt;This gave me the average time per web query. Now, note that I found this out &lt;span style="font-style: italic;"&gt;after&lt;/span&gt; I started the final run for the first time... And since the actual dictionary file has 112,505 entries, I estimated the entire series should be done in around 27.6 hours. So I started my final run at around 7:32pm Saturday evening, and expected it to run until around 11pm Sunday evening. But instead I got an error during the night:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;  File "domainspotter.py", line 125, in lookup&lt;br /&gt;if check[8] == 'No match for "%s".' % potdomain.upper():&lt;br /&gt;IndexError: list index out of range&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;This, I am pretty certain, was due to my internet connection dropping for a moment. This not being an unlikely event, I should add in handling for such situations, and perhaps write to the results output in chunks, instead of all at once! So the complete list will have to wait. But, running against the beginning of the list showed there are some exciting domains still out there:&lt;br /&gt;&lt;pre&gt;Domains that seem to be available:&lt;br /&gt;&lt;br /&gt;AMusD.net&lt;br /&gt;Abelmoschus.net&lt;br /&gt;Aberdonian.net&lt;br /&gt;Abkhas.com&lt;br /&gt;Abkhas.net&lt;br /&gt;Abkhasian.com&lt;br /&gt;Abkhasian.net&lt;br /&gt;Abkhazian.net&lt;br /&gt;Abnaki.net&lt;br /&gt;Abramis.net&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;One last note you might already be asking yourself about: The AGID-4 dictionary contains proper and common nouns. I left the proper ones capitalized. It could be argued I should &lt;code&gt;lower()&lt;/code&gt; them first, but I don't &lt;i&gt;think&lt;/i&gt; one is able to buy a domain name with merely differing capitalization.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;Current code of domainspotter.py:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[EDIT]&lt;/span&gt; The code base of domainspotter has changed around a lot since I posted this. Instead of having a big block of code here that is static, check out the latest form on &lt;a href="http://launchpod.homelinux.com:81/trac/code/browser/web/domainspotter/program"&gt;my Trac site&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8959191646145980938?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8959191646145980938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8959191646145980938' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8959191646145980938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8959191646145980938'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/08/fun-with-python-domainspotter.html' title='Fun with Python: Domainspotter'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-50089072235863274</id><published>2007-08-02T20:57:00.000-07:00</published><updated>2007-08-03T12:36:09.052-07:00</updated><title type='text'>Beginner Python Debugging</title><content type='html'>While I won't go into all the details and best practices of Python debugging here (because I do not know them), &lt;a href="http://edglass.blogspot.com/"&gt;Chris Blunck&lt;/a&gt; shared a very easy and useful method with me that can be used in many situations. First, the code:&lt;br /&gt;&lt;pre&gt;import pdb&lt;br /&gt;pdb.set_trace()&lt;br /&gt;&lt;/pre&gt;That's it. All you have to do is put those two lines just before a line where, for example, an error is being thrown, or where you are not sure what the state of things is. &lt;a href="http://docs.python.org/lib/module-pdb.html"&gt;pdb&lt;/a&gt; is the "Python Debugger", appropriately enough. There are several ways to invoke and use this module, other than what I listed above. The format I gave is most useful for setting a breakpoint. When your code runs and reaches where you have placed those two lines, you enter the debugging command line. You can check variable values as they exist at the breakpoint, execute code, whatever you want to try to understand the error you are examining.&lt;br /&gt;&lt;br /&gt;An example:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; list = [1,2,3,4,5,6]&lt;br /&gt;&gt;&gt;&gt; import pdb&lt;br /&gt;&gt;&gt;&gt; pdb.set_trace()&lt;br /&gt;--Return--&lt;br /&gt;&gt; &lt;stdin&gt;(1)&lt;module&gt;()-&gt;None&lt;br /&gt;(Pdb) print list[2]&lt;br /&gt;3&lt;br /&gt;&lt;/module&gt;&lt;/stdin&gt;&lt;/pre&gt;As can be easily seen in this very simple case, once the breakpoint is reached and one enters the debugging command line, it is trivially easy to, for example, verify variable values as compared to what you were expecting them to be. If desired, you can also continue executing the code after the breakpoint by pressing "c" on the pdb command line.&lt;br /&gt;&lt;br /&gt;For details on other ways to use pdb, see the &lt;a href="http://docs.python.org/lib/module-pdb.html"&gt;official doc&lt;/a&gt;. &lt;a href="http://www.ferg.org/papers/debugging_in_python.html"&gt;This separate guide&lt;/a&gt; has very useful information for Python debugging, specifically with pdb, for beginners.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-50089072235863274?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/50089072235863274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=50089072235863274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/50089072235863274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/50089072235863274'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/08/beginner-python-debugging.html' title='Beginner Python Debugging'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1216499941386398737</id><published>2007-08-01T06:31:00.000-07:00</published><updated>2007-08-02T06:35:35.009-07:00</updated><title type='text'>An awesome xargs option and cleaning up SVN accidents</title><content type='html'>I started using a wonderfully helpful option for xargs recently, after &lt;a href="http://ian.dererum.com/"&gt;Master Ian&lt;/a&gt; showed me its use in a particularly thorny case. Before seeing the cool option, I will give the case as an example of its use:&lt;br /&gt;&lt;br /&gt;I am still learning about the best (or even proper) way to use some aspects of SVN. In this particular case, I need to take all the files in a directory that was in the repo, move them into a new directory in the same directory, add another new directory, and copy new files into that.&lt;br /&gt;&lt;br /&gt;To better explain the example, here is the structure I had in place, initially:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Directory 1 (In SVN)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;FilesetA&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;And this is what I wanted in the end:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Directory 1&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Directory1.1&lt;/li&gt;&lt;ul&gt;&lt;li&gt;FilesetA&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Directory1.2&lt;/li&gt;&lt;ul&gt;&lt;li&gt;FilesetB&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;W&lt;span style="font-size:100%;"&gt;hat I &lt;span style="font-style: italic;"&gt;should&lt;/span&gt; have done is: made the 2 new directories (1.1 and 1.2) within the first one, copied the new files into one (FilesetB), add and commit both new directories and their contents. Then I should have run &lt;code&gt;svn mv&lt;/code&gt; on the files in the top directory (FilesetA) into the second new dir&lt;/span&gt;ectory.&lt;br /&gt;&lt;br /&gt;What I actually did was: created the two new directories, simply &lt;code&gt;mv&lt;/code&gt;'ed FilesetA into one, copied in FilesetB into the other, and then &lt;code&gt;svn add&lt;/code&gt;'ed the two new directories and their contents. Then I had a problem. I still had FilesetA in Directory 1 in the repo, but not locally. So I needed to svn rm those, but I could not since they did not exist locally any more!&lt;br /&gt;&lt;br /&gt;In the end, I copied the FilesetA out into a temp directory, when up to the directory above my repository, check the entire thing out again, &lt;code&gt;svn rm&lt;/code&gt;'ed the FilesetA in Directory 1, and then needed to add FilesetA back into Directory 1.1. This was why I moved it to a temp directory. The problem was that that set had several nested directories with &lt;code&gt;.svn&lt;/code&gt; directories in them. I had to remove these before adding them into the SVN'ed directories, else mass confusion would result. So I ran:&lt;br /&gt;&lt;pre&gt;find . -type d | xargs -I % rm -rf %/.svn&lt;/pre&gt;&lt;br /&gt;This gem found all directories from the current directory down, and passed them to rm -rf. However, I could not just pipe the results and use xargs, as I needed to append "/.svn" to specify the right directories to remove. This is where &lt;span style="font-weight: bold;"&gt;-I&lt;/span&gt; comes in handy. This option replaces all instances of the string following it with the results of the first command (before the pipe). In this case the string was "%", for similarity to Python syntax, but any string could be used. The man page uses "replace-str". So in this particular case, if FilesetA included Directory 1.1.1 and 1.1.2, the command would resolve to: "rm -rf Directory1.1.1/.svn Directory1.1.2/.svn", which is precisely what was needed!&lt;br /&gt;&lt;br /&gt;For some reason, I had a hard time understanding the option from the man page, but Ian translated it to Python for me:&lt;br /&gt;&lt;pre&gt;for dir in [find . -type d]:&lt;br /&gt;  cmd = "rm -rf %s/.svn" % dir&lt;br /&gt;  os.popen(cmd)&lt;/pre&gt;This was much clearer to me. What it basically comes down to is:&lt;br /&gt;&lt;pre&gt;OPERATION1 | xargs -I replaceme ANOTHEROPERATION replaceme OTHERTHINGS&lt;/pre&gt;&lt;br /&gt;translates into&lt;br /&gt;&lt;pre&gt;ANOTHEROPERATION OPERATIO1RESULTS OTHERTHINGS&lt;/pre&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1216499941386398737?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1216499941386398737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1216499941386398737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1216499941386398737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1216499941386398737'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/08/awesome-xargs-option-and-cleaning-up.html' title='An awesome xargs option and cleaning up SVN accidents'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-9008821733031243063</id><published>2007-07-31T17:49:00.000-07:00</published><updated>2007-07-31T22:04:52.982-07:00</updated><title type='text'>Chained No More, or, How I got WoW running perfectly in linux</title><content type='html'>The single largest reason I had a Windows (XP) installation on my main home PC was to play games. Everything else I needed or wanted to do I could do just as well or better in linux. I did not try making the final switch with Wine, Cedega, and related solutions for gaming until recently, however. Windows is annoying, slow, prone to crashes, and generally unproductive. So why be stuck with it for fun?&lt;br /&gt;&lt;br /&gt;After deleting my Gordian knot of a Windows installation in a moment of rage and adding only Feisty Fawn back, I was forced to face just that question. Getting Wine installed is very simple. &lt;pre&gt;sudo apt-get install wine&lt;/pre&gt; works just fine, in fact. All you have to do after that is run &lt;code&gt;winecfg&lt;/code&gt; once, make sure OSS is set under Audio, tweak your resolution under Graphics, and that's about it. I recommend that you check the emulate a virtual desktop option, and uncheck the allow window manager to control windows option. Before I made the first change, I could not even see the Wine window when it launched.&lt;br /&gt;&lt;br /&gt;Something else to note: After installation, there will be a .wine hidden folder in your home directory. In this, there is a folder called "drive_c". This is where Wine installs programs (in "Program Files", intuitively enough).&lt;br /&gt;&lt;br /&gt;To install WoW, pop in the first CD, navigate to your CD drive, and run &lt;code&gt;wine Installer.exe&lt;/code&gt;. This will load the familiar installer, and run as normal. When it prompts for CD 2, just switch the disks and press OK and likewise until done. After install is complete, start up the game. To do that, you must navigate to where WoW.exe lives, and run it with wine. You should also pass the "--opengl" option, as using DirectX is generally problematic, and not necessary. I made myself a handy alias:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;alias wow='~/.wine/drive_c/Program\ Files/World\ of\ Warcraft/WoW.exe -opengl'&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Faster than a double click! You might be prompted to allow ActiveX controls when the Updater loads, which you should allow. (Wine installs it all for you, you just accept the option).&lt;br /&gt;&lt;br /&gt;Now, depending on a whole legion of options, such as your graphics card, driver, the alignment of the celestial spheres, etc, you may encounter more and less graphical, sound, and performance issues when you first play. In my case, sound with OSS was fine, the app ran fine, and graphics were ok. Once I got playing, however, the graphics got slower, and were quite jerky in high traffic areas. There are several tutorials on what to tweak, but I found &lt;a href="http://wowwiki.com/Linux/Wine"&gt;this one&lt;/a&gt; quite helpful. Once I performed the tweak with &lt;code&gt;regedit&lt;/code&gt;, I was getting 80-90 FPS no problem (on a GeForce 6600 GT card no less), and 45-55 FPS with all the options on the highest setting. This is better than what I got in Windows!&lt;br /&gt;&lt;br /&gt;Aside from running better, the other thing I love about running WoW in linux is that I can switch apps much faster. For example, if I have a browser open in my second monitor, all I have to do is... move my cursor over onto it. WoW does not mind, in fact does not even blink. I can immediately interact with the rest of my desktop. In Windows, I could not move my cursor out of WoW at all. I had to minimize it, then do whatever it is I wanted to do. No more chains!&lt;br /&gt;&lt;br /&gt;[EDIT]: By popular demand, a few screenshots are in order!&lt;br /&gt;&lt;br /&gt;WoW running on my Ubuntu Desktop, dual LCD setup, with fluxbox:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_75nXVfeyezs/RrASnLVPGHI/AAAAAAAAAA0/nXsJkQslT9I/s1600-h/wow-and-desktop.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_75nXVfeyezs/RrASnLVPGHI/AAAAAAAAAA0/nXsJkQslT9I/s320/wow-and-desktop.png" alt="" id="BLOGGER_PHOTO_ID_5093591642822088818" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;WoW in game shot from same system:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_75nXVfeyezs/RrASPLVPGGI/AAAAAAAAAAs/MRyj3GjIqO0/s1600-h/wowtime.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_75nXVfeyezs/RrASPLVPGGI/AAAAAAAAAAs/MRyj3GjIqO0/s320/wowtime.png" alt="" id="BLOGGER_PHOTO_ID_5093591230505228386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;These were taken with my favorite screengrabber, &lt;a href="http://docs.kde.org/stable/en/kdegraphics/ksnapshot/index.html"&gt;ksnapshot&lt;/a&gt;. The last image is of my main, &lt;a href="http://armory.worldofwarcraft.com/#character-sheet.xml?r=Shandris&amp;amp;n=Temeluchus"&gt;Temeluchus&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-9008821733031243063?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/9008821733031243063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=9008821733031243063' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/9008821733031243063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/9008821733031243063'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/07/chained-no-more-or-how-i-got-wow.html' title='Chained No More, or, How I got WoW running perfectly in linux'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_75nXVfeyezs/RrASnLVPGHI/AAAAAAAAAA0/nXsJkQslT9I/s72-c/wow-and-desktop.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2616694852516358836</id><published>2007-07-29T16:00:00.000-07:00</published><updated>2007-07-29T13:22:56.582-07:00</updated><title type='text'>The scripts are speaking to me...</title><content type='html'>&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;WARNING&lt;/span&gt;: Reading about the following program may induce long periods of time wasting and excessive enjoyment.&lt;br /&gt;&lt;br /&gt;Alright, now that that is out of the way... I started playing with a program called &lt;a href="http://www.cstr.ed.ac.uk/projects/festival/"&gt;Festival&lt;/a&gt; some time ago, but have been unable to write about it until now. I am still trying to think out how it might actually be &lt;span style="font-style: italic;"&gt;useful&lt;/span&gt; to the average linux fanatic, but it is unequivocally fun. While it is actually a very advanced linguistic program, the basic function that gives it greatness is: you give it text, it reads it to you. And not just in a Stephen Hawking sort of tone (while I love him too), but in a wide range of voices, from distinguished British gentlemen to American women.&lt;br /&gt;&lt;br /&gt;While very neat to play around with, I had a few ideas on how it might be put to more practical use in interacting with a linux system.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Alerting&lt;/span&gt;: One immediate use that came to mind is to create a script that would monitor various statistics and warn you if they reached dangerous pre-defined levels. The warning could then be sent to Festival. Having my computer warn me of something out-loud would be much more effective than having to remember to check the metric myself.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Testing/Stats&lt;/span&gt;: I think it might be quite handy to have Festival read you the levels of certain resources or the progression of certain tasks while performing testing. While testing a program, it could read out available memory at the time, or the percent completed of a task being performed. This way you could keep track of needed statistics while monitoring others at the same time, or watching the program output.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;News&lt;/span&gt;: This idea was proposed in one of the articles I read on Festival, and I think it might be quite useful. In short, you create a script to get the latest news items, likely from one or more RSS feeds you subscribe to, and send these to Festival. That way you could be read the latest news while working on other tasks.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;There is an &lt;a href="http://packages.ubuntu.com/edgy/sound/festival"&gt;Ubuntu package&lt;/a&gt; for Festival, which makes the basic install rather trivial. Source may be downloaded &lt;a href="http://www.cstr.ed.ac.uk/downloads/festival/1.95"&gt;here&lt;/a&gt;. It will compile on any *nix machine, OSX, and apparently Windows machines as well.&lt;br /&gt;&lt;br /&gt;As mentioned, it is a rather advanced program with a wide range of features I will not go into here. Some helpful sites for further information:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.xenocafe.com/tutorials/php/festival_text_to_speech/index.php"&gt;Tutorial and demo&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://linuxgazette.net/114/john.html"&gt;Ideas on use&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cstr.ed.ac.uk/projects/festival/mbrola.html"&gt;Advanced voice packages (MBROLA)&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cstr.ed.ac.uk/projects/festival/manual/"&gt;Official manual&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2616694852516358836?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2616694852516358836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2616694852516358836' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2616694852516358836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2616694852516358836'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/07/scripts-are-speaking-to-me.html' title='The scripts are speaking to me...'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3903680246069296487</id><published>2007-07-27T22:22:00.000-07:00</published><updated>2007-07-27T22:30:18.307-07:00</updated><title type='text'>Getting X display info easily</title><content type='html'>When editing my X display configuration, I sometimes want to know what resolution is actually being displayed, as compared to what I have set in xorg.conf. An easy command to do this: &lt;a href="http://www.xfree86.org/current/xdpyinfo.1.html"&gt;&lt;code&gt;xdpyinfo&lt;/code&gt;&lt;/a&gt;. This command is designed to provide X display information, just what I want!&lt;br /&gt;&lt;br /&gt;The most common things I need are resolution and DPI. Here are examples of these:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ xdpyinfo | grep resolution&lt;br /&gt;resolution:    90x88 dots per inch&lt;br /&gt;$ xdpyinfo | grep dimensions&lt;br /&gt;dimensions:    3360x1050 pixels (948x303 millimeters)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This tells me just what I need to see to confirm if what I am trying to set in the X config is manifesting or not.&lt;br /&gt;&lt;br /&gt;Of course, if you want to do it the &lt;a href="http://www.raydreams.com/docs/dpi.html"&gt;hard way&lt;/a&gt;, you can use the Pythagorean theorem, and divide  the diagonal pixel resolution of your screen ( equal to the square root of the width squared plus the height squared) by diagonal size of your screen in inches... I'll take the command.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3903680246069296487?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3903680246069296487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3903680246069296487' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3903680246069296487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3903680246069296487'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/07/getting-x-display-info-easily.html' title='Getting X display info easily'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-4562324616219495642</id><published>2007-07-27T08:37:00.001-07:00</published><updated>2007-07-27T08:43:58.795-07:00</updated><title type='text'>Find out why webpages load slowly</title><content type='html'>I came across a very helpful utility for web development today: &lt;a href="http://developer.yahoo.com/yslow/"&gt;YSlow&lt;/a&gt;. It integrates into everyone's favorite Firefox plugin, &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/1843"&gt;Firebug&lt;/a&gt;, and reports what is slowing the page the most, based on some standards for high performance sites.&lt;br /&gt;&lt;br /&gt;Once you are on the page to check, you just have to click the YSlow button (sits beside the Firebug icon), it gets the info it needs, and displays something like the following:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_75nXVfeyezs/RqoSgbVPGEI/AAAAAAAAAAc/sy6atywSVoE/s1600-h/yslow_overall.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_75nXVfeyezs/RqoSgbVPGEI/AAAAAAAAAAc/sy6atywSVoE/s320/yslow_overall.png" alt="" id="BLOGGER_PHOTO_ID_5091902676997707842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can expand each category to see details:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_75nXVfeyezs/RqoSqLVPGFI/AAAAAAAAAAk/Uzmo_7DQYh8/s1600-h/yslow_expanded.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_75nXVfeyezs/RqoSqLVPGFI/AAAAAAAAAAk/Uzmo_7DQYh8/s320/yslow_expanded.png" alt="" id="BLOGGER_PHOTO_ID_5091902844501432402" border="0" /&gt;&lt;/a&gt;Check it out!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-4562324616219495642?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/4562324616219495642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=4562324616219495642' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4562324616219495642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4562324616219495642'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/07/find-out-why-webpages-load-slowly.html' title='Find out why webpages load slowly'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_75nXVfeyezs/RqoSgbVPGEI/AAAAAAAAAAc/sy6atywSVoE/s72-c/yslow_overall.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-5679535500212488498</id><published>2007-07-07T12:38:00.001-07:00</published><updated>2007-07-07T12:47:35.100-07:00</updated><title type='text'>File renaming made simpler</title><content type='html'>Some people have difficulty renaming lots of files at once on the command line. I used to experience this issue a lot, especially since "mv" was the command recommended. While I can appreciate why mv makes sense for renaming, it still was not intuitive for me. The original file is, in a sense, gone. Renaming  a file can be seen as making a new file.&lt;br /&gt;&lt;br /&gt;However, there is another command, nearly as available, which can rename things quite easily. You will never guess its name. Something simple, and descriptive of the action of renaming files...: rename! It syntax is easy:&lt;br /&gt;&lt;pre&gt;rename 'PERL REGEX' FILELIST&lt;/pre&gt;The FILELIST can use regex as well. So if I wanted to renamed all of my Mahler "Symphony No. 1" files (they all started with "_- Mahler"), I would simply run this in the folder the files were in:&lt;br /&gt;&lt;pre&gt;rename 's/^\_\-\ Mahler/Mahler/' *.mp3&lt;/pre&gt;&lt;i&gt;Voilà!&lt;/i&gt; Now all my file names have been fixed in one fell swoop. An explanation of &lt;a href="http://en.wikipedia.org/wiki/Regular_expression"&gt;regex&lt;/a&gt; is not something I want or can do right now, but internet tutorials and articles on it are legion.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-5679535500212488498?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/5679535500212488498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=5679535500212488498' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5679535500212488498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5679535500212488498'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/07/file-renaming-made-simpler.html' title='File renaming made simpler'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2612435674340204592</id><published>2007-07-02T20:22:00.000-07:00</published><updated>2007-10-08T21:26:01.155-07:00</updated><title type='text'>Generate Random Passwords on the Command Line</title><content type='html'>Not too infrequently, I have the need to generate random strings on the command line, mostly for password creation. Usually, I go to a password generation site. However, this is slow, requires I have an internet connection at the time, and may be insecure as the site can record the password and my IP.&lt;br /&gt;&lt;br /&gt;A far simpler way would be to have a script to do the generating for me. There are several such scripts for BASH floating around on the internet. But most of them are rather simple and do not let you easily select how long of a string you want. The following works nicely:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;###################################&lt;br /&gt;# Created on July 2, 2007 by Samuel Huckins&lt;br /&gt;# Adopted from the basic script floating&lt;br /&gt;# around the internet.&lt;br /&gt;#&lt;br /&gt;# Generates random password. Of length equal to number given after&lt;br /&gt;# command, otherwise 10.&lt;br /&gt;#&lt;br /&gt;# Uses /dev/urandom and not /dev/random since the latter&lt;br /&gt;# can block without enough hardware entropy.&lt;br /&gt;###################################&lt;br /&gt;#&lt;br /&gt;# Checks to see if user entered something after invocation.&lt;br /&gt;# If so, use that to generate right amount of random bytes,&lt;br /&gt;# and display that number.&lt;br /&gt;# Only works up to 25 characters, not sure why yet.&lt;br /&gt;if [ -n "$1" ] ; then&lt;br /&gt;     let "RANDOMTOGRAB=$1+20"&lt;br /&gt;     echo `head -c $RANDOMTOGRAB /dev/urandom |uuencode -m - |tail -n 2 |head -c $1`&lt;br /&gt;# If they entered nothing, give them a 10 character random string.&lt;br /&gt;elif [ -z "$1" ] ; then&lt;br /&gt;     echo `head -c 20 /dev/urandom |uuencode -m - |tail -n 2|head -c 10`&lt;br /&gt;exit 0&lt;br /&gt;fi&lt;br /&gt;&lt;/pre&gt;I am not sure why strings longer than 25 characters are not working just yet. Passing a larger number displays a far shorter string than requested, and one which ends in several consecutive equal signs.&lt;br /&gt;&lt;br /&gt;I need to solve this and improve its performance, but this basic script still work nicely for most tasks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[EDIT, 10/09/07]:&lt;/span&gt; I just noticed that I forgot to mention originally that you will need to install uuencode. On Ubuntu, the package for this will not be obvious, since searching for uuencode in aptitude will not turn it up. You need to install &lt;a href="http://packages.ubuntu.com/dapper/utils/sharutils"&gt;sharutils&lt;/a&gt;. This includes uudecode and a few others in addition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2612435674340204592?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2612435674340204592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2612435674340204592' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2612435674340204592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2612435674340204592'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/07/generate-random-passwords-on-command.html' title='Generate Random Passwords on the Command Line'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1706661189421950277</id><published>2007-07-02T11:08:00.000-07:00</published><updated>2007-07-02T11:51:47.153-07:00</updated><title type='text'>Use of split in VIM</title><content type='html'>split is a super handy command to use in VIM (and vi, for those so inclined). It allows you to open a second (and third, and fourth, as many as you can fit!)  window in your vim instance. These windows are not separate vim instances, but buffers within the original instance. They make it very easy to compare two files, a task which is common, but rather difficult on the command line with most tools.  You can also move between them easily, which makes copying and pasting simple.&lt;br /&gt;&lt;br /&gt;Ok, so how to do it. It is actually quite simple. If you open one file in vim, simply run ":split /second/file/to/open". This will split the screen horizontally and open the second file. You can do the same with "vsplit" to split vertically. To switch between them, press CTRL+w and an arrow key in the direction of the window you want to move into. Same for moving back.&lt;br /&gt;&lt;br /&gt;If you simply run "split" a second window will open with the original file in it as well. Once it is open, you can move into it, and run ":e /second/file/to/open", and the second file will open. You can close the split by the usual ":q" or ":wq" to save and close the file, thus closing the split window.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1706661189421950277?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1706661189421950277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1706661189421950277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1706661189421950277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1706661189421950277'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/07/use-of-split-in-vim.html' title='Use of split in VIM'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-5211217315614868665</id><published>2007-06-30T21:12:00.000-07:00</published><updated>2007-07-01T14:55:47.100-07:00</updated><title type='text'>If you find you lack the ability to sudo...</title><content type='html'>While trying to setup Subversion, I needed to add myself to the subversion group. What I ran was "sudo usermod -G subversion sam". That was bad. Not, oh there is no more milk kind of bad. Bad like you just ran over a family member sort of bad. A section of the usermod man page will explain:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;  -G &lt;i&gt;groups&lt;/i&gt;    Supplementary groups given by name or number in a comma-separated list with no whitespace. The &lt;i&gt;user &lt;/i&gt;will be removed from any groups to which they currently belong that are not included in &lt;i&gt;groups&lt;/i&gt;.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Notice that second sentence? I didn't. I continued on my merry way until I needed to sudo. I ran sudo, and nothing happened. No error. Nothing. Being the only user on the system, I frantically tried to reverse the situation, since I would be able to do little of import without this. In the end, I found &lt;a href="http://www.arsgeek.com/?p=1761"&gt;a related tutorial&lt;/a&gt; that let me fix it. The steps:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Restart the computer, and be at the console.&lt;/li&gt;&lt;li&gt;Press Esc when GRUB comes up.&lt;/li&gt;&lt;li&gt;Hover over the latest kernel (what you would normally boot) and press e (to edit it).&lt;/li&gt;&lt;li&gt;Go down to the line starting with "kernel /boot/vmlinuz" and press e.&lt;/li&gt;&lt;li&gt;At the end of that line, press space and then type "single".&lt;/li&gt;&lt;li&gt;Press b to boot into that kernel.&lt;/li&gt;&lt;li&gt;Once the system loads, you will be in single user mode, as root.&lt;/li&gt;&lt;/ul&gt;Of course, as root, you can change your password, your normal user's password, or (as in my case), add yourself back to the admin group.&lt;br /&gt;&lt;br /&gt;After you login, you will be able to sudo, but you may notice some other tasks not working. In my case, I was unable to play any music or video files. I was baffled. I checked the permissions, they seemed fine. It turns out there are a lot of groups your user is put in by default, e.g. audio, cdrom, etc, which let you do things like that. If you use Gnome, go to System, Administration, Users and Groups. Find your user, view Properties, and then User Privileges. Check all those boxes, and all should be fine. Alternatively, you could make a new user and run id on it, comparing their groups to yours. This would work on default installs, without any custom user creation scripts.&lt;br /&gt;&lt;br /&gt;As a side note, this method creates an extreme security flaw in certain systems. It is possible to &lt;a href="http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_disable_all_interactive_editing_control_for_GRUB_menu"&gt;turn off interactive GRUB editing&lt;/a&gt; if desired. For personal systems without sensitive data, it is best to leave it on, for eventualities like the one I encountered.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-5211217315614868665?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/5211217315614868665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=5211217315614868665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5211217315614868665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5211217315614868665'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/06/if-you-find-you-lack-ability-to-sudo.html' title='If you find you lack the ability to sudo...'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-7789146584894793466</id><published>2007-06-30T19:17:00.000-07:00</published><updated>2007-06-30T22:23:06.613-07:00</updated><title type='text'>Personal Settings in SVN Increases Happiness by 125%!</title><content type='html'>This may sound a little silly, but when I first started using aliases in Linux (and loving their potential utility), I was put off by the realization that once I got used to using them, I would end up being on another machine without them. This annoyance made me resistant to using them for some time. Eventually, I started using them so much, that I copied my .bashrc (and .vimrc and other such files) to all the remote servers I would need to interact with regularly.&lt;br /&gt;&lt;br /&gt;This helped quite a bit, but it introduced another level of annoyance. Whenever I made a change, improved a command, added a new alias, I would have to add that to all the copies I had floating around. Dumb. Dumb and annoying.&lt;br /&gt;&lt;br /&gt;So, I thought, why not set up a repo? While I use SVN regularly, I had never setup one on my own before, so it seemed like a win/win situation. In sum, the following is what I did to get it all to work.&lt;br /&gt;&lt;br /&gt;The first thing to decide is how the repository will be accessed, either via SSH or Apache. The use of Apache is very common, and there are many tutorials on how to do it (like &lt;a href="http://www.howtoforge.com/apache_subversion_repository"&gt;this one&lt;/a&gt;). I chose not to use Apache for 2 reasons: I did not want to have to be concerned with securing Apache on the server in question unless necessary, and secondly any computer on which I would want to access the repositories would have SSH. If you want to be able to see your repo in a browser, use Apache (or &lt;a href="http://trac.edgewall.org/"&gt;Trac&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Initial steps:&lt;br /&gt;&lt;pre&gt;sudo apt-get install subversion # As of now on Feisty, this installs 1.4.3&lt;br /&gt;sudo mkdir /home/svn/configfiles #For the repo, easy place to remember&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can replace "configfiles" with whatever you want to call the repo. For this case, it does not matter a lot, since I will be checking out the files in many various places, not all in one directory.&lt;br /&gt;&lt;br /&gt;Now for permissions and such:&lt;br /&gt;&lt;pre&gt;sudo addgroup subversion&lt;br /&gt;sudo usermod -a -G subversion YOURUSER&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the real magic:&lt;br /&gt;&lt;pre&gt;sudo svnadmin create /home/svn/configfiles/&lt;br /&gt;sudo chown -R subversion configfiles # make sure perms are right after repo creation&lt;br /&gt;sudo chmod g+rws configfiles # Ditto&lt;br /&gt;sudo svn import /your/initial/files file:///home/svn/configfiles/repo -m "initial import"&lt;br /&gt;sudo apt-get install xinetd&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now run &lt;pre&gt;sudo vim /etc/xinetd.conf&lt;/pre&gt; and add:&lt;br /&gt;&lt;pre&gt;defaults&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;service svn&lt;br /&gt;{&lt;br /&gt;port = 3690&lt;br /&gt;socket_type = stream&lt;br /&gt;protocol = tcp&lt;br /&gt;wait = no&lt;br /&gt;user = www-data&lt;br /&gt;server = /usr/bin/svnserve&lt;br /&gt;server_args = -i -r /home/svn&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now go into the conf dir in your repo and &lt;pre&gt;sudo vim svnserve.conf&lt;/pre&gt; and edit what you like. I uncommented "anon-access = read" and "password-db = passwd".&lt;br /&gt;&lt;br /&gt;You are done! The test: "svn co svn+ssh://SERVERWITHREPO/home/svn/configfiles". You will be prompted for as password 3 times, do not worry. If all is well, you should see "Checked out revision 1.", and the file(s) in the repo will not be in the dir where you ran the above command.&lt;br /&gt;&lt;br /&gt;For more info, see &lt;a href="http://svnbook.red-bean.com/en/1.2/svn-book.html"&gt;the SVN Book&lt;/a&gt;. Thanks to &lt;a href="http://www.urbanpuddle.com/articles/2006/05/03/setting-up-subversion-on-ubuntu-dapper-drake"&gt;this guide&lt;/a&gt; for getting me through the main steps.&lt;br /&gt;&lt;br /&gt;[NOTE:] After some experimenting, I ended up creating the repo like this:&lt;br /&gt;&lt;pre&gt;sudo svnadmin create /home/svn/configfiles/trunk&lt;br /&gt;sudo svn import ~/.bashrc file:///home/svn/configfiles/trunk/bashrc -m "Initial import of .bashrc"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then I checked it out via:&lt;br /&gt;&lt;pre&gt;svn co svn+ssh://SERVERWITHREPO/home/svn/configfiles/trunk ~/DIR/TO/CHECKOUT/IN&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Also, the way to delete a repo completely (as I did during testing) is simply to remove the entire dir (e.g. "sudo rm -rf /home/svn").&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-7789146584894793466?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/7789146584894793466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=7789146584894793466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7789146584894793466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7789146584894793466'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/06/personal-settings-in-svn-increases.html' title='Personal Settings in SVN Increases Happiness by 125%!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3163692063936512474</id><published>2007-06-29T12:21:00.000-07:00</published><updated>2007-06-30T17:05:16.697-07:00</updated><title type='text'>Exporting a MySQL DB to .csv</title><content type='html'>I thought the operation would be simple. Short, no casualties, 100% chance of success. No such luck.&lt;br /&gt;&lt;br /&gt;I needed to export the data of a MySQL database into a .csv format file. I did not want it in a huge XML file, and I did not need the actual .sql statements. A common need, one would think. The command to use is:&lt;br /&gt;&lt;pre&gt;mysqldump -u root --fields-terminated-by=, --tab=/tmp --tables DATABASE&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, this might seem simple. But what I tried first was having the " &gt; dump.sql" file at the end, and had the path after "--tab" as my home directory. Now the first choice was fine, as you can separate where you send the data files versus where you send the table syntax. But, you will get an error:&lt;br /&gt;&lt;pre&gt;mysqldump: Got error: 1: Can't create/write to file 'dumpdir/tablename.txt' (Errcode: 13) when executing 'SELECT INTO OUTFILE'&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/upgrading-to-arch.html"&gt;A post&lt;/a&gt; on the MySQL forums clued me in:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;It's because the mysql user doesn't have the right permissions to write to that dir.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;a simple chmod should fix the problem&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;So that led me to make a dir and chown it to the mysql user, which worked. However, if you write it to /tmp, you do not need to chown. So this version writes all the files to one dir without permission woes:&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;pre&gt;mysqldump -u root --fields-terminated-by=, --tab=/tmp --tables DATABASE&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3163692063936512474?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3163692063936512474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3163692063936512474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3163692063936512474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3163692063936512474'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/06/exporting-mysql-db-to-csv.html' title='Exporting a MySQL DB to .csv'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-7655842205045469194</id><published>2007-06-29T10:45:00.000-07:00</published><updated>2007-06-30T18:48:51.127-07:00</updated><title type='text'>New and Helpful Aliases</title><content type='html'>Some aliases I have added of late and found to be useful:&lt;br /&gt;&lt;br /&gt;Displays a calendar and then your locale's 12-hour clock time:&lt;br /&gt;&lt;pre&gt;alias now='cal;date +%r'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;For those who often like to edit X display config:&lt;br /&gt;&lt;pre&gt;alias editxorg='sudo vim /etc/X11/xorg.conf'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;For those use window managers without a shutdown button:&lt;br /&gt;&lt;pre&gt;alias turnoff='sudo shutdown -h now'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Does all you need to do for updating:&lt;br /&gt;&lt;pre&gt;alias updateme='sudo aptitude update &amp;&amp;amp; sudo aptitude upgrade &amp;&amp;amp; sudo aptitude&lt;br /&gt;dist-upgrade &amp;&amp;amp; sudo aptitude autoclean'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I am also working on something that I hope to works as follows. "help CMD" will run "CMD -h" or "--help", checking the results. If that fails, it runs "info CMD", then "man CMD". The idea being that you can use one command to display information on a command, and it will get you to the first that has something to show. This would be helpful when one runs into programs that do not handle -h, or only have a man page, etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-7655842205045469194?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/7655842205045469194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=7655842205045469194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7655842205045469194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7655842205045469194'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/06/new-and-helpful-aliases.html' title='New and Helpful Aliases'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-749418002320952264</id><published>2007-06-29T09:30:00.000-07:00</published><updated>2007-07-03T11:46:40.911-07:00</updated><title type='text'>Summary Execution</title><content type='html'>&lt;div style="text-align: justify;"&gt;I find myself coming across strange files on occasion. Crowded folders, shady thrice nested system dirs and the like are filled with them. Usually system files, files whose nature and purpose I might not know. To get to know such individuals, there are several built-in tools I might employ. I could run &lt;span style="font-style: italic;"&gt;file&lt;/span&gt; on them, &lt;span style="font-style: italic;"&gt;cat&lt;/span&gt; them, &lt;span style="font-style: italic;"&gt;tail&lt;/span&gt; them, &lt;span style="font-style: italic;"&gt;head&lt;/span&gt; them, run &lt;span style="font-style: italic;"&gt;ls -lh&lt;/span&gt; in the folder, et al. But this takes too many steps. I want &lt;span style="font-weight: bold;"&gt;one&lt;/span&gt; command. And if I can get what I want in 5 steps, I can get it in one. It is the Linux way.&lt;br /&gt;&lt;br /&gt;Thus I created the "summarize" function. It's a simple script that basically just grabs data using the methods I listed above, and formats them into an easy-to-read summary. Right now, it consists of:&lt;br /&gt;&lt;pre&gt;#!/bin/bash&lt;br /&gt;# A command to provide lots of&lt;br /&gt;# info about a file at glance!&lt;br /&gt;FILE=`file $1`&lt;br /&gt;echo "$FILE has `wc -l $1 | cut -d" " -f1` lines." &amp;&amp;amp;&lt;br /&gt;echo -e "\e[1;34mOwned by: \e[0m`ls -l $1 | cut -d" " -f3`" &amp;&amp;amp;&lt;br /&gt;echo -e "\e[1;34mGroup: \e[0m`ls -l $1 | cut -d" " -f4`" &amp;&amp;amp;&lt;br /&gt;echo -e "\e[1;34mSize: \e[0m`ls -lh $1 | cut -d" " -f5`" &amp;&amp;amp;&lt;br /&gt;echo "**********************************"&lt;br /&gt;echo -e "\e[1;34mTop bits: \n \e[0m" &amp;&amp;amp;amp;amp;amp;amp;amp;amp;amp;&lt;br /&gt;head -n 5 $1 &amp;&amp;amp;&lt;br /&gt;echo "" &amp;&amp;amp;&lt;br /&gt;echo -e "\e[1;34mBottom bits: \n \e[0m" &amp;&amp;amp;&lt;br /&gt;tail -n 5 $1&lt;br /&gt;exit 0&lt;br /&gt;&lt;/pre&gt;One handy thing I learned while writing this was how to display text in chosen colors in bash, using the "echo -e" syntax. I find this makes it easier for my eye to quickly move to different fields.&lt;br /&gt;&lt;br /&gt;You can also add something like this to your .bashrc:&lt;br /&gt;&lt;pre&gt;alias summarize='/location/of/script/summarizer.sh'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Example output on a test .txt file (screenshot to show colors. Your base text color will be different):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_75nXVfeyezs/RoUKAKHFWhI/AAAAAAAAAAM/uRUI6GpXhd4/s1600-h/summarize_snapshot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_75nXVfeyezs/RoUKAKHFWhI/AAAAAAAAAAM/uRUI6GpXhd4/s320/summarize_snapshot.png" alt="" id="BLOGGER_PHOTO_ID_5081478752387815954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;[EDIT, 07/03/07]: It is also useful to add contextual lines to the head and tail output. This can be done via:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;head -n 5 $1 | nl -b a&lt;br /&gt;nl -b a $1 | tail -n 5&lt;/pre&gt;This prints the first and last five lines, numbered according to the number of lines in the entire file. I find this makes it much easier to immediately see how long the file is. (Additional note: without the "-b a" option, nl will print lines for each textual line, skipping blank ones. I myself would rather the blank lines also be included, as this is standard practice.)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-749418002320952264?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/749418002320952264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=749418002320952264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/749418002320952264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/749418002320952264'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/04/summary-execution.html' title='Summary Execution'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_75nXVfeyezs/RoUKAKHFWhI/AAAAAAAAAAM/uRUI6GpXhd4/s72-c/summarize_snapshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-9036157385778821224</id><published>2007-04-17T22:23:00.000-07:00</published><updated>2007-04-19T12:20:18.851-07:00</updated><title type='text'>Awesome App: Icepodder</title><content type='html'>&lt;div style="text-align: justify;"&gt;I have started listening to a lot of podcasts lately. I started with just the &lt;a href="http://www.linuxactionshow.com/"&gt;Linux Action Show&lt;/a&gt;. Then it spread, like an addiction. Now I keep up with 6-15 a week, some even in video! I find they are a great way to fill my morning walk to work with new information about all the latest releases, vulnerabilities, and just general linux/open source/tech stuff. In addition, they are, on the whole, far more amusing than tech news sites.&lt;br /&gt;&lt;br /&gt;General praise for podcasts aside: The only issue really is how to track them, get the latest episodes, etc. I started with iTunes, but this very very quickly became an annoyance, since I did not want to have to boot into Windows daily, just for podcasts. So I looked around for a Linux podcast client. And, what a surprise, I quickly found a great open source alternative: Icepodder.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://icepodder.fryingoverajungle.net/"&gt;Icepodder&lt;/a&gt; is:&lt;br /&gt;&lt;blockquote&gt;[...] a podcatcher (RSS client) for Linux conceived as a replacement for CastPodder.  IcePodder is written in python, and requires python 2.4 or later, and pyGTK.  The goal of this project is to provide Linux users with a dedicated client to download podcasts, with an emphasis on reliability and stability.&lt;br /&gt;&lt;/blockquote&gt;That sums it up nicely. There was a .deb, so install was a breeze. I started it, it looked nice, all was well. Then for the fun. I opened my handy dandy list of &lt;a href="http://www.thelinuxlink.net/"&gt;Linux podcasts&lt;/a&gt;, clicked Add New podcast in Icepodder, and dragged in the RSS URL of the feed I wanted. In a flash, it had all the information about the show and all the latest episodes, with the very latest selected to be downloaded. Much faster feed loading than iTunes. Of course, downloading can still be slow, but that is limited by your connection speed and the remote server.&lt;br /&gt;&lt;br /&gt;Icepodder has some other neat features as well. It can keep running and checking for content in the background. You can configure it to keep or delete content based on its age. The list of features goes on. Check it out.&lt;br /&gt;&lt;br /&gt;[EDIT, Thu, Apr 19, 2007  03:19:09]: I found after a while that Icepodder was indeed great for doing all sorts of things with podcasts, but that it has no facility for copying/syncing them to my iPod itself, which was the real goal for me. Perhaps a different integrated app would be better for this.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-9036157385778821224?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/9036157385778821224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=9036157385778821224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/9036157385778821224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/9036157385778821224'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/04/awesome-app-icepodder.html' title='Awesome App: Icepodder'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8058488084314539414</id><published>2007-04-14T18:29:00.000-07:00</published><updated>2007-06-30T18:51:44.561-07:00</updated><title type='text'>Putting Windows in its place: Virtual Machines</title><content type='html'>I was getting tired of having to reboot my machine and go into my Windows XP install to run certain programs. Data was not a problem any more, since I can read from and write to NTFS drives from linux now. But running certain programs only available for Windows came down to using Wine, or rebooting. Wine is ok for some things, but it has its problems still, especially for demanding programs.&lt;br /&gt;&lt;br /&gt;A better solution I am trying: turn my Windows installation into a virtual machine, and run that from linux. A basic howto on this process can be &lt;a href="http://www.howtoforge.com/vmware_converter_windows_linux"&gt;found here&lt;/a&gt;. A guide to install vmware server on Ubuntu can be &lt;a href="http://www.howtoforge.com/ubuntu_vmware_server"&gt;found here&lt;/a&gt;. Installing VMware server is not as simple as one might wish in Ubuntu. Following the above instructions, all will go well, until you try to launch. You may get an error like:&lt;br /&gt;&lt;pre&gt;/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0:&lt;br /&gt;no version information available (required by /usr/lib/libcairo.so.2)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I found a fix for this:&lt;br /&gt;&lt;pre&gt;cd /usr/lib/vmware/lib&lt;br /&gt;sudo mv libpng12.so.0 libpng12.so.0.bak&lt;br /&gt;sudo ln -s /usr/lib/libpng.so libpng12.so.0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;However, that led this to happen when I tried to launch vmware:&lt;br /&gt;&lt;pre&gt;/usr/lib/vmware/bin/vmware: error while loading shared libraries: libsexy.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;because Edgy had upgraded to libsexy.so.2.&lt;br /&gt;&lt;br /&gt;However! I discovered at this point that I did not need to run "vmware". I needed to install and run the VMware Server Client for Linux. To do this, download the binary tar.gz called "VMware-server-linux-client-1.0.0-CURRENTBUILD" from the VMware downloads page. Then go to where you downloaded the file, and extract it to /tmp. Lastly do:&lt;br /&gt;&lt;pre&gt;cd vmware-server-distrib&lt;br /&gt;./vmware-install.pl&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Follow the prompts, use the default values. Once it successfully installs, run it by "vmware-server-console". I ran it, and got this error:&lt;br /&gt;&lt;pre&gt;vmware-server-console&lt;br /&gt;/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But the console still opened fine. I selected Local Host, and imported the VM I had made of my Windows machine. For more details on importing, &lt;a href="http://www.howtoforge.com/import_vmware_images"&gt;see this&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;An &lt;a href="http://ubuntuforums.org/showthread.php?t=183209"&gt;alternate guide&lt;/a&gt; on the whole thing.&lt;br /&gt;&lt;br /&gt;An important note: When you run your Windows VM, you will see and be able to run everything like normal if you were logged into Windows. You will also be able to change and add files. However, making changes here will not result in the changes persisting when you actually log into Windows. They are completely separate. This is a difficult problem, for which I have not found a solution yet.&lt;br /&gt;&lt;br /&gt;[EDIT, Thu, Apr 19, 2007  03:16:27]: One additional problem I had that others may run into. When I made the VM from my Windows install, I did not think how large the virtual disk for it would be. It was as large as my C:\ drive, of course, ~70GB. The problem is, although I can see this from linux on the NTFS drive I made it on, I would need to copy it to a non-NTFS drive to be able to write to it, because of its permissions. In other words, be conscious of where you put the image initially with an eye to the final use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8058488084314539414?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8058488084314539414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8058488084314539414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8058488084314539414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8058488084314539414'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/04/putting-windows-in-its-place-virtual.html' title='Putting Windows in its place: Virtual Machines'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1160169265046778318</id><published>2007-04-14T17:56:00.000-07:00</published><updated>2007-04-14T18:33:58.657-07:00</updated><title type='text'>Operatic Experimentation</title><content type='html'>I love Firefox. I have used it for years, to the exclusion of other browsers. But, of late, I have been getting a little tired of its speed, or lack thereof. Initial loading, tabbing, and other features, were getting sluggish. I was tired of my browser being slower at opening things than my OS. I was tired of restarting the app just to use a plug-in. What is this, Windows?&lt;br /&gt;&lt;br /&gt;So I decided to try Opera, as I had heard of it being like Firefox in many ways, but faster and with additional features. I have spent much less time with it than Firefox, but I will say that so far, it has been great. It is faster, it has more useful features, and it is more intuitive.&lt;br /&gt;&lt;br /&gt;Things I have loved from the start:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Changing skins, adding skins, and adding widgets can all be done from sidebars or windows, not new sites. Also, they do not require a restart to use. This has been great. I HATE having to restart Firefox when I have 500 tabs open, just to start using a new plug-in or theme.&lt;/li&gt;&lt;li&gt;There are lots of neat display options and informative displays. The Info sidebar, for example, or the advanced loading display.&lt;/li&gt;&lt;li&gt;Built-in BitTorrent support, no external app needed.&lt;/li&gt;&lt;li&gt;You can get the tab bar to wrap to multiple lines. This is great if, like me, you like to have 500.8 million tabs open, and hate having to scroll right and left to get to them all.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It's faster. Did I mention that?&lt;/li&gt;&lt;/ul&gt;So, minimally, give it a try. It's neat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1160169265046778318?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1160169265046778318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1160169265046778318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1160169265046778318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1160169265046778318'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/04/operatic-experimentation.html' title='Operatic Experimentation'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-4409210562385134082</id><published>2007-04-08T09:08:00.000-07:00</published><updated>2007-06-30T18:52:46.053-07:00</updated><title type='text'>System Tray in Flux and fbpager Config</title><content type='html'>&lt;div style="text-align: justify;"&gt;I needed a way to display system tray icons for applications like Gaim and Tomboy in fluxbox. One way that was easy to implement and works well is a dockapp called &lt;a href="http://icculus.org/openbox/2/docker/"&gt;docker&lt;/a&gt;. After installing it (it's in the repos), just add "docker -wmaker" to your .fluxbox/startup file. Then when you, for instance, launch Gaim, the Gaim system tray icon will appear as a 24x24 (configurable size) icon in the docker box. Check docker --help for more options.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fluxbox.org/fbpager/"&gt;fbpager&lt;/a&gt; is a handy app for displaying what desktops you have windows open in, and allow you to go to them quickly. Its default display layout is a bit ugly, though. There is an easy way to configure the way it appears, however. First, make a file ~/.fluxbox/fbpager.conf, and put this in it:&lt;br /&gt;&lt;pre&gt;fbpager.workspace.width: 32&lt;br /&gt;fbpager.workspace.height: 32&lt;br /&gt;fbpager.workspacesPerRow: 2&lt;br /&gt;fbpager.alpha: 64&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then add this to ~/.fluxbox/startup:&lt;br /&gt;&lt;pre&gt;fbpager -rc ~/.fluxbox/fbpager.conf &amp;amp;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This will run fbpager, and look at the specified config file. You can play with the values to your liking. See the linked home page for more options.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-4409210562385134082?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/4409210562385134082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=4409210562385134082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4409210562385134082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4409210562385134082'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/04/system-tray-in-flux-and-fbpager-config.html' title='System Tray in Flux and fbpager Config'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3203567431629699353</id><published>2007-04-07T08:31:00.000-07:00</published><updated>2007-04-07T08:47:21.042-07:00</updated><title type='text'>NTFS Read AND Write Access in Ubuntu, is Easy</title><content type='html'>Write access to NTFS type HDDs was a little sketchy for some time in linux. This is a big problem for people like me that dual boot linux and Windows. Now, it is not only reliable, but extremely easy. &lt;a href="http://ubuntuforums.org/showthread.php?t=217009"&gt;This howto&lt;/a&gt; has all the steps you will need to take. Basically, I just added a line to my sources list, updated my system, ran the config, checked a box in the interface, and that was it.&lt;br /&gt;&lt;br /&gt;One extra step I had to take was to boot into Windows, shut down fully, then go into Ubuntu and run the config. This was necessitated because my last Windows shutdown was not clean. This was caused by &lt;a href="http://support.microsoft.com/kb/935448"&gt;yet another ridiculous Windows error&lt;/a&gt; that impelled me to shut down via the power button instead of the ever-cheerful Start button.&lt;br /&gt;&lt;br /&gt;After taking such simple steps, I decided to test write access out. I decided the best choice was to make a file on the Desktop of my Windows user called "Linux_Made_This.txt" containing:&lt;br /&gt;"HAHAHAHHA&lt;br /&gt;You have no chance to survive make your time."&lt;br /&gt;&lt;br /&gt;Of course, you may find your own way to test as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3203567431629699353?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3203567431629699353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3203567431629699353' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3203567431629699353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3203567431629699353'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/04/ntfs-read-and-write-access-in-ubuntu-is.html' title='NTFS Read AND Write Access in Ubuntu, is Easy'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-1583422545600294206</id><published>2007-04-01T20:15:00.000-07:00</published><updated>2007-04-01T20:21:33.983-07:00</updated><title type='text'>Utility Assistance: dos2unix</title><content type='html'>&lt;div style="text-align: justify;"&gt;I had known of the utility "dos2unix" for some time, but I never had occasion to use it until recently. I have been working on a script to assist in system administration, and had put in Yahoo! Briefcase so that I could access the single file on various systems. In the process, it got Windows formatting added in (open such a file in vim, for example, and you will see "^M" characters peppering each line). This causes no end of errors when the script is run on a linux system.&lt;br /&gt;&lt;br /&gt;So, I thought I would try the dos2unix command I had read about. Command not found... sudo apt-get? Nope. Not in the repos. It turns out that the utility is called "tofrodos" (that's right, no "m") in the repos, with the added explanatory note "alias tofromdos". So I installed this, and tried to run "tofromdos". Not found.&lt;br /&gt;&lt;br /&gt;After some searching, I found that once tofrodos is installed, you can run "dos2unix [filename]", and it runs as you would expect. I am still not sure why, but at least the utility is useable.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-1583422545600294206?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/1583422545600294206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=1583422545600294206' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1583422545600294206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/1583422545600294206'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/04/utility-assistance-dos2unix.html' title='Utility Assistance: dos2unix'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-4776461479463869342</id><published>2007-03-31T08:58:00.000-07:00</published><updated>2007-06-30T18:53:42.386-07:00</updated><title type='text'>Finding the time...</title><content type='html'>&lt;div style="text-align: justify;"&gt;After discovering that the clocks on several of the servers I work with now were out of sync, I decided to check my own system's accuracy. The simple command "ntpdate [server]" (on Ubuntu by default) will sync your clock with whatever server you select. "ntp.ubuntu.com" or any of the North American NTP pool servers (e.g., 0.north-america.pool.ntp.org) will work fine.&lt;br /&gt;&lt;br /&gt;However, before you think of the clever idea of adding this command to a cron job or startup script, know that there is a better way: ntpd. This is a daemon that is designed to bring your clock in sync with time from the atomic clock time servers optimally. It adjusts the time to a synchronized state in small increments so as not to harm programs that rely on a regular passage of time, and so that your logs don't appear to jump. It works very well, and keeps your clock as accurate as possible all the time.&lt;br /&gt;&lt;br /&gt;One catch: ntpd is not installed on Ubuntu by default, as they did not want any network listening apps installed on the desktop version by default. And good for them to improve security. The problem is that ntpd will not be found in the repos. It goes under the guises "ntp-simple" and "ntp-refclock". The latter is really only when you want to set up your own time server, and have the means to do so. The former is what should be used to keep "simple" (single, personal) systems synced. So install that.&lt;br /&gt;&lt;br /&gt;There are a few more steps left. Run ntpdate to get the current time:&lt;br /&gt;&lt;pre&gt;sudo ntpdate ntp.ubuntu.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then edit /etc/ntp.conf:&lt;br /&gt;&lt;pre&gt;sudo vim /etc/ntp.conf&lt;/pre&gt;&lt;br /&gt;Add the lines after these 2 (should be there already):&lt;br /&gt;&lt;pre&gt;# You do need to talk to an NTP server or two (or three).&lt;br /&gt;server ntp.ubuntu.com&lt;br /&gt;server 0.north-america.pool.ntp.org&lt;br /&gt;server 1.north-america.pool.ntp.org&lt;br /&gt;server 2.north-america.pool.ntp.org&lt;br /&gt;server 3.north-america.pool.ntp.org&lt;/pre&gt;&lt;br /&gt;Lastly start up the ntp server:&lt;br /&gt;&lt;pre&gt;sudo /etc/init.d/ntp-server start&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To see the results:&lt;br /&gt;&lt;pre&gt;sudo ntpd -p&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-4776461479463869342?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/4776461479463869342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=4776461479463869342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4776461479463869342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4776461479463869342'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/finding-time.html' title='Finding the time...'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2480559337586107988</id><published>2007-03-30T06:49:00.000-07:00</published><updated>2007-03-30T07:01:56.280-07:00</updated><title type='text'>Neat Firefox Shortcut and More Handy Display Config Candy</title><content type='html'>&lt;div style="text-align: justify;"&gt;I accidentally discovered an awesome shortcut in Firefox today. I wanted to switch to a workspace in fluxbox, but my sausage finger excuses for fingers pressed Alt+4, not F4, of their own volition. Serendipitously, Firefox had focus at the moment, and I was surprised to see my current tab switch... With confusion and adumbrated glee, I tried my mistake again. It turns out that Alt+NUMBER switches to that tab in the current Firefox window, handily similar to workspace switching. It is a great shortcut.&lt;br /&gt;&lt;br /&gt;On an unrelated note, I was still having problems getting my fonts to look how I wanted in fluxbox. A friend directed me to try running "gnome-settings-daemon" (add "gnome-settings-daemon &amp;amp;" somewhere in .fluxbox/startup) at boot. Upon doing this, my fonts automagically looked as they should. I don't know what it does exactly, but run it.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2480559337586107988?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2480559337586107988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2480559337586107988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2480559337586107988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2480559337586107988'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/neat-firefox-shortcut-and-more-handy.html' title='Neat Firefox Shortcut and More Handy Display Config Candy'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3623910496990149774</id><published>2007-03-30T06:21:00.000-07:00</published><updated>2007-03-30T06:49:40.635-07:00</updated><title type='text'>Linux Display Config... Can be Simple!</title><content type='html'>&lt;div style="text-align: justify;"&gt;On rare occasions, one encounters a tool or application which makes blithely simple a task which was once annoying/hard/cumbersome/painful. Such a thing have I seen today: &lt;a href="http://us.download.nvidia.com/XFree86/Linux-x86/1.0-9755/README/appendix-t.html"&gt;nvidia-settings&lt;/a&gt;. It has long been the case that having an NVIDIA graphics card has made using a GUI much simpler in Linux (although support from other vendors has been increasing). However, trying something as crazy and far-fetched as... dual monitors... has been somewhat of a dreadful task, involving much editing of xorg.conf, tears on the keyboard when startx reveals another error, et cetera ad nauseum. No, I don't want to see detailed output. I want a simple feature of having 2 monitors to work.&lt;br /&gt;&lt;br /&gt;NO MORE! Simply type "sudo nvidia-settings" (in some window manager of course, gnome, kde, etc. Or fluxbox, if you are that cool), and a pretty little interface comes up, where you can do all the obscenely obvious things that one would want to do in configuring a graphical interface, like set up 2 monitors, configure refresh rate, and much much more.&lt;br /&gt;&lt;br /&gt;It's amazing. In a few clicks, saving to my xorg file, and a restart of X, I had everything configured how I wanted it. No pain. No errors.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;font-size:100%;" &gt;Dude, is Linux made of leprechauns? Cause it is awesome!&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3623910496990149774?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3623910496990149774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3623910496990149774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3623910496990149774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3623910496990149774'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/linux-display-config-can-be-simple.html' title='Linux Display Config... Can be Simple!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-6218613063913637099</id><published>2007-03-17T19:33:00.000-07:00</published><updated>2007-03-17T22:46:23.844-07:00</updated><title type='text'>The Sound of Linux</title><content type='html'>&lt;div style="text-align: justify;"&gt;Recently, I came across some rather neat, if obscenely geeky, things to do with sound in linux. Actually, the first can be EXTREMELY useful. Often, using new systems, I do something that results in the PC speaker squawking. If it is trying to use tab-complete in a dir with too many matches available, or a bad VIM command, that tiny speaker decides to notify me of the error of my ways. After this happens one or two times, I am sorely tempted to put my fist through the computer, just to stop that wretched sound. There is a better way, viz., "modprobe -r pcspkr". This effectively kills the PC speaker, for your current session. No more squawking, no more pain. Once you logout, the speaker works fine, it just temporarily saves you the annoyance.&lt;br /&gt;&lt;br /&gt;Another thing I have been experimenting with is much cooler. Apparently, you can take any file and send it to your speaker. To try this, get into the CLI, and first do "wget www.cnn.com". Then do "cat index.html &gt; /dev/dsp". Of course, you can dispense with downloading cnn.com's homepage and use any file you want, of any type. Even "ls /etc &gt; /dev/dsp" will do. As long as your sound is enabled, you will get some static. I believe what is actually happening is that you are sending the binary content of whatever you pass to your sound card, and it is playing through the speaker. Images, I find, are particularly interesting. An amusing experiment I have not finished: Make a recording, hopefully a comical one, encode it, and turn its binary content into some text. Embed this in a hidden div in a web page, and get someone to try the above commands on the page. I don't know anything about encoding, or much of anything at this level, but it is fun to play with.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-6218613063913637099?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/6218613063913637099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=6218613063913637099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/6218613063913637099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/6218613063913637099'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/sound-of-linux.html' title='The Sound of Linux'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8926165875426576968</id><published>2007-03-17T18:46:00.000-07:00</published><updated>2007-03-17T19:32:57.978-07:00</updated><title type='text'>Eterm Oddity</title><content type='html'>&lt;div style="text-align: justify;"&gt;While configuring my Fluxbox setup, I decided I wanted transparent terminals tailing various logs, or running top, from startup. I described getting most of this setup in a previous post. Since then, I ran into and solved two additional problems. The first is a result of specifying the positioning and size of the eterm windows via their title bar, using "Remember", which writes to .fluxbox/apps. Doing this for a transparent window can cause a black bar to appear at the bottom of said window. This is because of the second issue I ran into. When specifying the geometry of eterm through the command line option "-g", the format is "-g NUMOFCOLUMNSxNUMOFROWS+XOffset+YOffset ". The Offset items are in pixels, but the column and row specifications are in, of course, columns and rows, i.e. character widths and rows. So a setting of "-g 80x50+0+500" would make a window holding 80 columns, 50 rows, and it would be placed flush with the left side of the screen, and 500 pixels from the top.&lt;br /&gt;&lt;br /&gt;This difference in units is what causes the black bar to appear when using Remember to set eterm's position and dimensions. This is because the Remember setting is in pixels, and a given set of pixel dimensions will not usually correspond to the exact number needed for a whole number of rows. I believe this difference causes the black bar.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8926165875426576968?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8926165875426576968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8926165875426576968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8926165875426576968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8926165875426576968'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/eterm-oddity.html' title='Eterm Oddity'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-3490802056183641391</id><published>2007-03-10T20:10:00.000-08:00</published><updated>2007-03-10T20:33:01.877-08:00</updated><title type='text'>Top to the Top</title><content type='html'>&lt;div style="text-align: justify;"&gt;I have used the &lt;span style="font-style: italic;"&gt;top&lt;/span&gt; command many times to find out, for example, what errent process was eating up all my memory or CPU. Recently I configured fluxbox to start &lt;span style="font-style: italic;"&gt;top&lt;/span&gt; in a transparent, borderless, bar-less window at startup, so I could always see what was up, no pun intended.&lt;br /&gt;&lt;br /&gt;What I had not done before, however, was read &lt;span style="font-style: italic;"&gt;man top&lt;/span&gt;. It turns out &lt;span style="font-style: italic;"&gt;top&lt;/span&gt; is much more than a simple command. There is an entire interactive interface! Just to get a quick idea, type "top" in a terminal. Once it starts, press "f". Up comes a menu to pick which columns you want to see displayed! Just press the letter displayed by each item (its case toggles as you toggle each option), and it will display (or not) once you go back to &lt;span style="font-style: italic;"&gt;top&lt;/span&gt; (press any non-mapped key, like Tab).&lt;br /&gt;&lt;br /&gt;Another neat one: press "o" while &lt;span style="font-style: italic;"&gt;top&lt;/span&gt; is running. This lets you order the columns that display. I found I liked to have them ordered thus: "Command, PID, S, User, %CPU, %MEM, TIME+". And those are all I really needed, so I disabled the rest. Now &lt;span style="font-style: italic;"&gt;top&lt;/span&gt; is far less cluttered and much easier to read. Along this same line, press "B" (yes, capital). This bolds important fields and values. It also bolds processes when they are in a Running state, again very useful.&lt;br /&gt;&lt;br /&gt;An additional informative note and two warnings: For those woefully uninformed of the coolness of &lt;span style="font-style: italic;"&gt;top&lt;/span&gt;, it can do quite a bit more than I have mentioned here. You can do a lot with it interactively. But you must be careful as well. Pressing "k", for instance allows you to kill a process after specifying its PID. In addition, after you have configured the columns, order, and anything else to your liking, be sure to press "W". This will write your current setup to ~/.toprc. Otherwise, it's all lost once &lt;span style="font-style: italic;"&gt;top &lt;/span&gt;is stopped.&lt;br /&gt;&lt;br /&gt;For more information on &lt;span style="font-style: italic;"&gt;top&lt;/span&gt;'s abilities in a form shorter than the gargantuan man page for it, see &lt;a href="http://linux.about.com/od/commands/l/blcmdl1_top.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-3490802056183641391?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/3490802056183641391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=3490802056183641391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3490802056183641391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/3490802056183641391'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/top-to-top.html' title='Top to the Top'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2545180103429544975</id><published>2007-03-10T12:16:00.000-08:00</published><updated>2007-03-18T15:53:03.802-07:00</updated><title type='text'>Dockapps for Flux's Slit Reviewed</title><content type='html'>&lt;div style="text-align: justify;"&gt;I have tried out quite a few dockapps over the last week after starting to use fluxbox. I have found some that are helpful, some that are neat, some that are dumb/ugly, and a few that are just plain broken.&lt;br /&gt;&lt;br /&gt;To save others the heartache, I shall mention the best in show thus far:&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;a href="http://dockapps.org/file.php/id/162"&gt;wmcube&lt;/a&gt; - A neat looking dockapp that shows CPU use as a percentage, as well as via as a randomly selected rotating 3D object. You can change the object by clicking on it. Keeping abreast of CPU usage can now be done from the corner of your eye, since the objects' rotation increases accordingly.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wmtop.sourceforge.net/"&gt;wmtop&lt;/a&gt; - This shows the 3 items highest on the list provided by top. It can let you know if the app you think should be starting via a keyboard shortcut is taking a long time to start, or isn't starting at all, not to mention if a random thing is hogging your resources. There are 5 different skins for it, so check "wmtop --help" and find one you like.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freshmeat.net/projects/wmusic/"&gt;wmusic&lt;/a&gt; - This is a tiny remote for the XMMS player. I looked and looked, but basically all of the dockapps for controlling music are for XMMS. This saddened me, until I tried XMMS and got hooked on it as well! It's basically WinAmp, but SO fast. Really. I added 10,000 songs in 2 minutes. They were immediately searchable. It responds immediately to whatever you try do to it. I was amazed, after having tried more music players in linux than I can count with both hands. Aside from these things, there are a ton of skins and plugins for it, greatly expanding functionality, and making it look like whatever you want.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://dockapps.org/file.php/id/9"&gt;wmcalclock&lt;/a&gt; - There are a lot of dockapps to show you the time and date, but I liked this the best because of the large, bright, easy-to-read display. Just what you need, nothing else.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freshmeat.net/projects/asmem/"&gt;asmem&lt;/a&gt; - The problem I had with the myriad system monitoring applets was that I had to click them to see CPU versus memory usage. I wanted dockapps that were always in a useful state. And I already had 2 neat dockapps for monitoring CPU usage. asmem only monitors memory usage, and it neatly displays RAM and swap use, in MB (configurable) and percentage free (or used). Be sure to pass this "-withdrawn", so that it doesn't have a menu bar and plays nicely with the other slit apps.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://dockapps.org/file.php/id/242"&gt;wmfire&lt;/a&gt; - This does the same thing as wmcube, but I like to have them both for eye candy. It shows CPU usage as a fire, increasing in intensity as usage goes up. It's pretty spiffy.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://dockapps.org/file.php/id/77"&gt;wmnet&lt;/a&gt; - Providing a quick eye to network activity, this highly configurable dockapp can be quite useful. You can change the refresh rate, all the colors, interfaces, and more. Be sure to pass this "-w" as well, so that it actually fits in the slit.&lt;/li&gt;&lt;li&gt;&lt;a href="http://wmwifi.digitalssg.net/"&gt;wmwifi&lt;/a&gt; - This applet displays what wireless network you are connected to, with scrolling SSID, a bar as well as percentage display of signal strength, and an antennae that indicates connection or lack thereof. A handy thing to have for those that often switch between wireless networks.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://freshmeat.net/projects/wmnd/"&gt;wmnd&lt;/a&gt; - I actually started using this in place of wmnet, since I found it looked much better. It displays the interface being watched, a blinking arrow indicator of upload/download activity, a numeric indicator of data transferred, up and down, as well as a nice graph of activity. It displays much more useful information than wmnet for the real estate used. I found that "wmnd -c red -C blue" works well. You can also lower the -s value to increase scroll rate ( I think 5 is default). Be careful with this. Setting it at 3 made my fluxbox just load the background, and nothing else. After playing with everything in .fluxbox/startup and restarting gdm on the CLI, I found this was the culprit. -c is the download traffic line, -C is for upload.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;I thought of something usefully clever to add to wmnet that I have not gotten to work, as a result of my stupidity. You can pass it "-e COMMAND" so that it will launch COMMAND when you click the window. I wanted to view the results of netstat upon clicking it, so that if I saw odd spikes of network activity, I could immediately see the cause. BUT, doing this "-e gnome-terminal -e netstat" will not work. You will get this  error: "wmnet: duplicate --execute", since wmnet sees two of the same option.&lt;br /&gt;&lt;br /&gt;My proposed solution was to make an alias that I would call "netstat-term", simply being "gnome-terminal -e netstat", so that I could run my wmnet as "wmnet -l -d 60000 -t red -r cyan -e netstat-term", and get what I wanted, while not confusing wmnet. Two problems remain: wmnet does not have access to aliases set in .bashrc, and when I run "gnome-terminal -e netstat", the new terminal opens, runs netstat, and closes. I have tried several ways, but I can't manage to make it stay open as a new process. Hopefully I can solve both soon...&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2545180103429544975?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2545180103429544975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2545180103429544975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2545180103429544975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2545180103429544975'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/dockapps-for-fluxs-slit-reviewed.html' title='Dockapps for Flux&apos;s Slit Reviewed'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-5780181773185536237</id><published>2007-03-10T11:59:00.000-08:00</published><updated>2007-03-10T12:02:35.116-08:00</updated><title type='text'>How Flux got his Groove back</title><content type='html'>One thing you may (or may not) miss upon switching to Fluxbox in Ubuntu is the happy startup jingle. But fear not! You can get it back, via the instructions listed in the &lt;a href="http://ubuntuguide.org/wiki/Dapper#Make_it_make_the_pretty_sound_on_login"&gt;Ubuntu guide&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo apt-get install sox&lt;br /&gt;gedit ~/.fluxbox/startup&lt;br /&gt;&lt;/pre&gt; &lt;ul&gt;&lt;li&gt;Find this line: &lt;/li&gt;&lt;/ul&gt; &lt;pre&gt;exec /usr/local/bin/fluxbox&lt;br /&gt;&lt;/pre&gt; &lt;ul&gt;&lt;li&gt;Put this above it somewhere: &lt;/li&gt;&lt;/ul&gt; &lt;pre&gt;play /usr/share/sounds/login.wav &gt; /dev/null 2&gt;&amp;1 &amp;amp;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I did this, exited flux, logged back in, and the happy sound greeted me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-5780181773185536237?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/5780181773185536237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=5780181773185536237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5780181773185536237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/5780181773185536237'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/how-flux-got-his-groove-back.html' title='How Flux got his Groove back'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-7836824428527889281</id><published>2007-03-08T22:41:00.000-08:00</published><updated>2007-03-08T23:13:58.251-08:00</updated><title type='text'>Transparent Terminals on the Desktop</title><content type='html'>&lt;div style="text-align: justify;"&gt;There are a number of cases in which you might want a terminal window always present on your desktop, perhaps tailing an important log file, or looking at the output of top. Whatever your reason, here are the steps to take if you just want magically dynamic text appear on your desktop.&lt;br /&gt;&lt;br /&gt;First, assuming you have Eterm, start up an instance of it and Toggle Transparency in Background. You might also want to play around with the text color, to optimize it for your background. Then add an entry to start it when fluxbox starts in .fluxbox/apps.&lt;br /&gt;&lt;br /&gt;Now for the window title bar, button bar, scroll bar, border, and positioning. All of these tweaks can be done via start options. Here's what I have for my Eterm entry in .fluxbox/apps:&lt;br /&gt;[startup] {Eterm -g 60x50+80+5 -O -x --no-cursor -w 0 --scrollbar 0 --buttonbar 0 -e tail -f /var/log/messages}&lt;br /&gt;Going in order: the "-g" options allows you to specify the geometry of the window. You pass it Width x Height + X offset + Y offset. So in my example, I have the window as 60x50, and it appears 80 from the left side of the screen and 5 from the top (this is just past where I have fbpager, which seemed like a convenient place). The -O option takes the background from the root window, assuring transparency. The -x option removes the window's border, -w sets the border width (0 in my case), and the scrollbar and buttonbar as 0 removes those as well.&lt;br /&gt;&lt;br /&gt;The -e tells eterm to execute a command. I chose to follow tail /var/log/messages, but you can set it to whatever log file or process you want. Top is a good one to implement like this as well.&lt;br /&gt;&lt;br /&gt;So with just that one line addition to .fluxbox/apps, you can have a permanent transparent log output to your desktop. It's useful, and looks awesome.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-7836824428527889281?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/7836824428527889281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=7836824428527889281' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7836824428527889281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7836824428527889281'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/transparent-terminals-on-desktop.html' title='Transparent Terminals on the Desktop'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-8644186603530759812</id><published>2007-03-07T21:42:00.000-08:00</published><updated>2007-03-07T22:28:32.734-08:00</updated><title type='text'>Fluxbox and Thunar</title><content type='html'>&lt;div style="text-align: justify;"&gt;I have switched over to using &lt;a href="http://www.tuxmagazine.com/node/1000191"&gt;Fluxbox&lt;/a&gt; as my window manager with &lt;a href="http://thunar.xfce.org/index.html"&gt;Thunar&lt;/a&gt; as the file manager. After some configuration fiddling, I find it much faster and more efficient than Gnome with Metacity and Nautilus. It runs a LOT faster. A couple things that might throw you off of using it at first: When you first use it after install, it is very plain. It needs help getting dressed. Also, configuration is done through text files. This should not be a problem, but it bothers some people.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntu-tutorials.com/2006/12/18/alternate-desktop-managers-kde-xfce-enlightenment-fluxbox-ubuntu-6061-610/"&gt;Trying it is easy&lt;/a&gt;, at least with Ubuntu. Just install it, and log out of Gnome. Then select Options in the lower left, and select session as fluxbox. You can try it out once, or set it as default. There are a lot of &lt;a href="http://www.mepis.org/docs/en/index.php/Fluxbox"&gt;tutorials&lt;/a&gt; out there on how to configure basic things like the background and menus and shortcuts, and they are mostly very helpful. Not to mention the fluxbox &lt;a href="http://fluxbox.sourceforge.net/docbook.php"&gt;documentation&lt;/a&gt; itself, which is great.&lt;br /&gt;&lt;br /&gt;Some suggestions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Use Thunar for file management. I find Thunar to be just what I need in all cases thus far, and nothing else. It is fast and efficient. Here are some &lt;a href="http://thunar.xfce.org/pwiki/documentation/tips_and_tricks"&gt;handy tips&lt;/a&gt; for using Thunar.&lt;/li&gt;&lt;li&gt;Unless you really want icons on the desktop, Rox can be more trouble than its worth. Case in point: It refuses to be transparent. Say you set a background via fbsetbg, then keep this constant by setting the appropriate rootcommand in ./fluxbox/init. Then you start Rox. Your background turns gunmetal, how peculiar! Of course, you can set a background in Rox, which works fine. Until you want to have an application, e.g. Eterm, be transparent. It will look to the original background, not the Rox one. And there is no way to make Rox itself transparent with respect to background, at least in the current version.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Move fluxbox tab placement into the title bar of windows. To me, that wart called a tab on every window got annoying very fast. Positioning them into the title bar means you can still use fluxbox tab functionality, without the wart.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The &lt;a href="http://fluxbox.sourceforge.net/docbook/en/html/chap-slit.html"&gt;slit&lt;/a&gt; is a great thing. You can put lots of handy little dockapps in it to do everything from showing an LCD clock to watching log files. There are a lot in the Ubuntu repos, so run "sudo apt-cache search wm" first. Install what looks good, then add an entry for each in .fluxbox/apps. Restart fluxbox and see what you like. If you decide any of the dockapps aren't you, remove them from the apps file. If you want them in a particular order, you can put them in ./fluxbox/slitlist.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;As a side note, it seems that .xpm files need to be used for the icons in the fluxbox menu. I found this out after trying to use .png files, a common format for icons. It's easy enough to convert them: Just open your favorite one per app in the Gimp, Save As, and xpm as the format. Usually, they are stored in /usr/share/pixmaps. Then just update the references to the icons in .fluxbox/menu, and voila, nice icons in your menu.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-8644186603530759812?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/8644186603530759812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=8644186603530759812' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8644186603530759812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/8644186603530759812'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/fluxbox-and-thunar.html' title='Fluxbox and Thunar'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-375937330167514312</id><published>2007-03-06T21:54:00.000-08:00</published><updated>2007-03-06T22:20:09.047-08:00</updated><title type='text'>Middle Click to the Rescue!</title><content type='html'>&lt;div style="text-align: justify;"&gt;Yet another extremely simple but well-executed method to increase speed and efficiency present in Linux: Middle mouse button pasting. Open an application, anything with text, a terminal, browser, anything. Select some text. Any text you want. Now go into something else, say a terminal, and press your middle mouse button (or, for the 3 people left without a middle mouse button, press the left and right buttons at the same time (if you have 3 button emulation turned on)).&lt;br /&gt;&lt;br /&gt;That's right, your selection just got pasted in. No CTRL+c, no CTRL+v, just select and middle button. Very quick and satisfying.&lt;br /&gt;&lt;br /&gt;Some caveats: This only works for text, not for files. So you can't use it in all cases you would use CTRL+c and v, but it is still very useful for text. I find this especially so in a terminal where, if you are using gnome-terminal, for example, you have to copy and paste with Shift+CTRL+c and v. Also, you have to leave the application you selected text in open until you paste. This is because you are not really copying to a clipboard and pasting, but "moving" the selected text.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-375937330167514312?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/375937330167514312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=375937330167514312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/375937330167514312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/375937330167514312'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/middle-click-to-rescue.html' title='Middle Click to the Rescue!'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-2722360010882382409</id><published>2007-03-02T10:57:00.000-08:00</published><updated>2007-03-25T06:54:19.821-07:00</updated><title type='text'>Fun Times in the CLI</title><content type='html'>&lt;div style="text-align: justify;"&gt;I discovered a few things in the last day that I found to be preponderously fun. Many familiar with the CLI may know them, but I did not, and so I shall share.&lt;br /&gt;&lt;br /&gt;The first thing I still don't completely understand, but it works. If you run a script that has lots of requests for input with defaults that you want to accept, there is a better way to run it than "./MYCOOLSCRIPT.sh" and hitting enter a lot. Imagine if it was a script you wanted to run on 20 remote machines to configure something. We need a better way. And it comes in the form of linux's own black hole: /dev/null.&lt;br /&gt;&lt;br /&gt;If you redirect from /dev/null to a running script (and to other things, although this is all I have tried), it somehow supplies an equivalent to pressing the Enter key. So you can start the script like "./MYCOOLSCRIPT.sh &lt; /dev/null", and any prompts will be answered with the defaults. I have not been able to get a good explanation of how this works, aside from something about it providing STDIN to the thing it pipes to, but it does work. Beautiful Black Magic.   &lt;br /&gt;&lt;br /&gt;Another trick is less spine-tingling, but arguably more helpful. Sometimes after typing in a long command, I decide I need to do something else, change the middle of the command, etc. Basically, sometimes I want what I have typed gone, and fast. Usually, I press the Up arrow, hoping to Linus that I entered ls recently, and thus only have to press backspace twice. If I am unlucky, I must resort to holding backspace. Dumb.  But, again, there is a better way! Namely, press CTRL+a, then k. You can either hold CTRL+a+k, or hold CTRL+a, release a, and press k with CTRL held. If you release CTRL and a, k will just be entered as a character, so don't do that. Another, shorter, method is CTRL+u. This does the same thing as CTRL+a, k on most systems. I have found that it does not work on certain older distros, so knowing the CTRL+a, k is useful as well. In addition, I found that CTRL+w erases the last word, as defined by a block of characters without a space or tab. This can be helpful if you just botched the last part of a command.&lt;br /&gt;&lt;br /&gt;One last mot(e) of coolness. "-A" is a VERY helpful option for grep. If you invoke grep with "-A SOMENUMBER", it will print not only the line matching your text you are grepping for, but also the next SOMENUMBER lines. If there are multiple matches, each match and the specified number of context lines will be separated by a "--" line. I found this so helpful because in a lot of things  grep, I don't just want the line the matched string is on, but a little context as well. Options to the rescue. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-2722360010882382409?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/2722360010882382409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=2722360010882382409' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2722360010882382409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/2722360010882382409'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/03/fun-times-in-cli.html' title='Fun Times in the CLI'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-4671915156363207083</id><published>2007-02-28T21:13:00.000-08:00</published><updated>2007-03-01T07:57:08.940-08:00</updated><title type='text'>Ubuntu and the Search for a Better Font</title><content type='html'>&lt;div style="text-align: justify;"&gt;There are a few things about Ubuntu that I found lacking from the start. One of them was the lack of good fonts. Since I have to stare at the form I choose all day, I would like one that looks nice. In addition, there are some fonts that are well suited to normal application use, but that do not work on the CLI at all.&lt;br /&gt;&lt;br /&gt;On the last point, &lt;a href="http://www.lowing.org/fonts/"&gt;this&lt;/a&gt; is a great guide on available monospace/fixed width fonts suitable for programmer's use, viz. in the CLI. It is OS independent and has links to download all the fonts mentioned, and samples of text in each one along with descriptions.&lt;br /&gt;&lt;br /&gt;Regarding good looking fonts for GUI use, I will keep my preferences to myself. But, on how to get a variety of fonts to try:&lt;br /&gt;sudo apt-get install gsfonts-x11 msttcorefonts&lt;br /&gt;will give you lots of Microsoft fonts. Many look great. You have to give it to them, Microsoft does put millions of dollars into font design, and it shows. There are also lots of international options available, such as&lt;br /&gt;sudo apt-get install xfonts-intl-arabic&lt;br /&gt;&lt;br /&gt;You need to run this when you are done:&lt;br /&gt;sudo fc-cache -f -v&lt;br /&gt;Alternatively, you can restart X (usually mapped to CTRL+ALT+BACKSPACE).&lt;br /&gt;&lt;br /&gt;Another good source in the repos:&lt;br /&gt;&lt;span style="font-size:100%;"&gt;deb &lt;a href="http://www.elisanet.fi/mlind/ubuntu"&gt;http://www.elisanet.fi/mlind/ubuntu&lt;/a&gt; edgy fonts&lt;br /&gt;deb-src &lt;a href="http://www.elisanet.fi/mlind/ubuntu"&gt;http://www.elisanet.fi/mlind/ubuntu&lt;/a&gt; edgy fonts&lt;/span&gt;&lt;br /&gt;Just add those 2 to the end of your &lt;span style="font-size:100%;"&gt;/etc/apt/sources.list, then do sudo apt-get dist-upgrade. After that&lt;/span&gt;&lt;span style="font-size:100%;"&gt;, run dpkg-reconfigure fontconfig-config again.&lt;/span&gt; Of course, update "edgy" to whatever release you are using.&lt;br /&gt;&lt;a href="http://penguinfonts.com/howto/ubuntu.php"&gt;&lt;br /&gt;This guide&lt;/a&gt; does a great job explaining how to install fonts in Ubuntu by hand and with a handy program called kfontview, which lets you find and install fonts in the GUI.&lt;br /&gt;&lt;br /&gt;Aside from these sources and methods, you can put any new TrueType fonts you get in /usr/share/fonts/truetype, and restart X.&lt;br /&gt;&lt;br /&gt;Another way to increase your eye candy variable is:&lt;br /&gt;&lt;span style="font-size:100%;"&gt;sudo dpkg-reconfigure fontconfig-config&lt;br /&gt;Once this runs, select Autohinter, Always, No to the questions.&lt;br /&gt;This turns on neat features to emulate Mac OSX font rendering. It will make you eyes happy. Highly recommended. When you finish running the reconfigure, be sure to restart X. One note: When I made this change, everything else worked fine, except for my System Monitor applet on the Gnome Panel. I had to change its width to 35 pixels to display full height. I found this rather odd, and you may not experience the problem.&lt;br /&gt;&lt;br /&gt;Thanks to Master Ian for mad tips.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-4671915156363207083?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/4671915156363207083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=4671915156363207083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4671915156363207083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/4671915156363207083'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/02/ubuntu-and-search-for-better-font.html' title='Ubuntu and the Search for a Better Font'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7205041512959092766.post-7514885508460374489</id><published>2007-02-26T11:46:00.000-08:00</published><updated>2007-02-26T12:41:57.551-08:00</updated><title type='text'>Handy *nix Commands, Part 1: Finding Processes</title><content type='html'>On countless occasions, I have needed to find the PID of a process, in order to watch it or, more often, to kill it. For quite some time, I would simply run "ps ax | grep" followed by part of the process' name that I wanted to find. (Side note: it helps to also add " | grep -v grep" to this to eliminate the grep itself from the results.)&lt;br /&gt;&lt;br /&gt;This works, but it is slow to use. I had to read through the results of ps to get the PID, when that is often all I wanted. One could use awk to grab just the PID column, but there are faster solutions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;pgrep (&lt;a href="http://www.die.net/doc/linux/man/man1/pgrep.1.html"&gt;man&lt;/a&gt;) - Looks up processes based on options and displays matching PID. Helpful options are -f, finds text match of process name, -o finds oldest matching process.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;pidof (&lt;a href="http://www.die.net/doc/linux/man/man8/pidof.8.html"&gt;man&lt;/a&gt;) - finds PID of a matching program name.&lt;/li&gt;&lt;/ul&gt;In both cases, you just pass the command the name (or part of it) of the process you want to find, and you get all matches. You can use pkill, or pipe to kill, to initiate the demise of the process once you find it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7205041512959092766-7514885508460374489?l=assistedsilicon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assistedsilicon.blogspot.com/feeds/7514885508460374489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7205041512959092766&amp;postID=7514885508460374489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7514885508460374489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7205041512959092766/posts/default/7514885508460374489'/><link rel='alternate' type='text/html' href='http://assistedsilicon.blogspot.com/2007/02/handy-nix-commands-part-1-finding.html' title='Handy *nix Commands, Part 1: Finding Processes'/><author><name>by Immortal Curiosity</name><uri>http://www.blogger.com/profile/10738276325741994808</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://bp0.blogger.com/_75nXVfeyezs/SIYdQtMi6CI/AAAAAAAAAB4/kNrRapBrMKI/S220/25402951%40N00.jpg'/></author><thr:total>0</thr:total></entry></feed>
