<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Daemon Dancing in the Dark</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/" />
    <link rel="self" type="application/atom+xml" href="http://linux.amazingdev.com/blog/atom.xml" />
   <id>tag:linux.amazingdev.com,2010:/blog//1</id>
    <link rel="service.post" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1" title="Daemon Dancing in the Dark" />
    <updated>2010-02-28T18:33:01Z</updated>
    <subtitle>Wherein one man comments upon his journey to Open OS nirvana.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.2</generator>
 
<entry>
    <title>Do It Sudo</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000945.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=945" title="Do It Sudo" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.945</id>
    
    <published>2010-02-28T18:30:30Z</published>
    <updated>2010-02-28T18:33:01Z</updated>
    
    <summary>I&apos;ve come across a couple sudo tricks during the past few days and thought I would pass them along. The first thing you need to know before using sudo is that you should use the visudo command to edit the sudo config file. This script does a number of useful...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>I've come across a couple <a href="http://en.wikipedia.org/wiki/Sudo" >sudo</a> tricks during the past few days and thought I would pass them along.</p>

<p>The first thing you need to know before using <em>sudo</em> is that you should use the <code>visudo</code> command to edit the sudo config file. This script does a number of useful things, like creating a lock to prevent mulitple editing, and doing some sanity check. But if you have the problem that setting $EDITOR and $VISUAL is ignored when running something with sudo (like <code>sudo visudo</code> or <code>sudo crontab -e</code>), that's a sudo config issue. Add the following in your <code>/etc/sudoers</code> file:</p>

<pre>Defaults env_keep += "EDITOR VISUAL"
</pre>

<p>And you can use <code>sudo</code> from within your normal Emacs window by using the Emacs' <a href="http://www.emacswiki.org/emacs/TrampMode" >Tramp Mode</a>, which allows all kinds of editing, even remote editing. Just use the sudo "protocol" when editing a system file, like /etc/fstab:</p>

<pre>Find file: /sudo::/etc/fstab</pre>

<p>This will prompt you for your password (not the root password - remember, we're doing this via sudo, which wants your password, not root's). Type it in and you can edit the file in place, rather than running a special Emacs process as root. Very nice!</p>]]>
        
    </content>
</entry>
<entry>
    <title>Org-ing in Emacs</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000944.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=944" title="Org-ing in Emacs" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.944</id>
    
    <published>2010-02-15T15:54:03Z</published>
    <updated>2010-02-15T15:55:57Z</updated>
    
    <summary>I have been using emacs since the beginning of computer time, way back in the mid-80s. My .emacs file has been carried around for almost as long. Each major rev causes me headaches, as I never know what archaic options are going to break things. And yet, I&apos;m still learning...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>I have been using <a href="http://www.gnu.org/software/emacs/" >emacs</a> since the beginning of computer time, way back in the mid-80s. My <a href="http://www.emacswiki.org/JonathanArnold" >.emacs</a> file has been carried around for almost as long. Each major rev causes me headaches, as I never know what archaic options are going to break things. And yet, I'm still learning new things to do with it. I think it inspired <em>Zawinski's Law of Software Envelopment</em>:</p>

<blockquote>Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.</blockquote>

<p>My latest Emacs discovery was on an <a href="http://archlinux.com" >Arch Linux</a> forum thread on note taking software. I use <a href="http://www.rememberthemilk.com" >Remember The Milk</a> for plenty of lists, but the web based nature of it makes it hard to be quick about doing a quick note. I started keeping a simple text file with notes on what I was doing, as I was finding whole hours at the keyboard disappearing into a black hole. I whipped up a quick Emacs macro that I bound to F7, which opened a file to prepend a new quick entry:</p>

<pre>(setq logfile-name "/home/jdarnold/Dropbox/dailylog.txt")
(defun insert-new-log ()
  "Start a new log entry"
  (interactive)
  (find-file logfile-name)
  (beginning-of-buffer)
  (insert "==== ")
  (insert-now)
  (insert "\n\n")
  (previous-line)
  )
</pre>

<p>As you can see, I put the file in my <a href="https://www.dropbox.com/" >Dropbox</a> folder (use <a href="https://www.dropbox.com/referrals/NTExMjczMjk" >this link</a> to sign up and we both get an extra 250gb of storage space), so no matter which computer I'm working on, I can jot a quick note that looks something like this:</p>

<pre>==== Monday, January 25 2010 10:43 AM (1264434222)
after a couple of hours puttering around, including writing a review
for Goodreads, I'm back at work. Trying to figure out what I did to
break the video plugin
#insors</pre>

<p>I have a few adhoc tags, stamp it with time date and Unix time, and tried to see what I was working. It's okay, but if I forgot to jot something down when I left the keyboard (which I often did), it lost a lot of its effectiveness.</p>

<p>Then I found out about <a href="http://orgmode.org/" >org-mode</a> in Emacs. It's been in the standard Emacs distribution for a couple of releases, but I'd never heard of it before. And <strong>wow</strong>, is it amazing! The PDF of the User Manual is nearly 200 pages! And it really does everything you could want in an organizer/todo manager/note taker. It even has a clock in/clock out/idle timeout paradigm, so it can notice when I've walked away from my computer. Unfortuantely, "real" idle only works on Mac OSX and Linux (after compiling <a href="http://www.buddydog.org/x11idle.c" >x11dle.c</a>). On Windows, it just notices when you are idle in Emacs, which, despite the fact I use Emacs alot on Windows, isn't quite the same thing. </p>

<p>So now I've changed my Emacs checkin macro to be:</p>

<pre>(defun start-new-task ()
  "Start new journal task"
  (interactive)
  (find-file (concat dropbox-folder "org/" journalname))
  (end-of-buffer)
  (org-insert-heading)
  (org-clock-in)
  )
</pre>

<p>so it adds a new heading and starts the clock. And on my work machine, I set journalname to be a work journal and on my personal machine, I give it a different name. Still working out the kinks in the process, but it's closer to tracking what I've been doing.</p>

<p>I also intend on using <em>org-mode</em> to jot down my myriad project ideas. I'm always coming across interesting web sites, esp. for web APIs, that make me want to dabble in some projects, but I've never had anywhere to jot them down. I was using <a href="http://www.mindmeister.com" >MindMeister.com</a>, an online mind-mapping tool for it, but found it too structured. Given <em>org-mode</em>'s flexibility, I should be able to find some easy way to just add my "brilliant" brainstorms to a file!</p>]]>
        
    </content>
</entry>
<entry>
    <title>Tumblings, Jan 24</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000943.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=943" title="Tumblings, Jan 24" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.943</id>
    
    <published>2010-02-08T18:07:12Z</published>
    <updated>2010-02-08T18:08:30Z</updated>
    
    <summary>A couple of links posted to my Linux Tumblr last week: Wicked Cheap Hosting - some great web hosting deals, courtesy of All About Linux TermBuilder - a simple web app to build a commandline command...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>A couple of links posted to my <a href="http://linuxlove.amazingdev.com/" >Linux Tumblr</a> last week:</p>

<ul>
  <li><a href="http://linuxlove.amazingdev.com/post/367449999/wicked-cheap-hosting" >Wicked Cheap Hosting</a> - some great web hosting deals, courtesy of <a href="http://goo.gl/5Xu1" >All About Linux</a></li>
  <li><a href="http://linuxlove.amazingdev.com/post/367344939/termbuilder-a-graphical-linux-command-line-generator" >TermBuilder</a> - a simple web app to build a commandline command</li>
</ul>
]]>
        
    </content>
</entry>
<entry>
    <title>Arched</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000942.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=942" title="Arched" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.942</id>
    
    <published>2010-02-07T15:37:22Z</published>
    <updated>2010-02-07T21:57:25Z</updated>
    
    <summary>So early in December, I went on a quest for a new Linux distro. It wasn&apos;t so much that I was unhappy with my openSUSE 11.0 installation, but I knew I was probably going to install the new 11.2 version and so I figured I would cast about to see...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>So early in December, I went on a quest for a new Linux distro. It wasn't so much that I was unhappy with my <a href="http://opensuse.org" >openSUSE</a> 11.0 installation, but I knew I was probably going to install the new 11.2 version and so I figured I would cast about to see what's up with the other KDE distros. And given that <a href="http://linuxformat.com" >Linux Format</a> had just done a big review on the "best" KDE distros out there, it was good timing all around.</p>

<p>I didn't really have as complete a checklist of features as I have had in the past. Of course, it had to install on my beast of a machine, with its myriad hard drives, cd drives, dual monitors, and the like. I wanted an easy to use package manager, with plenty of packages available. I was't quite as sold on a "one size fits all" admin panel like <em>openSUSE</em>'s Yast2. I'm feeling a little more adventurous, and hate to see my configs get changed without my knowledge. I wanted a KDE distro, as I find GNOME to be bizarre. I didn't want to get too far off the beaten path, as I like a popular, well documented distro.</p>

<p>First up was <a href="http://sabayonlinux.org/" >Sabayon</a>, which has been getting lots of good press. I wasn't crazy about their home page - it was too hard to find even the download link. And there were a few kinks in the install process. It was a few months ago, so I don't remember exactly the problems, but they were enough to sour me on it a bit. It did have exactly the same problem I was going to find in all the rest of my installs, which is that the setup hard drive numbering for GRUB was always different than the final installation drive numbering, requiring me to reboot using the live disc and edit the /boot/grub/menu.lst file and change the hd0 to hd1. Not sure why that is, but I guess the mix of IDE & SATA hard drives makes it crazy.</p>

<p>So after dabbling a bit with Sabayon, I moved over to try <a href="http://sidux.com" >Sidux</a>, which really intrigued me with its cutting edge release and huge package library. It also had an incredibly clean install process and the desktop is stunning. Really a very polished and good looking release. It has a very nice community with lots of good info on the web site. I was a little turned off by its insistence that you drop down into single user mode to install any updates, which isn't something I like doing.</p>

<p>But I played with Sidux for a couple of days. It was nice, but I decided to give <a href="http://www.archlinux.org" >Arch Linux</a> a try. It had been written up very nicely in the previous issue of <em>Linux Format</em>, in the "Remix Your Own Linux" article. It's overriding philosophy of "Keep It Simple" was really attractive, as was the very large package library. I found it amusing that the Live CD boots into a commandline, the installer is the old fashioned text-mode graphics and, even after installing, you end up with commandline! It doesn't even install X for you.</p>

<p>I found this a refreshing change and decided to jump right in. I even decided against installing KDE and just run <a href="http://openbox.org/wiki/Main_Page" >openbox</a> with a stripped down config. It's really been working nicely for me and I haven't looked back. <em>Arch</em> makes a great server install, as there is very little cruft installed by default. When I built my media server machine, with its 1tb software RAID, I only added Emacs & Samba and I know it is a lean, mean, serving machine. </p>

<p>The <a href="http://wiki.archlinux.org/index.php/Main_Page" >Arch wiki</a> is incredibly informative and comes up early in many Google searches. The forums are active with intelligent discussions and it is a very nice, experienced, community. While I wouldn't use it for my Grandma's Linux, Arch is a great distro once you get some Linux experience and want to tailor a distro to your ideas, and not the other way around. Arch is also why the calls for fewer distros is misguided. It isn't for everyone but as long as each distro has a certain focus, and hues to it closely like Arch does, there's plenty of room out there. Next up - theme color changes!</p>
]]>
        
    </content>
</entry>
<entry>
    <title>Linux Love Links</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000941.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=941" title="Linux Love Links" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.941</id>
    
    <published>2010-02-02T20:46:39Z</published>
    <updated>2010-02-02T20:47:47Z</updated>
    
    <summary>A few things I have recently thrown down on my Linux Love Tumblr blog, which I use for quick little Linux links and notes: 7 Best Linux Apps for Ripping CDs and DVDs | Maximum PC 50+ Ultimate Collections of Planet Wallpapers TermBuilder: a graphical Linux command line generator...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>A few things I have recently thrown down on my <a href="http://linuxlove.amazingdev.com/" >Linux Love</a> <a href="http://tumblr.com" >Tumblr</a> blog, which I use for quick little Linux links and notes:</p>
<ul>
  <li><a href="http://linuxlove.amazingdev.com/post/334295621/7-best-linux-apps-for-ripping-cds-and-dvds-maximum-pc" >7 Best Linux Apps for Ripping CDs and DVDs | Maximum PC</a></li>
  <li><a href="http://linuxlove.amazingdev.com/post/350790404/50-ultimate-collections-of-planet-wallpapers-naldz" >50+ Ultimate Collections of Planet Wallpapers </a></li>
  <li><a href="http://linuxlove.amazingdev.com/post/367344939/termbuilder-a-graphical-linux-command-line-generator" >TermBuilder: a graphical Linux command line generator</a></li>
</ul>
]]>
        
    </content>
</entry>
<entry>
    <title>On Being Persistent</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000940.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=940" title="On Being Persistent" />
    <id>tag:linux.amazingdev.com,2010:/blog//1.940</id>
    
    <published>2010-02-01T14:28:05Z</published>
    <updated>2010-02-01T14:29:27Z</updated>
    
    <summary>Those of us who have multiple hard drives in our computers will inevitably boot up one morning to find the naming scheme for these drives has changed. What was once /dev/sda is now /dev/sdb and vice versa. Your computer won&apos;t boot and fsck complains about an uknown or mismatched filesystem...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>Those of us who have multiple hard drives in our computers will inevitably boot up one morning to find the naming scheme for these drives has changed. What was once /dev/sda is now /dev/sdb and vice versa. Your computer won't boot and fsck complains about an uknown or mismatched filesystem type. This is especially true after a kernel upgrade. Nothing really can be done about this random renaming, as it is all in the timing. But how can you fix the problem?
</p>

<p>Actually, it's a pretty easy fix. Instead of using /dev/sd? in places like grub's menu.lst file and the all important <a href="http://wiki.archlinux.org/index.php/Fstab">/etc/fstab</a>, use a special label that doesn't change. I find using UUID's to be the best solution.</p>

<p>There are a couple of ways to get the UUID of a hard drive. The easiest is to use the <em>blkid</em> command from the commandline. It lists all the hard drives, along with their UUID and TYPE:</p>

