HOW-TOs

OpenOffice.org: Cross-References Revisited

Four years ago, I wrote an article about OpenOffice.org writer called "Fielding Questions, Part 2 - Cross References and User-Defined Fields." I regularly receive mail about it, but these days I have to preface each reply by explaining that the article is obsolete. Repeating the explanation gets old quickly, so I decided that an update is necessary.

Tech Tip: View Config Files Without Comments

I've been using this grep invocation for years to trim comments out of config files. Comments are great but can get in your way if you just want to see the currently running configuration. I've found files hundreds of lines long which had fewer than ten active configuration lines, it's really hard to get an overview of what's going on when you have to wade through hundreds of lines of comments.

Accessing PostgreSQL in C/C++

For some, databases can be pretty intimidating. I remember some of the convoluted code I wrote years ago in order to avoid having to learn how to access a database from my programs. But it's actually not that hard to access a database, even in C/C++.

Capturing Video (How I Did It)

One of the common questions we get here at linuxjournal.com is how we produce our videos. Shawn produced a howto video on some ways of doing it. The following describes how I capture my videos and also the script that I use to add the Linux Journal logo watermark to it.

Tech Tip: Some Useful Vim Options

Vim is one the more popular choices of text editors for Linux. For vim, there are a few non-default options that may be useful whether editing config files or writing scripts in your favorite language.

Convert SpreadSheets to CSV files with Python and pyuno, Part 1v2

Some months back I developed some pyuno code for converting spreadsheets into CSV files from the command line. Pyuno being the Python interface to the OpenOffice runtime. One of the enhancement suggestions I got was to add the ability to extract all the sheets and/or a specific sheet rather than always extracting the first sheet. The following update to the code does just that.

OpenOffice.org Calc: The Mysteries of DataPilots Revealed

If you're coming fresh from Microsoft Excel, you might wonder where the Pivot tables are in OpenOffice.org Calc. The problem is, they're masquerading under the name of DataPilots. But, under any name, DataPilots are Calc's way of allowing you to quickly reorganize information in a range of cells so that you can gain a new insight into them.

Using Bash History More Efficiently

If you've used bash for a while you probably know that the commands you enter are saved in the file ~/.bash_history when you log out. Next time you log in, bash automatically loads these history commands from the saved file and you can then use the up and down arrow keys to browse your command history and find the command you want rather than re-entering it.

Tech Tip: Setup Your Linux Server to Use a Serial Console

Do you have a linux server without a keyboard or monitor? Need to administer the server on-site but don't want to lug over a monitor and keyboard (or kvm)? Then setup the server to output the console to a serial port and use screen/minicom (Hyperterminal or putty in Windows) to console into the server over a serial cable.

Asking a Yes/No Question from a Bash Script

In order to avoid this common mistake I often have my shell scripts prompt me for a yes or no answer before they proceed. The function described here is for doing that: asking a question and validating the answer.

Tech Tip: Determining What's Been Changed on RPM Based Systems

As a consultant, I am often faced with an unfamiliar Linux system (usually RHEL). I always find it useful to understand which files that shipped with rpm packages have been modified, since it's usually a good indicator of what customizations have been performed on the system. To determine the modified files, I simply run:

Tech Tip: Using the Synaptic Package Manager to Ease Installations

On Debian based systems, or any that use Synaptic for package management, you can use Synaptic to help you setup multiple systems with the same software. On the first system select all the packages you want and then under the File menu use Save Markings or Save Markings as to save your selections to a file.