Printing with Santa Fe Linux

From Admin-SIG

I teach a beginning Linux class and we use Santa Fe Linux as our disribution. Here's an article I wrote after setting up a printserver with Windows and printing to it from Santa Fe Linux:

One reason people are reluctant to adopt Linux as their desktop operating system is they cannot find drivers for all of their hardware. Since Linux is not as prevalent on the desktop as other operating systems, manufacturers do not always bother to include Linux drivers for their hardware. Due to difficulties in reverse-engineering, various legal entanglements, and financial/time constraints, the Open Source community is not always able to create device drivers. In the end, it's the users that suffer.

One difficulty I've always had is printing from Linux. I like cheap hardware (doesn't everyone!) and the cheap printers I've purchased in the past didn't include Linux drivers. My current printer is a multifunction USB printer/scanner/fax. It's a Cannon MF5550. Cannon doesn't provide any Linux drivers for this product and there's no Open Source driver either. Simply put, this device must be used from Windows or forget it.

When you've got a Windows-only printer like the Cannon MF5550, it stands to reason that any attempt to print to it must involve Windows somehow. Up to this point, whenever I needed to print something, I stored the material on a FAT32 partition from Linux and then fired up Windows (using a dual-boot setup on my desktop machine) to print the material. Clumsy, but it worked. Recently, I've found a better solution.

Santa Fe Linux includes functionality enabling it to work with Windows machines across a local area network. That means you can set up a Windows print server and send documents from Santa Fe Linux to the Windows print server and they'll print exactly as if you'd printed them using Windows in the first place. No more clumsy workarounds. This solution Just Works and it's not too hard to set up.

For starters, you'll need a spare computer to serve as your printserver. Nowadays, you can find a Pentium II/III at bargain prices. I recommend using something with a high clockrate since the software we're using needs to convert between file formats and that's a processor-intensive task. My printserver is an Intel Celeron operating at 366 MHz with 128 MB RAM and there's no appreciable latency between sending the print job and receiving the printout. I also tried a Pentium I at 166MHz with 64MB RAM, but it was too slow for my tastes.

Next, you'll need to load an operating system on your printserver. I used Windows XP since now that I'm using Santa Fe Linux for my everyday tasks, I no longer needed it. I've got Windows 98 SE on my desktop machine when I need it for games. Alternately, you could use Windows 9x for the printserver if it supports your printer.

Now you need to load the printserver software. For all the step-by-step details, point your browser to

http://mywebpages.comcast.net/heretrythis/hp3100/psemuxp.html

There you'll find exact instructions for setting up your printserver. I'm just providing an executive summary here --- you really need to see that website.

Linux has its roots in UNIX, and printers in UNIX environments have traditionally used PostScript as their page description language. However, PostScript is an Adobe product and printer manufacturers must license it from Adobe if they want to incorporate it into their printers. That adds expense, so most cheap printers for home use employ some vendor-specific page description language like PCL for Hewlett-Packard printers or ESC/2 for Epson printers. The trick is to convert PostScript to whatever page description language the cheap home printer is using. That's where Ghostscript and RedMon come into the picture. RedMon stands for Redirection Monitor. Instead of printing to a parallel port or USB port, a printer using RedMon instead redirects its output to some program. In our case, we're creating some make-believe PostScript printer. This make-believe printer then redirects its PostScript output to Ghostscript. Ghostscript then converts this PostScript output to the graphics device interface used by Windows when it wants to print to some Windows printer. Windows then sends this graphics device interface output to the real printer attached to some physical port on the printserver. Believe me folks, it Just Works and aside from the expense of the printserver hardware and the copy of Windows, it's all free! Here's what I did to make these freeware programs work on my printserver. Again, go to the website above for detailed instructions!

1. Install Windows XP and the driver for the Cannon MF5550 on the printserver machine and connected the machine to the local network with an appropriate IP address.

2. Install Ghostscript, GSview, and RedMon to the printserver. I used Santa Fe Linux to download the programs. Then I ensured file and print sharing were activated in Windows XP. Then I created a shared folder on the Windows XP desktop. When I went to Computer on the Santa Fe Linux desktop, I was able to browse the network and find the Windows XP share on the printserver. I could then easily copy the files over to the printserver and install them.

3. Create the gsprint.cfg file using the Cannon MF5550 Printer and the correct path to the gswin32c.exe program.

4. Create the make-believe PostScript printer on the printserver. I chose to install an HP LaserJet 4050 Series PS printer since it's a rockin' PostScript Level 3 printer. Configure this printer to use the RedMon port as per the detailed instructions in the website. Enable printer sharing on this make-believe printer.

5. Add the printer to Santa Fe Linux. You can use Start --> Applications --> System Tools --> Printers or you can type http://localhost:631/ to access the CUPS GUI. I tried both and they work equally well. Both include options to detect and select network printers. However, you do need to massage the SAMBA Device URI a little. Here's what works on my machine:

smb://Administrator:password@WORKGROUP/PRINTSERVERNAME/PRINTERNAME

I chose to install an HP 4050 Series PS printer on Santa Fe Linux as well.

6. Print a document and watch in amazement as you see yet another obstacle to adopting Linux on the desktop overcome!

Santa Fe Linux also enables you to remotely access the printserver so you don't need to attach a mouse, keyboard, or monitor to the machine. First, ensure that Terminal Services are present and activated on the printserver. Then, use Synaptic to install the latest version of the rdesktop package. Now, you're all set! Simply use Start --> Applications --> Internet --> Terminal Server Client and watch in amazement again as a Windows XP desktop is displayed on your Santa Fe Linux desktop! You could even make maximum use of your Windows XP by installing additional software like games on the printserver and playing them with the Terminal Server Client on Santa Fe Linux! You can also use Terminal Server Client to connect to a Windows 9x printserver, but you need to first install the Remote Desktop software on the printserver since Windows 9x does not include it. This software is a free download from Microsoft.

As a final note, be aware that printservers represent a considerable security risk. You really need to operate your local area network behind a firewall. My favorite is SmoothWall 2.0 which is another free download at http://www.smoothwall.org You'll need another cheapo machine for SmoothWall to work (mine is a Pentium 133.) Or you could always buy some firewall/router from your local electronics retailer.

Write to the forum if you need any help. I hope you enjoy Santa Fe Linux.

NewArticle