HOW-TOs

Creating KVTML Files

KWordQuiz, KVocTrain, and other KDE-based programs use the KVTML file format for their data files. The format is just a fairly simple XML format but, unfortunately, there doesn't seem to be anything available to convert a text file to this format. So, once again, AWK to the rescue.

Speed Up Multiple SSH Connections to the Same Server

If you run a lot of terminal tabs or scripts that all need to make OpenSSH connections to the same server, you can speed them all up with multiplexing: making the first one act as the master and letting the others share its TCP connection to the server.

Starting, Stopping, and Connecting to OpenOffice with Python

Using pyuno you can script OpenOffice with Python. Pyuno allows you to create macros inside OpenOffice and it also allows you to create external Python scripts that talk to a running copy of OpenOffice. If you want to get started with pyuno be prepared for an often frustrating experience: the documentation is sketchy and

Handling CSV Files in Python

As a buddy of mine always says "the nice thing about standards is that there's so many to choose from". Take CSV files for example. CSV, of course, stands for "Comma Separated Values", more often than not though, it seems that CSV files use tabs to separate values rather than commas.

Running DOS Programs on Linux: Duke Nukem Lives!

If I play video games they're usually pretty low tech ones. One of the few games I miss from the old days is Duke Nukem, and I'm talking about the Duke before he went 3D. If you have an old DOS game that you'd like to run, or for that matter any old DOS program, check out DOSBox. Even if you don't have any DOS programs that you'd like to run, you might want to try downloading some of the old DOS games that are now available free online.

Dealing with Command Line Options in Python

I just wrote a bit of Python to generate some reports from the contents of a database. The one program that was more than just "display the data" was the one to print the transaction log. It included some sub-totals for various fields and paginated output. The one task remaining was to give it some options. That is, to pass it some criteria that would modify the report.

Use the date Command to Measure Elapsed Time

When running bash scripts that take a long time to run it's often useful to know how long it took for the script to run. In addition to the overall run time, it's also often useful to know how long certain parts of the script took to run. The time command doesn't really help because it's meant to time a single command, not a sequence of commands. By using the %s format

Interrogating a Linux Machine

The other day, a client called upon me to perform a hardware and software inventory on all of the computers on his network. There weren't that many machines to inventory, but we needed to gather quite a bit of information about each one.

Improve Your Intelligence with Brain Workshop

Everywhere you turn there are "brain training" games that claim to help you "lower your brain age" or "boost your brain power" and other such marketing hyperbole. Much like saying a certain breakfast cereal is "more satisfying" than other cereals, these claims are basically meaningless.

Bash Sub Shells

When writing bash scripts you sometimes need to run commands in the background. This is easily accomplished by appending the command line to be run in the background with an ampersand "&". But what do you do if you need to run multiple commands in the background? You could put them all into a separate script file and then execute that script followed by an ampersand, or you can keep the commands in your main script and run them as a sub-shell.

Bash: Preserving Whitespace Using set and eval

If you don't care much about whitespace bash is great: it normally turns multiple whitespace characters into one and it breaks things into words based on white space. If on the other hand you'd like to preserve whitespace bash can be a bit difficult at times. A trick which often helps is using a combination of bash's eval and set commands.

List Open Files

If you try to unmount a partition and get a message like this: # umount /media/usbdisk/ umount: /media/usbdisk: device is busy use the lsof command to find out what programs are using what files:

Synchronizing Your Life

Once upon a time, one computer was all you needed. All of your documents lived on that computer, or a stack of floppies or CD-Roms nearby, and nowhere else. Those days are gone, much like the one-car, one-TV, and one-iPod days.

NVidia Fan Speed Revisited

One of the comments to my last post about adjusting the fan speed on your NVidia graphics card was that what was needed was a script to adjust the speed based on the temperature. The script presented here does just that.

Reconstructor: When You Lose Your Restore CD

I have an original Asus EeePC 701 4G. I've talked about it and written about it before. I tend to like a full operating system on the Eee, and have had several different Linux distributions installed on it. I'm constantly looking for the best mix of form and function.

Copying a Filesystem between Computers

If you need to transfer an entire filesystem from one machine to another, for example, when you get a new computer, do the following steps. 1) Boot both PCs with any Linux live CD (for example, Knoppix), and make sure they can access each other via the network.