Welcome to the Slackware Documentation Project

¡Esta es una revisión vieja del documento!


Traducción en progreso. Victor.

Printing

Elegir una impresora

Linux no siempre ha tenido una gran historia con las impresoras. Durante muchos años, la impresión fue un arte negro para muchos usuarios de Linux, y muy pocas impresoras funcionaron de manera confiable. Hoy en día, la mayoría de las impresoras funcionarán bien con Linux, pero algunas aún no lo hacen. Si está comprando una nueva impresora, tenga en cuenta que muchos de los modelos de inyección de tinta baratos no son tan compatibles con Linux como las impresoras láser más caras. Si no está seguro acerca de una impresora, puede consultar en línea para ver si otros han tenido éxito con ella.

Sin embargo, todas estas advertencias son quizás un poco excesivas, ya que la gran mayoría de las impresoras funcionan con Linux después de una configuración breve y sencilla. El progreso en esta dirección se debe en gran parte a los esfuerzos del Sistema de Impresión Común UNIX, (CUPS). CUPS es un sistema de impresión utilizado por Slackware y la mayoría de las otras distribuciones de Linux en la actualidad. Utiliza principalmente un procedimiento de configuración gráfica al que se accede a través de un navegador web. Para configurar una impresora con CUPS, deberá abrir un navegador web como Firefox, konqueror o links y dirigirse a http: // localhost: 631.

Choosing a Printer

Puede encontrar que un clic rápido de CUPS configura su impresora casi automáticamente. O bien, es posible que se requiere una configuración adicional. Para obtener más información sobre cómo funciona la impresión o cómo configurar una impresora dificultosa, siga leyendo.

Conseguir el controlador (driver)

Hay, esencialmente, tres tipos de controladores de impresora:

  1. Las impresoras Postscript utilizan el lenguaje universal de Postscript para comunicarse con las computadoras. Por lo general, no es necesario un controlador para impresoras PostScript, ya que un subsistema compatible con PostScript llamado Ghostscript ya está instalado.
  2. Gutenprint son controladores diseñados por desarrolladores de GNU Linux. Proporciona soporte para aproximadamente 700 impresoras.
  3. Los fabricantes pueden proporcionar controladores de Linux para sus impresoras. Descúbralo visitando el sitio web de asistencia y controladores del fabricante y buscando su modelo.

Dado que gutenprint ya está instalado en Slackware, de este conjunto de tres categorías, tenemos dos métodos para instalar controladores:

  1. Para los controladores del fabricante, la instalación suele ser la misma que la de cualquier otro software en su sistema; use installpkg o rpm2tgz para instalar el paquete del controlador. Asegúrese de leer la documentación incluida con los controladores.
  2. Para las impresoras PostScript, no hay “instalación” como tal; simplemente descargue el archivo PPD 'apropiado y guárdelo en una ubicación adecuada en su disco duro. Una vez que haya localizado e instalado o descargado los componentes necesarios, estará listo para ejecutar CUPS . ===== Setting Up a Printer in CUPS ===== From this point onward, setting up a printer is just a series of following the step-by-step instructions with CUPS, but understanding how the printing configuration actually works might help clarify what CUPS does is doing. The file /etc/cups/printers.conf consists of definitions which detail the printing devices your computer will be able to access, with one marked as the default device. If you wish to edit this file manually (and you probably don't), you must stop the cupsd CUPS daemon. A typical entry would look something like this: <file> <Printer r1060> Info Ricoh 1060 Location Downstairs MakeModel Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6 DeviceURI lpd:192.168.4.8 State Idle StateTime 1316011347 Type 12308 Filter application/vnd.cups-raw 0 - Filter application/vnd.cups-raster 100 rastertogutenprint.5.2 # standard-ish stuff below here Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer </Printer> </file> In this example, we have given the printer the name r1060, a human-readable identifier Ricoh 1060. The MakeModel attribute is gained from lpinfo, which lists all available printer drivers on your system. So, if you know that you have a Ricoh 1060 that you want to print to, then you would issue this command as root: <code> darkstar:~# lpinfo -m | grep 1060 </code> This lists the drivers that you have installed, grepping for the string 1060: <file> gutenprint.5.2:brother-hl-1060/expert Brother HL-1060 - CUPS+Gutenprint v5.2.6 gutenprint.5.2:ricoh-afc_1060/expert Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6 </file> The MakeModel is the last half of the appropriate result; in this case Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6 The final vital entry is the device URI, or where on the network (or physical location, such as the USB port), the printer can be found. In this example, we use DeviceURI lpd: // 192.168.4.8 because we are using the lpd (line printer daemon) protocol to send data to the printer. Now you understand what is being configured, and you can use the more common (and easier) method of doing this from the configuration tool that runs inside of a web browser. In the CUPS interface, choose the Administration tab, and choose to Add Printer. You should be asked to enter administrative authorization here; enter root as the admin and your root password. You will be presented with a list of printer interfaces and protocols that you can use for a printer. In many cases, you will want to add the printer via the LPD/LPR protocol (unless you've managed to find a printer that requires some other protocol). Note that if the printer is plugged directly into your computer, and is on, you should see it listed as a Local Printer. Assuming the printer is networked, the next screen will ask for the location of the printer. Using lpd: // as the protocol, enter the IP address of the printer. To find the IP address of the printer, you will probably need to look at the printer&#39;s settings, or you may be able to determine it from your router. Whether your printer is connected via USB or network, the following screen will ask for human-readable details about the printer; this is for your reference only, so enter a name for the printer that makes sense to you and your users (the model number usually), a description (something that is distinctive about the printer if you have more than one of the same printers), and the location (describing where it is in the building). On the next screen, point CUPS to the printer driver. If the printer is a postscript printer (as most laserprinters are) then you may need only the PPD for that printer. If your printer is not postscript or has special features that require additional drivers, then define the make (manufacturer) and you will then be presented with a list of available drivers. Select the appropriate driver. The printer is now installed and will be the default printer for all of your applications. ===== Printing from the Command Line ===== Now that you have successfully installed and configured your printer, you may also use lpr to print from the command line. lpr sends documents to a printer but before using it, you might want to define a default printer by using lpadmin as root: <code> # lpadmin -d r1060 </code> In this example, r1060 is the human readable name given to the printer in either /etc/cups/printers.conf or in the CUPS configuration. <note> If you do not have root privileges on the workstation you are using, you can also set the PRINTER environment variable: $ PRINTER=r1060 $ export PRINTER </note> Once the printer has been set, then you may print: <code> $ lpr foo.txt </code> ==== Formatting for Print ==== lpr, like so many other UNIX applications, does one thig: sends files to a printer. It doesn't much care if the file looks good or even fits on a page. When printing large text files that have not been formatted for print, use pr(1). pr is a simple text formatter that takes any text document and makes sure that it contains line breaks and page breaks, with an optional header and footer, page numbering, and much more. It has many options, but the defaults are usually good enough. pr outputs the results of the formatting to standard out, meaning it simply takes the text document, formats it, and displays the results in the terminal. This, of course, means that it can be redirected to lpr: <code> darkstar:~$ pr foo.txt | lpr </code> This will format foo.txt and send the formatted output to the default printer. As usual, see the pr man page for a list of the customizations you can make to the default formatting. ====== Chapter Navigation ====== Previous Chapter: The X Window System Next Chapter: Users and Groups ====== Sources ====== * Original source: http://www.slackbook.org/beta
    * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson