Printing/es

Este documento cubre la instalación y mantenimiento de impresoras mediante CUPS y Samba. Cubre la instalación local y la instalación en red y también muestra instrucciones acerca de cómo usar impresoras compartidas desde otros sistemas operativos.

Utilizar las herramientas adecuadas
Linux ofrece buen soporte para las impresoras. La herramienta adecuada para este trabajo es CUPS ( Common Unix Printing System ). Desde el comienzo de este proyecto allá por 1999, la instalación y el mantenimiento de CUPS ha mejorado sustancialmente.

En este documento mostraremos como usar CUPS para configurar una impresora local o en red. No entraremos en mucho detalle ya que el proyecto dispone de un magnífica documentación para un uso avanzado.

Introducción
Cuando quiera instalar una impresora en su sistema, necesitará saber cómo se conectará la impresora a su sistema. ¿Lo hace a través de un puerto local como LPT o USB, o está en red?. Y si lo está, ¿Utiliza el protocolo de impresión de Internet (IPP) o a través del protocolo SMB-CIFS de Microsoft Windows (Compartir recursos en Microsoft Windows)?

La siguientes secciones indican la configuración mínima de núcleo que necesita. Por supuesto, esto depende de cómo va a conectar la impresora a su sistema, por lo que para su comodidad hemos separado las indicaciones.

Por tanto, vaya a y lance   para entrar en la configuración del núcleo. Si utilizó  para configurar su núcleo, entonces debería realizar estos pasos para asegurarse de que no ha olvidado nada.

En los siguientes ejemplos de configuración hemos añadido el soporte necesario en el núcleo, no como módulos. Esto no es obligatorio. Si así lo desea, puede fácilmente utilizar soporte modular. No olvide cargar los módulos apropiados a continuación.

Ahora vaya a la sección apropiada para configurar (o comprobar) su núcleo.

Impresora conectada localmente (LPT)
El puerto LPT se usa normalmente para identificar el puerto paralelo de la impresora. Es necesario activar previamente el soporte para el puerto paralelo, exactamente "PC-style parallel port support" (a menos que sea usuario de SPARC), después de ésto, habilitaremos el soporte para una impresora a través del puerto paralelo.

Eso es todo. Salga de la configuración del núcleo y reconstrúyalo. No hay que olvidar copiar la imagen del núcleo a la localización (y no olvidar montar  si es necesario) así como actualizar el cargador de arranque antes de reiniciar su sistema.

Ahora continúe con CUPS.

Impresora conectada localmente (USB)
Para habilitar la impresión USB, simplemente necesitará el soporte USB en su núcleo:

Eso es todo. Salga de la configuración del núcleo y reconstrúyalo. No hay que olvidar copiar la imagen del núcleo a la localización (y no olvidar montar  si es necesario) así como actualizar el cargador de arranque antes de reiniciar su sistema.

Ahora continúe con CUPS.

Impresora remota (IPP)
Para poder conectar a una impresora remota a través del protocolo de impresión de Internet (Internet Printing Protocol) el núcleo solo necesita soporte de red. Asumiendo que el núcleo ya lo tiene, continuamos con CUPS.

Impresora remota (SMB-CIFS)
Su núcleo debe ofrecer soporte para SMB CIFS:

Eso es todo. Salga de la configuración del núcleo y reconstrúyalo. No hay que olvidar copiar la imagen del núcleo a la localización (y no olvidar montar  si es necesario) así como actualizar el cargador de arranque antes de reiniciar su sistema.

Ahora continúe con CUPS.

Instalación
Instalar CUPS con Gentoo es muy sencillo. CUPS dispone de algunas características opcionales que le pueden interesar. Para activar o desactivar estas características, usaremos los ajustes USE asociados a las mismas.

Compruebe los ajustes USE actuales. Si quiere modificar alguno de ellos tan solo para CUPS, añádalos a.

Si está satisfecho con el resultado, haga que portage instale CUPS.

Para habilitar el soporte para SAMBA, se necesita instalar con soporte para CUPS. Actualice el fichero o directorio para habilitar el ajuste USE  :

A continuación (re)instale Samba:

Si la impresora es local en nuestro sistema, necesitará cargar CUPS de forma automática en el inicio. Asegúrese de que su impresora está conectada antes de iniciar CUPS.