<pre>$ blkid
/dev/sdb1: LABEL="ReiserData" UUID="0e9c1455-4993-4ddf-a86a-a3dac116a5cc" TYPE="reiserfs" 
/dev/sda1: UUID="a846c306-3114-403d-b893-a3e27704755a" TYPE="ext3" SEC_TYPE="ext2" 
/dev/sda3: UUID="c03ce6c7-32ab-41e9-b603-da09acc0fbab" TYPE="ext4" 
/dev/sda4: UUID="303889b7-ae78-436f-85ac-da95b2280596" TYPE="ext3" 
/dev/sda5: LABEL="/home" UUID="d6db1ae8-30d6-48ee-8a66-90912480e8be" TYPE="ext3" SEC_TYPE="ext2" 
/dev/sda6: UUID="71712106-eef9-48c3-840f-20fb77173a9d" TYPE="swap" 
/dev/sdb2: LABEL="GAMEY2" UUID="4B89-0200" TYPE="vfat" 
/dev/sdc1: UUID="59ac55ab-93f8-4466-804d-57d1148b76e5" TYPE="ext3" 
/dev/sdc2: UUID="260834A7083477BF" LABEL="Media" TYPE="ntfs" 
</pre>

<p>You can also get the UUID of paritions by using <code>ls</code> :</p>

<pre>$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Feb  1 00:00 0e9c1455-4993-4ddf-a86a-a3dac116a5cc -> ../../sdc1
lrwxrwxrwx 1 root root 10 Feb  1 00:00 260834A7083477BF -> ../../sdb2
lrwxrwxrwx 1 root root 10 Feb  1 00:00 303889b7-ae78-436f-85ac-da95b2280596 -> ../../sda4
lrwxrwxrwx 1 root root 10 Feb  1 00:00 4B89-0200 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Feb  1 00:00 59ac55ab-93f8-4466-804d-57d1148b76e5 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Feb  1 00:00 71712106-eef9-48c3-840f-20fb77173a9d -> ../../sda6
lrwxrwxrwx 1 root root 10 Feb  1 00:00 a846c306-3114-403d-b893-a3e27704755a -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb  1 00:00 c03ce6c7-32ab-41e9-b603-da09acc0fbab -> ../../sda3
lrwxrwxrwx 1 root root 10 Feb  1 00:00 d6db1ae8-30d6-48ee-8a66-90912480e8be -> ../../sda5
</pre>

<p>You can see that FAT32 and NTFS partitions have different kinds of UUIDs, but it should work for our purposes. Now you just need to replace all references to the various /dev/sd? names with the correct UUID. This will remove all "randomness" from the boot order. Even if you currently have only one hard drive, you really should go to this "persistent" method of naming partitions, as you never know when you might add another.</p>

<p>In the <code>/etc/fstab</code>, replace /dev/sd? with UUID="uuid", like this:</p>

<pre>
#/dev/sda4
UUID="303889b7-ae78-436f-85ac-da95b2280596" / ext3 defaults 0 1
</pre>

<p>and in the <code>/boot/grub/menu.lst</code> file, replace it with the /dev/disk/by-uuid path, like this:</p>

<pre>kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/303889b7-ae78-436f-85ac-da95b2280596 ro vga=773</pre>

<p>The <a href="http://wiki.archlinux.org/">Arch Linux Wiki</a> has a very nice page on <em>Persistent block device naming</em> here: <a href="http://wiki.archlinux.org/index.php/Persistent_block_device_naming">http://goo.gl/GTWT</a>.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Glorious LXF126 Contest</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000939.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=939" title="Glorious LXF126 Contest" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.939</id>
    
    <published>2009-12-02T13:27:29Z</published>
    <updated>2009-12-02T14:04:54Z</updated>
    
    <summary> If you are the winner in my glorious Linux Format 2009 Christmas Issue giveaway, here&apos;s what you have to look forward to: Ultimate eye candy - a pretty interesting article on how to get the most dazzling display, whether you use Compiz, KDE, or GNOME. Despite my general disdain...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p><img alt="Linux Format #126 Cover Image" title="Linux Format #126" align="left" src="http://linux.amazingdev.com/blog/images/lxf126.jpg" width="155" height="210" />
If you are the winner in my glorious <a href="http://www.linuxformat.com" >Linux Format</a> <a href="http://www.linuxformat.com/archives?issue=126" >2009 Christmas Issue</a> giveaway, here's what you have to look forward to:</p>

<ul>
  <li><h3>Ultimate eye candy</h3> - a pretty interesting article on how to get the most dazzling display, whether you use Compiz, KDE, or GNOME. Despite my general disdain for eye candy, I would try the <a href="http://www.compiz.org/" >Compiz</a>/<a href="http://wiki.compiz.org/Decorators/Emerald" >Emerald</a> 3d window manager if it worked on dual monitors, but last I looked it didn't support them.</li>
  <li><h3>KDE distributions</h3> - coincidentally enough, just as I'm looking to move on up from my <a href="http://www.opensuse.org" >OpenSUSE</a> 11.0 install, along comes LXF with their KDE distro Roundup. I wouldn't have to go too far afield if I stayed with their winner, which is OpenSUSE 11.2, but I'm trying out a couple of other ones they regard highly, like <a href="http://www.sabayonlinux.org" >Sabayon</a> and <a href="http://www.sidux.com" >Sidux</a>. I'm a KDE man, so it works out well.</li>
  <li><h3>Get to grips with /proc and /sysfs</h3> - this is an excellent overview of the virtual filesystems /proc and /sysfs. </li>
  <li><h3>DVD Coverdisc</h3> - the DVD coverdisc includes live previews of the latest versions of KDE and GNOME, which is pretty cool. It also includes <a href="http://www.canonical.com/projects/ubuntu/unr" >Ubuntu Netbook Remix</a> (which I think I'll try on my Dell Mini), <a href="http://moblin.org" >Moblin</a> 2.0 and <a href="http://puppylinux.org" >Puppy Linux</a> 4.3.</li>
</ul>

<p>To enter my little contest, where I will mail you a pristine copy of LXF #126, along with the DVD coverdisc, just drop me an email at <a href="mailto:jdarnold@buddydog.org?Subject=LXF126%20Contest" >jdarnold@buddydog.org</a>. On Monday, Dec. 7th, probably in the evening, I will randomly select one entry and email you back asking for your mailing address and soon it will show up on your doorstep. Open to both of my international readers too :)</p>

<p>Oh, and I also heartily endorse subscribing to the magazine. Yeah, it's pretty expensive, but if you do it via the <a href="http://tuxradar.com" >TuxRadar</a> web page, you can cut it down to US$99 for 13 issues. And, as a subscriber, you get access to all the back issues in PDF format and they really have gotten their act together with it. The PDFs look great and they have a nice HTML page linking it all together. You won't be disappointed. </p>
]]>
        
    </content>
</entry>
<entry>
    <title>Contest and Projects</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000938.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=938" title="Contest and Projects" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.938</id>
    
    <published>2009-11-30T15:15:27Z</published>
    <updated>2009-12-02T13:33:27Z</updated>
    
    <summary>Due to a mix-up, I ended up with two copies of Linux Format #126, the Christmas 2009 issue. I figure I&apos;ll run my first ever contest here at Daemon Dancing - after over 6 years of writing on this blog, why not? Let&apos;s make it a simple one - just...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>Due to a mix-up, I ended up with two copies of <a href="http://linuxformat.com/" >Linux Format</a> <a href="http://linuxformat.com/archives?issue=126" >#126</a>, the Christmas 2009 issue. I figure I'll run my first ever contest here at Daemon Dancing - after over 6 years of writing on this blog, why not? Let's make it a simple one - just drop me an email at <a href="mailto:jdarnold@buddydog.org?Subject=LXF126%20Contest" >jdarnold@buddydog.org</a> and next Monday, when I get back from my work trip, I'll randomly select one entry to mail it out to. No strings attached and, believe you me, I won't be keeping your emails around! And heck, I'll even make it open internationally, just to make it even more likely I'll get at least one email entry:)</p>

