Linux Resources

This is the page where I document hacks and projects related to Linux. I'll start adding things little by little, and hopefully this part of my page will be pretty useful before too long. If you haven't heard of Linux, this probably won't be terribly interesting to you, but for your information Linux is a free operating system which is much superior to Microsoft Windows in many ways.

My Linux Background

I started using the Internet (but not the WWW) in late 1993, and I started using UNIX in late 1994 or so (though through my dad I had been exposed to it much earlier). I first installed Linux (it was Slackware) somewhere around 1995. Eventually I tried Caldera, Redhat, Corel, Debian, and Gentoo. Now I mostly use Debian/Ubuntu and Fedora. As far as other Unix variants go, I've used quite a bit of Solaris, IRIX, and Mac OS X, and I've run into Ultrix, HP/UX, AIX, and *BSD.

My Contributions

Linux at Home

Universal Boot Drive
Instructions on how to create a bootable USB flash drive that can load Memtest86+ and install or rescue images for Fedora.
Dansguardian Tips
I've run into a few problems that are hard to track down. Hopefully this will help someone out there.
Mindguard for Gentoo
Mindguard is awesome. It's one of the funniest programs I've ever seen, and the source code provides even more entertainment. I've actually met someone who wanted to install Linux just so they could use Mindguard--they really believed it. Anyway, if you use Gentoo, untar mindguard.tar.bz2 into /usr/local/portage/games-misc/ and make sure that you have /usr/local/portage setup in /etc/make.conf as a Portage overlay (PORTDIR_OVERLAY=/usr/local/portage). Then 'ACCEPT_KEYWORDS="~x86" emerge mindguard' and feel at peace.

LaTeX, etc.

Making a Resume in LaTeX
I created a flexible LaTeX template for resumes. Content and presentation are separated, so it's very maintainable and customizable.
Lilypond for Bagpipe Music
Lilypond produces beautiful printed music, and now it works well for bagpipe music, too.


Hardware Recommendations and Warnings
There's good hardware and bad hardware, and I've run into my fair share of both of them. I'm starting to keep track of my experiences so others can save time and cut back on stress.
Linux on the Compaq ProLiant DL360
The ProLiant DL360 is a cool but odd machine. I've recorded some tips for getting Linux running smoothly on it.


Observations from installing DSPAM on an Redhat Enterprise Linux/CentOS box with Postfix, DSPAM web-based management, retraining with bouncing/forwarding, etc.


Python by Examples
Python is my language of choice for most projects. There are lots of pages about Python, but I decided to try an experiment. This page introduces Python to programmers of other languages by giving a list of examples accompanied by terse descriptions. The idea is that you can quickly get a sense of the language and its corner cases. Let me know if you like it or dislike it.
Named Pipe Mystery
Sometimes you just don't have any hope of figuring out something on your own. Here's my most annoying bug ever.
Shell Hacks and Examples
It's amazing what you can do with a shell. Here are a bunch of random but cool one to two liners. Some of them are very common, but others are pretty creative.
Dr. Strange OS or How I Learned to Stop Worrying and Love Unix
[In progress]. Notes from a UUG Presentation given Feb. 17, 2005.

Mac OS X

X11 on Mac OS X
If you want to set up a fullscreen X11 session on Mac OS X, your configuration will be different than it would be in Linux. I've explained some configuration issues with solutions.
In addition to a fullscreen X session, I like to be able to have X applications blend with Aqua apps by being managed by QuartzWM in rootless mode. Apple's makes it difficult to have two X11 servers running at the same time with different configurations. I wrote to make it easy.

Config Files

I have a git repository with all of my config files. It contains, among other things, a bin directory and a dotfiles directory. My ~/bin directory contains a symlink to each file in ~/config/bin, so that any important scripts I write are checked into version control. I suppose I should probably just add ~/config/bin to my path. Anyway, the dotfiles directory contains a bunch of files such as zshrc, bashrc, procmailrc, and so forth. For each file in dotfiles, there is a symlink in my home directory. For example, there is a link at ~/.zshrc pointing to ~/config/dotfiles/zshrc. My script automatically creates all of these symbolic links.