Configuración
La configuración por defecto del servidor CUPS en es suficiente para la mayoría de los usuarios. Sin embargo, algunos usuarios pueden necesitar cambios a la configuraicón de CUPS.

En las siguientes secciones cubrimos algunos cambios que se necesitan a menudo:


 * Permitimos a otros sistemas que utilicen la impresora conectada a esta estación de trabajo Linux.
 * Concedemos acceso a la administración de CUPS desde sistemas remotos.
 * Configuramos CUPS para que ofrezca soporte a los controladores PCL de Windows. Esto se recomienda si quiere que los sistemas Windows puedan utilizar una impresora compartida con Samba ya que la mayoría de los controladores Windows son PCL.
 * Configuramos este sistema para que utilice una impresora conectada a otro sistema (no a través de un recurso Windows compartido).

Acceso a impresoras remotas
If you want other systems to use your printer through IPP you need to explicitly grant access to the printer in. If you want to share your printer using SAMBA, this change is not needed.

Open up in your favorite editor and add in an   line for the system(s) that should be able to reach to your printer. In the next example, we grant access to the printer from localhost and from any system whose IP address starts with.

This broadcasts browsing information to the clients on the network. This is so that they know the printer is available:

Also, you will need to specify which port CUPS listens to, so that it will respond to printing requests from other machines on your network.

CUPS Remote Administration
If you are interested in remote administration, you need to grant access from other systems than just localhost to the CUPS administration. Edit and have it explicitly grant access to the systems you want. For instance, to grant access to the system with IP address of 192.168.0.3:

Do not forget to restart CUPS after making changes to by running.

Enable Support for Windows PCL Drivers
PCL drivers send raw data to the print server. To enable raw printing on CUPS, you need to edit and uncomment the line   if it is not already uncommented. Then you need to edit and do the same, if it is not already uncommented.

Do not forget to restart CUPS after making these changes by running.

Setting Up a Remote Printer
If the printers are attached to a remote CUPS-powered server you can easily set up your system to use the remote printer by changing the file.

Assuming the printer is attached to a system called , open up  with your favorite editor and set the   directive:

The remote system will have a default printer setting which you will be using. If you want to change the default printer, use  :

En primer lugar, liste las impresoras disponibles:

Set the HP LaserJet 5P as the default printer:

Introduction
If the printer you want to configure is remotely available through a different print server (running CUPS) you do not need to follow these instructions. Instead, read.

Detecting the Printer
If you have a USB printer or your parallel port printer was powered on when you booted your Linux system, you might be able to retrieve information from the kernel stating that it has successfully detected your printer. However this is merely an indication and not a requirement.

Para una impresora USB:

Installing the Printer
To have the printer installed on your system, fire up your browser and have it point to http://localhost:631. You will be greeted by the CUPS web interface from which you can perform all administrative tasks.

Go to Administration and enter your root login and password information at the box. Then, when you have reached the administrative interface, click on Add Printer. You will be greeted by a new screen allowing you to enter the following information:


 * The spooler name, a short but descriptive name used on your system to identify the printer. This name should not contain spaces or any special characters. For instance, for the HP LaserJet 5P you could say.
 * The location, a description where the printer is physically located (for instance in your room, or in the kitchen right next to your dish washer, ...). This is to help maintaining several printers.
 * The description in which you should place a full description of the printer. A common use is the full printer name (like "HP LaserJet 5P").

The next screen asks you for the device where the printer listens to. You will have the choice of several devices. The next table covers a few possible devices, but the list is not exhaustive.

If you are installing a remote printer, you will be asked for the URI to the printer:


 * An LPD printer server requires a  syntax
 * An HP JetDirect printer requires a  syntax
 * An IPP printer requires a  or   syntax.

Next, select the printer manufacturer in the adjoining screen and the model type and number in the subsequent one. For many printers you will find multiple drivers. You can either select one now or search on LinuxPrinting.org's Printer List for a good driver. You can change drivers easily later on.

Once the driver is selected, CUPS will inform you that the printer has been added successfully to the system. You can now go to the printer management page on the administration interface and select  to change the printer settings (resolution, page format, ...).