<p>So I get a 1.5 out of 4 for my <a href="http://linux.amazingdev.com/blog/archives/000937.html" >holiday projects</a>. I did get the girls' computer up and running. The new power supply took a bit of forcing to get it to fit into the old case, but then it was up and running just fine. I was bit stumped as to what to install for an OS on it. For obvious reasons, the old Windows XP installed on the hard drive failed to boot. Really, all they do is play flash games on it at this point, save for R10.4 playing some <a href="http://www.dayofdefeat.com" >Day of Defeat</a> with me and my <a href="http://www.95thriflesclan.com/" >clan buddies</a>. So I moved her onto the Windows machine and had to pick a Linux for the new box. I went with OpenSUSE 11.2, as I'm most familiar with that and so it would require the least amount of thought. So far, so good.</p>

<p>I get a half a project because I did try to install a new Linux on my own box, but wasn't really happy with it. I installed the latest <a href="http://www.sabayonlinux.org/" >Sabayon</a> (v5.0), after being pretty impressed with how well the Live CD ran. But I immediately ran into a problem after the installation - GRUB refused to boot it up.</p>

<p>Because I run my own boot manager (<a href="http://www.terabyteunlimited.com/bootit-next-generation.htm" >TerraByte's BootIt NG</a>), I always install the GRUB boot loader onto the first block of the OS's boot partition. One test of an installer is just how hard this is to do, and I'm happy to report it wasn't too hard for the Sabayon installer - just select the Advanced Options and it was one of the choices. But on boot, I just saw "GRUB " and I knew immediately what the problem was. My machine is a homebrew one, with both old fashioned IDE drives and newfangled SATA drives and this isn't the first time an installer or LiveCD called the drives something different than what a full boot calls them.</p>

<p>Unfortunately, I had formatted the partition as an 'ext4' drive, so I couldn't get at it with my OpenSUSE 11.0 boot. And it may also have had something to do with why GRUB didn't work either.  So I redid the install using 'ext3' and still had the problem. After rebooting the Sabayon Live CD, the usual GRUB steps to fix a broken GRUB install didn't quite work:</p>

<pre># <strong>grub</strong>
grub> <em>find /boot/grub/stage1</em>
 (hd0,0)
 (hd0,3)
grub> <strong>root (hd0)</strong>
grub> <strong>setup (hd0,3)</strong>
....
grub> <strong>quit</strong>
</pre>

<p>I do the ",3" part to <code>(hd0,3)</code> so that it installs in the root block of partition 3 and not the root block of that whole hard drive, to not overwrite my own boot manager. But I knew this was still wrong, because after a "normal" boot, the boot drive is hd1, not hd0. I think there is a way to tell grub this using another parameter to the <code>setup</code> command, but I had a better idea - I just booted into my OpenSUSE boot and changed all 'hd0's to be 'hd1'. After booting, things got a little further, until I realized that the setup command doesn't seem to fix the /boot/grub/menu.lst file, so I had the make the same s/hd0/hd1/g change there too.</p>

<p>Now I was able to boot into Sabayon. And because they aren't afraid to install binary drivers, I got the nVidia drivers and was quickly able to turn on my second display, which was nice. But the update process left me a little mystified. I couldn't really figure out how to get it to select packages and install the updates. And even when it was downloading, it was incredibly slow and, in the end, didn't seem to do anything.</p>

<p>So in this age of instant gratification, I sort of gave up. I think I'll try the <a href="http://sidux.com/" >Sidux</a> distro next, although I should just stop wasting time and install <a href="http://www.opensuse.org" >OpenSUSE 11.2</a>, as that is the one I like and use.</p>
]]>
        
    </content>
</entry>
<entry>
    <title>Holiday Projects</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000937.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=937" title="Holiday Projects" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.937</id>
    
    <published>2009-11-27T14:29:57Z</published>
    <updated>2009-11-27T14:30:50Z</updated>
    
    <summary>So on this long weekend in the US, I have a few technology projects I hope to work on: Fix Girls&apos; Computer Their computer finally gave up the ghost a few weeks ago and they&apos;ve been using one of my work computers while I figured out what to do. I...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>So on this long weekend in the US, I have a few technology projects I hope to work on:
</p>

<h2>Fix Girls' Computer</H2>

<p>Their computer finally gave up the ghost a few weeks ago and they've been using one of my work computers while I figured out what to do. I picked up an AMD motherboard for cheap (US$120) from <a href="https://www.ascendtech.us/" >AscendTech.us</a>, that included an AMD 6000+ cpu and 1gb of RAM. What it did not include was any kind of manual, which kind of upset me. I think it is an ECS MCP61SM-AM motherboard, which isn't even listed on the ECS web site. But I did figure it out enough to get it put into the case, only to find out the power supply only has a 20 pin plug, and the new ones require a 24 pin plug. So I ordered a new power supply and now it awaits final assembly. Not sure what OS I'l put on it. Maybe I'll go back to <a href="http://www.qimo4kids.com/" >Qimo For Kids</a> again.</p>

<h2>Install New Linux</h2>

<p>My current <a href="http://opensuse.org" >openSUSE</a> installation is pretty old at this point. I did upgrade from 10.3 to 11.0 about a year ago, but since then I've managed to break it. An update was going too slow and eventually had to be abandoned, leaving it in a state where even the updater won't run. But it was time to start fresh anyway. Good timing, as <a href="http://linuxformat.com/" >Linux Format</a> #126 reviewed the "best" KDE4 distros. Not surprisingly to me, their #1 pick was OpenSUSE 11.2. But I also thought the Sidux and Sabayon distros sounded interesting, so I wanted to spend some time with those before picking one.</p>

<h2>Continue Linux From Scratch</h2>

<p>I also need to get back on the Linux From Scratch project. I have the toolchain all built and backed up, and am ready to begin Chapter Six and actually build the real copy. I have gotten a little sidetracked in the whole <em>package manager</em> discussion, but I think I'll just ignore it for now and try an install. If I want to go further, then I'll think more on a package manager. But I have really been enjoying the heck out of getting into the real guts of a Linux install.</p>

<h2>Work On Android</h2>

<p>One new toy I haven't talked about is my G1 (Google) phone from T-Mobile. I have actually had it about 8 months now. I really like it and one reason I bought it was for its open source development model. I have a couple of interesting little projects for it ready to go, but just haven't found the time to pursue. I'm not a huge fan of Java programming, but I think I know enough to get something running.</p>

<p>So who knows how many, if any of the above projects I'll get to. Well, I have to do the first one so I can get my test computer back, and it promises to be a cold rainy day here in the US Northeast, so I think I can definitely get that done. As for the rest....?</p>

]]>
        
    </content>
