Lemur zaprasza
Red Hat® Linux 6 Unleashed
Chapter 16: Printing with Linux Previous
Sections in this Chapter: Printer Devices Linux Printing Commands Some Program Tips What Printer Should I Use with Linux? Simple Formatting Other Helpful Programs How Do I Print? Other Helpful Printer Programs and Filters Troubleshooting and More Information The RHS Linux Print System Manager Infrared Printer Support Previous SectionNext Section How Do I Print? New Parallel-Port Drivers First, check to see that your printer is plugged in, turned on, and attached to your computer's parallel port. Pass-through parallel port cables shouldn't pose a problem, but don't expect to be able to use your printer while you're using your CD-ROM, QuickCam, SCSI adapter, or tape, ZIP, or SyQuest drive if attached to a pass-through cable.For starters, try this simple code: # ls >/dev/lp0 Chances are your printer will activate and its print head will move, but when you look at the printout, you might see a staircase effect, with each word on a separate line, moving across the page. Don't worry--this is normal and tells you that you can at least access your printer. Later in this chapter, you'll find out how to fine-tune your printing. New Parallel-Port Drivers Red Hat Linux 6.0 uses version 2.2.5 of the Linux kernel. Unlike previous versions of the kernel, the new 2.2.X and newer kernels use a new approach to parallel-port initialization, recognition, and configuration. As distributed, Red Hat Linux 6.0 contains a default kernel module configuration in /etc/conf.modules. This line will enable the low-level parallel-port parport kernel modules to attempt to autodetect any attached printers: alias parport_lowlevel parport_pc You can view the output of these modules with the dmesg command following an attempt to print. Look for output similar to this: parport0: PC-style at 0x3bc [SPP,PS2] parport0: no IEEE-1284 device present. lp0: using parport0 (polling). This shows that although an attached printer was not detected, the computer's parallel port was detected. Any attached printer would use /dev/lp0 as the printer device. You can also use the lsmod command to verify that the printer drivers have been loaded following a print job like this: # lsmod Module Size Used by parport_probe 2884 0 (autoclean) parport_pc 5012 1 (autoclean) lp 4412 0 (autoclean) parport 7092 1 (autoclean) [parport_probe parport_pc lp] ... The parport modules are automatically loaded whenever the lp.o kernel module is used. If your parallel port hardware is detected, you can examine the contents of the hardware file under the printer port's device number (such as /dev/lp0) like this: # cat /proc/parport/0/hardware base: 0x3bc irq: none dma: none modes: SPP,PS2 You can also try the tunelp command, which sets various parameters to "tune" your printer port or lets you know if your printer device is using interrupts or polling for printing. Try using this code: # tunelp /dev/lp0 -s You might see this output: /dev/lp0 status is 223, on-line If tunelp reports "No such device or address", or if you do not find an lp character device, see Chapter 28, "Configuring and Building Kernels." For details about the new parport drivers, read the file parport.txt under the /usr/doc/kernel-doc-2.2.5 directory. Red Hat® Linux 6 Unleashed
Chapter 16: Printing with Linux Previous
Sections in this Chapter: Printer Devices Linux Printing Commands Some Program Tips What Printer Should I Use with Linux? Simple Formatting Other Helpful Programs How Do I Print? Other Helpful Printer Programs and Filters Troubleshooting and More Information The RHS Linux Print System Manager Infrared Printer Support Previous SectionNext Section © Copyright Macmillan USA. All rights reserved. |