Testing and Reconfiguring the Printer
To verify if the printer is working correctly, go to the printer administration page, select your printer and click on.

If the printer does not seem to work correctly, click on  to reconfigure the printer. You will be greeted with the same screens as during the first installation but the defaults will now be your current configuration.

If you have no idea why your printer does not function, you might get a clue by looking at. In the next example we find out that there is a permission error, probably due to a wrong  setting in.

Installing the Best Driver
Many printer drivers exist; to find out which one has the best performance for your printer, visit the LinuxPrinting Printer List. Select your brand and type to find out what driver the site recommends. For instance, for the HP LaserJet 5P, the site recommends the  driver.

Download the PPD file from the site and place it in, then run   as root. This will make the driver available through the CUPS web interface. Now reconfigure your printer as described above.

Introduction
Some printers require specific drivers or provide additional features that are not enabled through the regular configuration process as described above. This chapter will discuss a selection of printers and how they are made to work with Gentoo Linux.

Gutenprint Driver
The gutenprint drivers are high-quality, open source printer drivers for various Canon, Epson, HP, Lexmark, Sony, Olympus and PCL printers supporting CUPS, ghostscript, The Gimp and other applications.

Gentoo's Portage Tree contains an ebuild for the gutenprint drivers. Just use  to install them. Note that the ebuild listens to quite a few USE flags (such as  and   ). You must have enabled at least these two flags!

When the emerge process has finished, the gutenprint drivers will be available through the CUPS web interface.

Controlador HPLIP
Lea el artículo sobre el Controlador HPLIP

PNM2PPA Driver
PPA is an HP technology that focuses on sending low-level processing to the system instead of to the printer which makes the printer cheaper but more resource consuming.

If the LinuxPrinting site informs you that the pnm2ppa driver is your best option, you need to install the  filter on your system:

Once installed, download the PPD file for your printer from the LinuxPrinting site and put it in. Next, configure your printer using the steps explained above.

Configuring a Windows Client for IPP
Microsoft Windows supports IPP (Windows 9x and ME users need to install it separately). To install a printer that is attached to your Linux box on Windows, fire up the  wizard and select. When you are asked for the URI, use the  syntax.

Configuring a Windows Client for a Samba Shared Printer
To share the printer on the SMB-CIFS network, you must have SAMBA installed and configured correctly. How to do this is beyond the scope of this document, but we will quickly deal with the configuration of SAMBA for shared printers.

Open with your favorite editor and add a   section to it:

Añadir una sección [printers]

Now navigate to the top of the file until you are inside the   section. Then locate the  and   settings and set each of them to   :

Cambiar al sección [global]

Make sure you enabled the windows pcl support in CUPS. Then, restart the  service to have the changes take effect.

Configuring a Linux Client for a Windows Print Server
First of all, make sure that the printer is shared on your Windows system and that you have emerged  with the   USE-flag enabled as instructed above.

To find the desired printer's URI, run the following command, substituting "server" with the computer that you want to probe for samba-shared printers:

Next, in the CUPS web interface, configure your printer as described previously. You will notice that CUPS has added another driver called. Select it and use the  or   syntax for the URI.

Introduction
Many tools exist that help you configure a printer, use additional printing filters, add features to your printing capabilities, etc. This chapter lists a few of them. The list is not exhaustive and not meant to discuss each tool in great detail.

Gtk-LP - A Gtk-powered Printer Configuration Tool
With Gtk-LP you can install, modify and configure your printer from a stand-alone Gtk application. It uses CUPS and provides all standard CUPS capabilities as well. Definitely worth checking out if you dislike the CUPS Web interface or want a stand-alone application for your day-to-day printing routines.

Para instalarlo, haga emerge de  :

Error: Unable to convert file 0 to printable format
Si tiene problemas al imprimir y se muestra el siguiente mensaje en :

Error log

Necesitará volver a hacer emerge de   con el ajuste USE. Puede, bien añadir  a sus ajustes USE en  o puede habilitarlos solo para   como se muestra a continuación:

A continuación haga emerge de. Cuando haya terminado la compilación, asegúrese de reiniciar  a continuación:

Agradecimientos
Nos gustarían dar las gracias a los siguientes autores y editores por sus contribuciones a esta guía:


 * swift
 * nightmorph