</entry>
<entry>
    <title>Scratching the Linux Itch, pt. II</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000936.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=936" title="Scratching the Linux Itch, pt. II" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.936</id>
    
    <published>2009-11-13T15:41:33Z</published>
    <updated>2009-11-16T13:24:55Z</updated>
    
    <summary>Finally, we get started building the system in Chapter 5. As mentioned in the last important point here, for every package done in Chapter 5, you need to do the following commands, as the &apos;lfs&apos; user: $ cd $LFS/sources lfs:/mnt/lfs/sources$ tar xjvf binutils-2.20.tar.bz2 lfs:/mnt/lfs/sources$ cd binutils-2.20 If the downloaded package...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>Finally, we get started building the system in Chapter 5. As mentioned in the last <strong>important</strong> point <a href="http://www.linuxfromscratch.org/lfs/view/development/chapter05/generalinstructions.html" >here</a>, for every package done in Chapter 5, you need to do the following commands, as the 'lfs' user:</p>

<pre>$ <strong>cd $LFS/sources</strong>
lfs:/mnt/lfs/sources$ <strong>tar xjvf binutils-2.20.tar.bz2</strong>
lfs:/mnt/lfs/sources$ <strong>cd binutils-2.20</strong>
</pre>

<p>If the downloaded package is a .gz file, then instead of 'xjvf', you do use 'xzvf' to untar it. 'j' uncompresses bz2 files while 'z' uncompresses .gz files. The untarring command is implied before you start each sub-chapter. I also finally figured out how to time multiple commands using the GNU time command (which has a nicer, seconds-only format) rather than the builtin bash 'time' command:</p>

<pre>$ <strong>\time -f "\\n================\\nTotal time: %e seconds\\n================" bash -c "../binutils-2.20/configure \
    --target=$LFS_TGT --prefix=/tools \
    --disable-nls --disable-werror && make && make install"</strong>
[.... many many commands later ....]

================
Total time: 146.24 seconds
================
$ <strong>\time -f "\\n================\\nTotal time: %e seconds\\n================" bash -c " ../gcc-4.4.2/configure \
    --target=$LFS_TGT --prefix=/tools \
    --disable-nls --disable-shared --disable-multilib \
    --disable-decimal-float --disable-threads \
    --disable-libmudflap --disable-libssp \
    --disable-libgomp --enable-languages=c && make && make install"</strong>
[....]
================
Total time: 678.12 seconds
================
</pre>

<p>I use <code>\time</code> to make sure I'm not using any builtin or alias command - this picks up GNUs /usr/bin/time (read more about finding the correct <code>time</code> in an <a href="http://linux.amazingdev.com/blog/archives/000873.html" >earlier post</a>). The <code>-f</code> option lets you specify a printf-like statement for formatting the output, so in this case I want it to just show seconds (%e). The real tricky part was how to get the multiple commands to run as one command, as <code>time</code> just times one single command. By invoking bash with its -c option, and quoting the entire rest of the line, we get it all together as one.</p>

<p>Oh, I also forgot to remove the source and build directories as specified in the book, so I needed to go back and do that for gcc and the binutils. And for the API headers, I understood it to mean that I needed to untar the linux-2.6.31.5.tar.bz2 file. And actually, that's one of the gotchas mentioned in the <a href="http://www.tuxradar.com/content/build-your-own-linux-distribution-easy-way" >Linux Format's</a> article:</p>

<blockquote><h3>Kernel API headers</h3>
<p>A common mistake is to expect the kernel API headers to be in their own package. This is not the case - you will need to extract the kernel source package (usually of the form linux-2.6.x.tar.bz2) and then move into the extracted directory to follow the steps in the ebook.</p></blockquote>

<p>For the binutils Pass 2 build, I needed to tweak the line a bit because of quoting problems:</p>

<pre> $ <strong>\time -f "\\n================\\nTotal time: %e seconds\\n================" bash -c "CC=\"$LFS_TGT-gcc -B/tools/lib/\" \
   AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \
   ../binutils-2.20/configure --prefix=/tools \
   --disable-nls --with-lib-path=/tools/lib && make && make install"</strong>
[.....]
================
Total time: 135.00 seconds
================
</pre>

<p>Note the \" ...\" for the CC= line. This is so that it gets passed along correctly to the bash shell that gets run. I do wonder if the SBU time used should include the last 2 make commands specified on the binutils, Pass 2 page though. To get the current status of the SBUs for my system, you can see it <a href="http://www.linuxfromscratch.org/~sbu/view.php?sysid=352" >here</a>.</p>

<p>And I do know what LXF means when one of their caveats says to be careful with getting lulled into feeling it is always <code>./configure --prefix=/tools</code>! I have changed my sample timing command to be:</p>

<pre>\time -f "\\n================\\nTotal time: %e seconds\\n================" bash -c "./configure --prefix=/tools && make && make install"</pre>

<p>I have this in a file and I just copy / paste while running it in an Emacs shell. But every now and then, a configure slips in that wants just a little more...</p>

<p>I finished up with <a href="http://www.linuxfromscratch.org/lfs/view/development/chapter05/chapter05.html" >Chapter 5: Constructing a Temporary System</a> without too many problems. I've really been enjoying the in depth exploration of exactly what gets built and why. I do wonder about some of the unapplied patches though. Perhaps because it is just the "bootstrap" system, they aren't important at this point. I also thought it very quaint that the book worries about disk space and gives advice on how to save a whole 95mb by stripping the apps and removing some doc files:)</p>

<p><strong>Edit:</strong> turns out the manual, not surprisingly, does talk about the unapplied patches <a href="http://www.linuxfromscratch.org/lfs/view/development/chapter05/generalinstructions.html" >here:</a>:

<blockquote>Several of the packages are patched before compilation, but only when the patch is needed to circumvent a problem. A patch is often needed in both this and the next chapter, but sometimes in only one or the other. Therefore, do not be concerned if instructions for a downloaded patch seem to be missing</blockquote></p>

<p>The series so far:</p>
<ol>
<li><a href="http://linux.amazingdev.com/blog/archives/000935.html">Scratching the Linux Itch, pt. I</a></li>
<li><a href="http://linux.amazingdev.com/blog/archives/000936.html">Scratching the Linux Itch, pt. II</a></li>
</ol>
]]>
        
    </content>
</entry>
<entry>
    <title>Scratching the Linux Itch, pt. I</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000935.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=935" title="Scratching the Linux Itch, pt. I" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.935</id>
    
    <published>2009-11-12T15:36:15Z</published>
    <updated>2009-11-16T13:22:52Z</updated>
    
    <summary>So I&apos;m going to try a Linux From Scratch build and installation, just because I need another pointless project to write about :) Here is the result of my version-check.sh script on my openSUSE 11.0 system: bash, version 3.2.39(1)-release /bin/sh -&gt; /bin/bash Binutils: (GNU Binutils; openSUSE 11.0) 2.18.50.20080409-11.1 bison (GNU...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>So I'm going to try a <a href="http://www.linuxfromscratch.org" >Linux From Scratch</a> build and installation, just because I need another pointless project to write about :)</p>

<p>Here is the result of my <a href="http://linux.amazingdev.com/blog/archives/version-check.sh" >version-check.sh</a> script on my openSUSE 11.0 system:</p>

<pre>
bash, version 3.2.39(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils; openSUSE 11.0) 2.18.50.20080409-11.1
bison (GNU Bison) 2.3
/usr/bin/yacc -> /usr/bin/yacc
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  6.11
diff (GNU diffutils) 2.8.7-cvs
find (GNU findutils) 4.4.0
GNU Awk 3.1.5h
/usr/bin/awk -> /bin/gawk
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
GNU C Library stable release version 2.8
GNU grep 2.5.2
gzip 1.3.12
Linux version 2.6.25.20-0.5-pae (geeko@buildhost) (gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision
    135036] (SUSE Linux) ) #1 SMP 2009-08-14 01:48:11 +0200
m4 (GNU M4) 1.4.11
GNU Make 3.81
patch 2.5.9
Perl version='5.10.0';
GNU sed version 4.1.5
tar (GNU tar) 1.19
makeinfo (GNU texinfo) 4.11
Compilation OK
</pre>

<p>So it looks pretty good so far. It's always scary when reformatting an existing partition. I have 3 primary 50gb partitions on a 250gb hard drive used to play with Linux distros. The fourth partition is an extended one with 2 logical partitions, a 90gb /home partition and a 2gb Swap. One of the primary partitions houses my regular distro, openSUSE 11.0, while the other 2 currently have an openSUSE 11.1 and an Ubuntu 9.04, neither of which I've used recently. So I'll just use the Ubuntu one, which is /dev/sdb3, and already created, so I just need to reformat it:</p>

<pre># <strong>mke2fs -jv /dev/sdb3</strong>
mke2fs 1.40.8 (13-Mar-2008)
Warning: 256-byte inodes not usable on older systems
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2883584 inodes, 11520613 blocks
576030 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
352 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
</pre>

<p>So far so good. Mount it on /mnt/lfs and we're good to go. On to chapter 3.</p>

<p>One small confusion about getting the matching packages is that while the manual says that an easy way to download all the packages is "by using wget-list as an input to wget", only they don't explain what that means. So here's what I did: </p>

<pre># <strong>cd $LFS/sources</strong>
# <strong>wget -i wget-list</strong>

[... 77 downloads later ...]

FINISHED --2009-11-12 09:22:42--
Downloaded: 77 files, 257M in 39m 57s (110 KB/s)
</pre>

<p>Actually, it turns out there is a slight clarification in the FAQ <a href="http://www.linuxfromscratch.org/lfs/faq.html#wget" >here</a>, although they still don't clearly mention that you should cd into the $LFS/sources folder before doing the <code>wget</code> command. Maybe getting a little too anal but I think every little bit helps. So it took about 40 minutes to download all 77 packages. Now, onto Chapter 4, <em>Final Preparations</em>.</p>

<p>My next bit of anal retentiveness comes in the section 4.4, <em>Setting Up the Environment</em>. The book suggests a way to create a .bash_profile that restarts the bash shell in a "good" (ie, clean) working environment. But it doesn't really help in my openSUSE distro, because there is a system wide /etc/bash.bashrc that gets executed, "cluttering" up the environment even when the system wide /etc/profile isn't executed. So I modified the .bash_profile to be: </p>

<pre>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash --norc ./bash-startup</pre>

<p>The <code>--norc</code> prevents both the system and the user .bashrc file from executing. And I copied the .bashrc file they say to create to <code>bash-startup</code>, and appended a couple of lines, leaving me with:</p>

<pre>set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH

# my added lines to create a brand new, empty shell:
export PS1='\u:\w\$ '
exec bash --norc --noprofile</pre>

<p>So I added the PS1 export and then re-exec bash, this time with neither the rc files or the profile files getting executed, just to be safe. Even then, there are a bunch of environment variables, but I think they are just ones that bash sets up for itself:</p>

<pre>$ <strong>su - lfs</strong>
Password: 
lfs:~$ <strong>set</strong>
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="39" [3]="1" [4]="release" [5]="i586-suse-linux-gnu")
BASH_VERSION='3.2.39(1)-release'
COLUMNS=80
DIRSTACK=()
EUID=1003
GROUPS=()
HISTFILE=/home/lfs/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/lfs
HOSTNAME=touch
HOSTTYPE=i586
IFS=$' \t\n'
LC_ALL=POSIX
LFS=/mnt/lfs
LFS_TGT=i686-lfs-linux-gnu
LINES=24
MACHTYPE=i586-suse-linux-gnu
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/tools/bin:/bin:/usr/bin
PPID=16656
PS1='\u:\w\$ '
PS2='> '
PS4='+ '
PWD=/home/lfs
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
TERM=vt100
UID=1003
_=bash
lfs:~$ </pre>

<p>Now that the environment is set, time to move on to Chapter 5. </p>

<p>The series so far:</p>
<ol>
<li><a href="http://linux.amazingdev.com/blog/archives/000935.html">Scratching the Linux Itch, pt. I</a></li>
<li><a href="http://linux.amazingdev.com/blog/archives/000936.html">Scratching the Linux Itch, pt. II</a></li>
</ol>
]]>
        
    </content>
</entry>
<entry>
    <title>Linux Format 125</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000934.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=934" title="Linux Format 125" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.934</id>
    
    <published>2009-11-10T15:53:59Z</published>
    <updated>2009-11-10T18:40:02Z</updated>
    
    <summary> My favorite Linux magazine, by far, is Linux Format, a UK based magazine that is just chock-a-block full of great Linux info. They also run the informative Tux Radar blog. So I thought I would just give a rundown each month of the highlights from the most recent issue....</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<img alt="Linux Format Dec 2009 Cover" title="Linux Format Dec 2009 Cover" src="http://linux.amazingdev.com/blog/images/125.jpg" width="155" height="210" align="left"/>
