The next thing I addressed was printing. I already have an HP “3-in-1” printer attached to my principal Linux computer, and it's set up so I can print on it from a Windows computer that's part of the local area network that I just increased by 50%.

All of the current distributions that I'm familiar with install “cups” to handle printers. Cups is an excellent piece of software, but it is, in my opinion, inappropriate for most home users, and especially home users trying to cram as much functionality as possible into 128 MB of memory. The problem is, cups devotes a lot of resources to automatic detection and configuration of printers, and it does this as long as the computer is turned on. How often do you buy and install a new printer? If the answer is, “every five years or so”, it's better to configure the printer just once.

The alternative to cups is “LPRng”, and if you were using some form of Unix 10-15 years ago, you're probably familiar with the concept; you define the printers with the /etc/printcap file.

LPRng is no longer included with RedHat Enterprise distributions. So, I went to http://www.lprng.com/, downloaded it, unzipped it, and typed in “make install”.

The next thing I did was to add an entry to /etc/printcap for my networked printer. It looked something like this:

lp:tc=.common:lp=devps@crow

Pretty simple, right? This just says that if you make an attempt to print on the device “lp”, it will be routed to a printer named “devps” on a machine named “crow”.

The problem is, this didn't work. I got a “permission” error, and I never figured out what the problem was. Since I don't have problems accessing the same printer from the Windows machine, I looked into how this was happening, and I learned the the Windows machine was accessing it through Samba. So, I changed the /etc/printcap entry to look like this:

lp|smbhp:lp=/dev/null:sd=/var/spool/samba:sh:if=/usr/bin/smbprint

What this does is, when you attempt to print to “lp”, it gets processed by the /usr/bin/smbprint script. This script, in turn, expects to find a file named .config in the /var/spool/directory, and this is where you define the printer, and your samba user name and password.

This didn't work on the first try. In the smbprint script, the code that does the actual work looked like this:

cat | /usr/bin/smbclient "$share" "$password" -E ${hostip:+-I} \
$hostip -N -P $usercmd "$user" $workgroupcmd "$workgroup" \
-c "$command" 2>/dev/null

This may have worked with an earlier version of Samba, but it doesn't work with the version that comes with RedHat Enterprise Version 4. To get this working, I had to change to to this:

cat | /usr/bin/smbclient "$share" -E ${hostip:+-I} \
$hostip -N $usercmd "$user%$password" $workgroupcmd "$workgroup" \
-c "$command" 2>/dev/null

This is a problem that the RedHat people should fix.