Sunday, February 09 2003 @ 01:51 CET
Contributed by: tingo
I have this stupid GDI Printer (aka winprinter) which is connected to a windows machine. Why is the printer stupid?
First of all, the printer itself doesn't understand any standard printer language (like PCL, Postscript, etc.), and this means that it is hard to use this printer from any operating system which the vendor haven't written a driver for. So what if the vendor supports Linux (via a non-opensource driver)? I use FreeBSD.
Second, the Windows printer driver for my printer is made in such a way that it is impossible to use the printer over a network. I can share the printer, but the printer driver will not work with a network printer. How stupid is that?
Fortunately, all is not lost. It is possible to make the printer work.
and som patience. You will also use Regedit a little. If that scares you, please don't do this. Note: these instructions assume you are using Windows NT or 2000, if you are using Win9x or WinXP, you are on your own.
First, install Ghostscript, GSView and RedMon. Try printing something from GSView to your windows printer, so you know that it works. There are some postscript files in the examples directory of Ghostscript that are good for this.
Second, read the instructions found on the RedMon web page. Then come back here.
Third, install a Postscript printer. Remember to use a color PS printer if your WinPrinter supports color. I used the Apple Color LaserWriter 12/600. When you get to the port, select a Redirected port and name it RPT1: or something like that. On the Configure Port page, redirect it to the gsprint.exe program found in your GSView directory. In my case, it looks like this: F:\Diverse\Util\gsview\gsview\gsprint.exe. For arguments, use -printer "Printer Name" -. Printer Name is the name of your winprinter, and has to be written exactly as it appears in the Printers folder on your machine. In my case the arguments line is: -printer "Lexmark Z22-Z32 Series" -. Don't forget the "space dash" at the end, this tells gsprint to read from standard input (ie. from RedMon).
Fourth, you have to make changes o the registry. Because the windows print spooler runs under the System account, you will need to copy a couple of registry keys. If you don't do this, a dialog box will pop up when you print to the PS printer, and printing might not work at all. Fire up Regedit and look in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices. There you will find variables for all your printers. Copy the one for your winprinter and for the PS printer to HKEY_USERS\.DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\Devices. That is it, you are done with the registry.
Fifth, share your PS printer and set up remote printing.
In the next article, I will tell you how to use your shared Windows printer from a FreeBSD machine.