<p>My favorite Linux magazine, by far, is <a href="http://www.linuxformat.co.uk/" >Linux Format</a>, a UK based magazine that is just chock-a-block full of great Linux info. They also run the informative <a href="http://www.tuxradar.com" >Tux Radar</a> blog. So I thought I would just give a rundown each month of the highlights from the most recent issue.
</p>
<p>In issue 125, dated December 2009, the cover story is <em>Remix Linux</em> and there's some great stuff in there about creating your own personal distro. They start with apps that let you create your own mix, working from the <a href="http://uck.sourceforge.net/" >Ubuntu Customization Kit</a> (or <em>UCK</em> for short), thru <a href="http://susestudio.com/" >SUSE Studio</a>, and include quick shoutouts for <a href="http://pcplus.techradar.com/node/3020" >Revisor</a> (the Fedora <em>UCK</em> equivalent) and <a href="http://www.installinux.com" >InstalLinux.com</a>, a cool web site for building a distro.
</p>
<p>The next step is to build your own <a href="http://www.archlinux.org" >Arch Linux</a> version. Looks involved but you get pretty much complete control. And speaking of hard core, the final step is a project I've always had on my back burner - <a href="http://www.linuxfromscratch.org/" >Linux From Scratch</a>. Here you build it all from sources, beginning with GCC. Follow along with the ebook and see what happens! Better than a video game, even.
</p>
<p>My favorite sections, being the "app-aholic" I am, are the Reviews and the Hotpicks, along with the Roundup, where they examine a bunch of apps dedicated to one purpose. This month, they looked at collection managers, and, being the packrat I am, I'm hoping to give this month's winner, <a href="http://www.gcstar.org/" >GCStar</a> a whirl, esp. after finding it in the openSUSE 11.0 KDE4 repository. I also tried to compile <a href="http://choqok.gnufolks.org/" >Choqok</a>, a Twitter client, directly from the development snapshot, but my current installation as KDE3 just doesn't seem to like compiling this KDE4 app. Other interesting apps this month include <a href="http://bilbo.gnufolks.org/" >Bilbo</a> (a blogging client now called Blogilo), <a href="http://booh.org" >Booh</a> (generate static web albums ready to upload straight to your website), <a href="http://jampa.sourceforge.net/" >Jampa</a> (Yet Another music player), <a href="http://digitaldump.wordpress.com/projects/rednotebook/" >Rednotebook</a> (a diary, journal and notebook), and <a href="http://kmymoney2.sourceforge.net/index-gen.html" >KMyMoney</a> (a personal finance package). I played a bit with KMyMoney (again) but got stumped when I couldn't figure out how to import .OXF files. Also disappointing there's no kind of web connect, but maybe I'll get back to it.
</p>
<p>There's also several great tutorials, including writing a Python script to get Google data and getting your backups straightened out using <a href="http://backuppc.sourceforge.net/" >Backup PC</a> (although I've always leaned towards <a href="http://www.bacula.org" >Bacula</a> myself).
</p>
<p>All in all, a great deal, even for US$99 (go <a href="http://www.myfavouritemagazines.co.uk/home/mpurchase.asp?m=793&src=2009" >here</a> for that deal). You get 13 issues a year, plus a jam packed DVD in each issue, plus access to all the back issues in PDF form. The best deal in Linux!
</p>]]>
        
    </content>
</entry>
<entry>
    <title>Mysterious Icewind Port</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000933.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=933" title="Mysterious Icewind Port" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.933</id>
    
    <published>2009-07-23T23:13:48Z</published>
    <updated>2009-07-23T23:20:34Z</updated>
    
    <summary>This doesn&apos;t really have anything to do with Linux, but I needed to put this down somewhere so maybe it would help someone else. My friend and I like to play &quot;hardcore&quot; computer RPG games, cooperative style, across the Internet. We have a weekly session, playing for a couple of...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>This doesn't really have anything to do with Linux, but I needed to put this down somewhere so maybe it would help someone else. My friend and I like to play "hardcore" computer RPG games, cooperative style, across the Internet. We have a weekly session, playing for a couple of hours. It's the only way, really, that I would ever complete a game, as I just don't have the persistence to do it myself. I play a bit, and pretty much irregardless of how good or bad the game is, I'm always flying off, checking the next game.</p>

