The goal is to set up printing on an EPSON Stylus COLOR 200 with CUPS 1.1, on a Slackware 10 desktop. I hope anyone with a similar configuration (notably using EPSON Stylus Color 200) will profit from this description.
Most of my actions were done by the hand of the Printing HOWTO, so there is some overlap in steps taken. This document differs from the HOWTO in that it is a concrete run-through of a printer installation.
So, plug your printer in and start tweaking!
Tweaking the BIOS
The BIOS has to be tweaked a bit first. First off, the parallel port should be enabled. It should not be set to auto but manually set to an IO address, in my case 0×378. Check dmesg to see what your IO address for parport0 is. The DMA and IRQ should now be set, in my case this was to DMA 3 and IRQ 7. Plug and Play should be set to ISA/legacy for this DMA and IRQ or Linux will not be able to properly use the parallel port.
Adjusting the kernel
I’ll assume the reader knows how to compile a kernel. If not, search for Kernel HOWTO.
At the time of writing Linux 2.6.15.4 was the latest kernel. In this version four options need to be selected:
- Device Drivers -> Parallel port support -> Parallel port support
- Device Drivers -> Parallel port support -> PC-style hardware
- Device Drivers -> Parallel port support -> IEEE 1284 transfer modes
- Character devices -> Parallel printer support
The first two are obvious. IEEE 1284 transfer modes gives the kernel the ability to recognize there is a printer on a parallel port. Finally parallel printer support lets the kernel create a /dev/lp0, the printer device we will need to print.
Once the new kernel is loaded all basic functionality is in place and with root you can check that
echo "hello, world" > /dev/lp0
actually prints hello, world! Of course it is somewhat unformatted so the text was very close to the edge of the page, but this is a start.
Note that only root can print in this way, which is also not the desired behaviour. Giving world-write access is not the preferred method here, CUPS can do the job much more secure and extensible.
Configuring CUPS
The Slackware package for CUPS already contained most
configuration. For now, printing and administering on localhost will do and this is exactly how CUPS is initially configured. One thing that still had to be done was
# chmod +x /etc/rc.d/rc.cups
# /etc/rc.d/rc.cups start
to get the CUPS server running.
There is a command-line tool for configuring CUPS, lpadmin, but this doesn’t nearly fit the job. The web interface for CUPS does, though. This can be accessed at http://localhost:631/. There we can add the printer.
It then becomes obvious that EPSON Stylus COLOR 200 is not supported by CUPS. After a day of hard trial the EPSON webpage told me a substitute for black-white printing is the EPSON Stylus COLOR 400/800. Luckely, these are both supported by CUPS, so now I have decent black-white prints.
For color prints EPSON recommended using the EPSON LQ 860/2550. These are both not included in the standard CUPS package, so here I stopped looking.
Tie up
With the changes made anyone on the desktop can now
- print with lpr
- check the status of the printer with “lpstat -p”
- check the queue with lpq and
- cancel a print job with “cancel job_id”.
And that just with a few hours of frustration! Hope you won’t have to go through the same printing frustration…
Possible future improvements
Later on I might want to make the printer available on the local network. From what I’ve seen of CUPS this shouldn’t be too difficult.