Whenever I get a new account, I scp over and run This script checks out my config.git repository and runs Thus, it only takes two commands to get my entire config environment set up.

Here are a couple of my config files:

I like zsh a lot more than bash. It seems to work better overall, and it has some more features. I use the same .zshrc on all of my systems, so it has checks whenever the behavior needs to change for different computers.
Some machines don't have zsh, so I still keep a bashrc around.
I have an "shrc" that contains all of the configuration that is common to both zsh and bash. This file sets my PATH, PYTHONPATH, aliases, etc. I'm in a bad habit of typing "vi" instead of "vim", which usually works fine but sometimes starts up a dumbed-down editor. So I have a function that makes it fail when I type "vi". It took me about a month to learn to type "vim" exclusively.
I used to use evilwm, which is a minimalist window manager. I like it because it's clean and simple. However, it's annoying to have to install it on every machine, and sometimes I like to have some more advanced features, such as the NetworkManager applet. So I wrote a Metacity theme that makes Gnome look like EvilWM. I have two EvilGnome screenshots, screenshot1.png and screenshot2.png. Enjoy.
My xsession file sets a lot of gconf settings. It would still be nicer if Gnome used flat-file config files, but this is better than nothing, I guess.
xbindkeysrc and xbindkeysrc-ppclinux
XBindKeys is a program that lets you setup hotkeys. I use my blank key (scratched off windows key). Blank-W starts a web browser, Blank-T starts a terminal, Blank-M starts a music player, Blank-Z changes my background image, etc. XBindKeys is incredibly simple, and it's much faster than using menus.
xmodmap-dvorak and xmodmap-qwerty
For most stuff I use the dvorak keyboard layout. I've had way to many problems with setxkbmap, so I use Xmodmap. I've also had problems with other people's xmodmap files, so I just went and made my own. They're pretty simple.
On my laptop, which is a 12-inch PowerBook, I have it set up so the caps lock key is a control, the left ctrl key is a right click, and if I hold down on Fn and hit the left ctrl key, it's a middle click. I had to write a kernel patch to get the caps lock key to work as a control key, but the patch was included in Linux 2.6.24. I just have the following line in /etc/rc.local, "echo 1 >/sys/module/adbhid/parameters/restore_capslock_events".
My Vim configuration is still a work in progress. It handles email really nicely, with auto-formatting (especially nice when editing comments). Thanks to Hans Fugal for his template and for a lot of his ideas.
In addition to the main muttrc file, I have split off several other files for clarity. My mutt-bindings file helps make Mutt more friendly for people who have come from Pine (and probably has some other keybindings as well). My mutt-pgp file makes PGP work in Mutt. You may have to change some pathnames in there. I need to clean it up. By the way, you should not use the muttrc as is. It has some specific stuff like my email address in there that wouldn't work well for anyone else. Also, I haven't done anything about colors yet.

Linux-related Web Links

These are mostly for my own personal reference.

GNU/Linux Links

BZFlag Remote Control
One of my many current projects is adding remote control capabilities to bot tanks in BZFlag. This is being used in CS 470 (Intro to AI) at BYU.
BYU CS Documentation Project
In my work with the BYU CS Department, I've contributed some howtos for the Department Documentation Project, where you can find some really good tutorials related to Linux and programming.
LaTeX Makefile
Chris Monson has made a generic LaTeX Makefile. It knows how to process XFig and GNUplot files, etc. It even does colorized LaTeX logging now, to make it easier to see overfilled boxes and page counts.
BYU Unix Users Group
I'm a member of the BYU Unix Users Group, a club that promotes Linux and other UNIX-related stuff. It's a fun group.
Jason Holt designed a simple board that makes it easy to interface a computer with the real world. It communicates over a serial port and has input and output pins and relays. I made myself one with his help, and I highly recommend it.