<p>Anyway, we finished <a href="http://www.gamespot.com/pc/rpg/neverwinternights/index.html" >Neverwinter Nights</a> (we don't mind playing lagging edge games) and went on to play <a href="http://www.gamespot.com/pc/rpg/sacred/index.html" >Sacred</a>, which we picked up for cheap at the wonderful <a href="http://www.gogo.com" >GoG</a> (<b>G</b>rand <b>O</b>ld <b>G</b>ames) site. It was fun for the first few weeks, but then there started to be problems with the lobby server, as it isn't a direct connect game. It had become a bit of a grind, anyway, so we started looking about for a new game to play.</p>

<p>Unfortunately, classic, hard-core, cooperative RPG games are few and far between these days. The definitive site for all thing co-op, <a href="http://www.Co-optimus.com" >Co-optimus</a> has almost no entries at all for even an action RPG to play co-op. Not sure why the well has dried up. So we decided to go really olde school and try the classic <a href="http://www.gamespot.com/pc/rpg/baldursgate/index.html" >Baldur's Gate</a>. Many years ago, in a galaxy far far away, I actually played this a bit across the 'net, but I've never really played it all that much. As I had two copies of it, I gave one to my buddy and we sat down to play it.</p>

<p>But we played the "Figure Out The Router/Firewall" game instead. For the next 2 hours, we tried to figure out why I couldn't connect to his server. This worked fine for both NWN and Sacred, but whenever I would type in his IP address, BG would just pause for a long time, and the come back with "Cannot Connect To Game Session". As my router is a virtually impossible to configure Juniper Netscreen router, he was hosting the games on his side. He made sure all the ports <a href="http://www.bioware.com/games/baldurs_gate/support/faq/index.html?faqID=42#1.02" >mentioned</a> were opened, all to no avail. As well as the "official" ports (2300-2400 & 6073), <a href="http://forums.bioware.com/viewtopic.html?topic=260571&forum=11" >someone</a> also mentioned ports 1470, 15000, and, most importantly, ports 47624-49672. Not sure about those, but port 47624 is the <a href="http://en.wikipedia.org/wiki/DirectPlay" >DirectPlay</a> port, so I'm not sure why this doesn't show up in the official docs. </p>

<p>But despite all these efforts, we just couldn't get our <em>Baldur's Gate</em> games to connect. So last night, we tried <a href="http://www.gamespot.com/pc/rpg/icewinddale/index.html" >Icewind Dale</a>. Still a wonderful RPG (in fact, I like it more than <em>Baldur's Gate</em>, despite, or perhaps because of, its more linear and hack-n-slash nature), but a slightly newer engine, esp. when updated with the <a href="http://www.gamespot.com/pc/rpg/icewinddaleheartofwinter/index.html" >Heart of Winter</a> expansion and its <em>Trials of Luremaster</em> patch/expansion. So we were hoping the updated engine would be more cooperative.</p>

<p>But, alas, we were wrong. I still got the dreaded "Cannot Connect" error. So we then tried <a href="https://secure.logmein.com/products/hamachi/vpn.asp?lang=en" >Hamachi</a>, a free VPN software. Still no go. As he's a network wonk, I was sure the firewall and router was correct on his end. And I don't run a firewall at all (don't really need one if you are behind a NAT router), so it had to be my <a href="http://forum.wegotserved.com/index.php?showtopic=539" >"user unfriendly pain in the butt to configure"</a> Juniper Netgear NS5GT router. I fired up <a href="http://www.wireshark.org/" >Wireshark</a> (<em>nee</em> Ethereal) and began sniffing packets.</p>

<p>I hosted the game on another internal computer and sniffed the traffic, comparing it to the packets I was sending and receiving to my friend's machine. It was then I noticed something odd - my machine would send out a DirectPlay packet on port 47624, but it would get back the response on port 2300 on my internal connection but, of course, it wouldn't get it back from my friend's computer, because routers will allow a response on the same port but not a different one.</p>

<p>So I rolled up my sleeves, used some Black Belt Google Fu and found <a href="http://www.alex-esko.de/netscreenportforwarding.html" >this page</a> that describes the dozen or so steps(!) you need to go through to get it to work. I added 2300 & 47624 to my "Infinity Engine" Custom Service Object, and set the policy to forward it to my game playing machine. This got me connected but not for long. Turns out, I needed to add 2350 as well. I tried to add 2300-2400, as recommended somewhere, but the Juniper Netgear complained about not enough ports in the pool, whatever the hell that means.</p>

<p>And now it works. So, the basic fix is to make sure that <b>both</b> players port forward UDP and TCP traffic for the ports mentioned <a href="http://www.bioware.com/games/baldurs_gate/support/faq/index.html?faqID=42" >here</a> (2300-2400, 6073) <b>and</b> 47624 (the DirectPlay port). I'm not sure what 6073 is for, as I don't think either of us have it set up - maybe that's an old DirectPlay service port? Yup, it is according to <a href="http://www.auditmypc.com/port/udp-port-6073.asp" >this</a> (DirectPlay 8), while it say <a href="http://www.auditmypc.com/port/udp-port-47624.asp" >47624</a> is "directplaysrvr". Not sure what the difference is, unless one is a fallback for the other. At the very least, forward ports 2300 & 2350 - I think it uses the second one by default and will only use a different one if it finds that port is busy.</p>]]>
        
    </content>
</entry>
<entry>
    <title>Creator and emacsclient</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000932.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=932" title="Creator and emacsclient" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.932</id>
    
    <published>2009-07-02T16:56:31Z</published>
    <updated>2009-07-02T17:01:35Z</updated>
    
    <summary>Some notes on using emacsclient on KDE, as I&apos;m trying to integrate it with Qt Creator, because Qt Creator doesn&apos;t have Emacs key bindings (so far, my biggest gripe). There&apos;s an albeit painful keystroke to pass the current file off to an external editor, so I&apos;m trying to get it...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>Some notes on using <a href="http://www.emacswiki.org/emacs/EmacsClient" >emacsclient</a> on KDE, as I'm trying to integrate it with <a href="http://en.wikipedia.org/wiki/Qt_Creator" >Qt Creator</a>, because <em>Qt Creator</em> doesn't have Emacs key bindings (so far, my biggest gripe). There's an albeit painful keystroke to pass the current file off to an external editor, so I'm trying to get it to work with <em>emacsclient</em>. So far, here's my external editor command:</p>

<p><pre>emacsclient -n +%l:%c %f</pre></p>

<p>The -n tells it to not wait for the server to relinquish control of the file - I just want to edit it. <code>+%l:%c</code> says set the cursor at the line,column specified. The Info and Man pages for emacsclient don't specify this correctly, as they are both missing the colon.</p>

<p>Now I'm trying to figure out how to bring it to the front. Burying Emacs behind a bunch of windows isn't much help. I did come across a pretty cool KDE keyboard shortcut - Ctrl-Alt-A - which brings to the front the window "demanding attention", but that's not all that much help. Unfortunately, it doesn't look like a problem that has been solved for these window managers that don't allow "focus stealing".</p>

]]>
        
    </content>
</entry>
<entry>
    <title>Information Please</title>
    <link rel="alternate" type="text/html" href="http://linux.amazingdev.com/blog/archives/000931.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.amazingdev.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=931" title="Information Please" />
    <id>tag:linux.amazingdev.com,2009:/blog//1.931</id>
    
    <published>2009-06-23T15:01:14Z</published>
    <updated>2009-06-23T15:46:30Z</updated>
    
    <summary>An article on Lifehacker featured an interesting utility called iotop, which gives a birds eye view of what your hard drive is up to. The commentors mentioned a couple of other interesting tools, although many seemed to be confused as to what iotop is measuring as opposed to some of...</summary>
    <author>
        <name>Jonathan Arnold</name>
        <uri>http://www.anaze.us/jiggle/</uri>
    </author>
            <category term="Note" />
    
    <content type="html" xml:lang="en" xml:base="http://linux.amazingdev.com/blog/">
        <![CDATA[<p>An <a href="http://lifehacker.com/5291974/iotop-tells-you-what-process-is-grinding-your-hard-drive" >article</a> on Lifehacker featured an interesting utility called <a href="http://guichaz.free.fr/iotop/" >iotop</a>, which gives a birds eye view of what your hard drive is up to. The commentors mentioned a couple of other interesting tools, although many seemed to be confused as to what iotop is measuring as opposed to some of the other utilities. I thought I'd do a quick write up about a few of these command line machine status reporters.</p>

<p>The most basic status tool is, of course, <a href="http://linux.die.net/man/1/ps" >ps</a>. In number of options, it competes with <a href="http://linux.die.net/man/1/ls" >ls</a> for most in the Linux manual! This is because it has 3 different command "modes" - UNIX, BSD and GNU versions, and all are usually mutually incompatible. <em>ps</em> gives you a basic snapshot of what programs are being run.</p>

<p>While <em>ps</em> is always around, the rest of these usually need special installation, although the next one, <a href="http://linux.die.net/man/1/top" >top</a>, is almost always around. <em>top</em> adds more information but, most importantly, runs in a <a href="http://linux.die.net/man/3/ncurses" >curses</a> display, so it stays around and updates itself, giving you a constant view of what your CPU is up to. You can see it change dynamically as programs work your CPU harder. Use the 'h' key to display a help screen, giving you more sorting and display options.</p>

<center><a href="http://linux.amazingdev.com/blog/images/top.html" onclick="window.open('http://linux.amazingdev.com/blog/images/top.html','popup','width=1152,height=505,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View top in action</a></center>

<p>The most flexible version of <em>ps</em> is <a href="http://linux.die.net/man/1/htop" >htop</a>. This gives you even more information, more sorting options and an even better <em>curses</em> display.  Again, use the 'h' command to get a full help display. I especially like <em>htop</em> for how it displays the complete command line. </p>

<center><a href="http://linux.amazingdev.com/blog/images/htop.html" onclick="window.open('http://linux.amazingdev.com/blog/images/htop.html','popup','width=1152,height=505,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View htop in action</a></center>

<p><a href="http://linux.die.net/man/8/iftop" >iftop</a> uses a <em>top</em>-like display to show you what is going on in your network (your <b>i</b>nter<b>f</b>ace). It displays the various network requests, who is making them and how much is coming and going on each. This is an especially useful command on a server, as you can see what your web server is working on, and keep useful totals.</p>
<center><a href="http://linux.amazingdev.com/blog/images/iftop.html" onclick="window.open('http://linux.amazingdev.com/blog/images/iftop.html','popup','width=1152,height=505,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View iftop in action</a>

</center>

<p><a href="http://guichaz.free.fr/iotop/" >iotop</a> again uses a <em>top</em>-like display to give you a real time, in-depth view of disk I/O. This is an especially useful diagnostic tool if you notice your hard disk is "thrashing" - ie, the red access light is doing a disco-like strobe effect and you're wondering who is doing all that hard drive dancing.</p>

<center><a href="http://linux.amazingdev.com/blog/images/iotop.html" onclick="window.open('http://linux.amazingdev.com/blog/images/iotop.html','popup','width=1152,height=505,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View iotop in action</a>

</center>
<p><a href="http://linux.die.net/man/1/saidar" >saidar</a> is another monitoring tool that shows a nice overview of everything going on in your computer. Useful information like CPU load, swap usage, disk space, and network traffic. Good quick clean overview.</p>
<center><a href="http://linux.amazingdev.com/blog/images/saidar.html" onclick="window.open('http://linux.amazingdev.com/blog/images/saidar.html','popup','width=1152,height=505,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">View saidar in action</a></center>

<p>Next time, perhaps I'll take a look at some of the graphical system monitoring tools available for KDE and GNOME. If you have any other favorite terminal-based monitors, please mention them in the comments.</p>
]]>
        
    </content>
</entry>

</feed> 

