Próxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente |
es:howtos:network_services:desktop_printer_sharing_cups [2019/02/11 12:08 (UTC)] – creado slackwarespanol | es:howtos:network_services:desktop_printer_sharing_cups [2019/02/13 13:17 (UTC)] – [Troubleshooting] slackwarespanol |
---|
| <note warning>En proceso de traducción. Victor</note> |
<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> |
====== Desktop printer sharing with CUPS ====== | ====== Impresora de escritorio compartida con CUPS ====== |
Using CUPS, a USB printer can be network shared by the system it is connected to. While full printer discovery requires avahi, it is possible to set up simple printer sharing on Slackware 14.2 without installing any new software. In this case, the server is the machine that the printer is connected to via USB, whereas the client is any networked machine that wants to print. Obviously all machines need to be on the LAN, and direct printing over USB should already be working on the server. | Usando CUPS, una impresora USB puede ser compartida en red por el sistema al que está conectada. SI bien la detección de impresoras completa requiere avahi, es posible configurar el uso compartido de impresora en Slackware 14.2 sin necesidad de instalar ningún software nuevo. En este caso, el servidor es la máquina a la que se conecta la impresora a través de USB, mientras que el cliente es cualquier máquina en red que quiera imprimir. Obviamente, todas las máquinas deben estar en la LAN, y la impresión directa a través de USB ya debería estar funcionando en el servidor. |
| |
===== Server configuration ===== | ===== Configuración del servidor ===== |
CUPS needs to be enabled, so; | CUPS necesita ser habilitado, por lo tanto; |
chmod +x /etc/rc.d/rc.cups | chmod +x /etc/rc.d/rc.cups |
| |
The CUPS daemon will then start on boot, and it can be restarted for testing purposes by issuing; | El demonio de CUPS se iniciará en el arranque, y se puede reiniciar con fines de prueba emitiendo; |
/etc/rc.d/rc.cups restart | /etc/rc.d/rc.cups restart |
| |
You should be able to access the CUPS interface in your web browser at http://localhost:631/ | Debería poder acceder a la interfaz CUPS en su navegador web en http://localhost:631 |
| |
<note>If you are using [[http://www.slackware.com/~alien/efg/|AlienBob's firewall config]] you will want to add these two firewall rules (modifying the x's as appropriate for your LAN); | <note>Si está utilizando [[http://www.slackware.com/~alien/efg/| AlienBob's firewall config]] querrá agregar estas dos reglas de firewall (modificando las x según corresponda para su LAN); |
$IPT -A udp_inbound -p UDP -s x.x.x.0/24 --destination-port 631 -j ACCEPT | $IPT -A udp_inbound -p UDP -s x.x.x.0/24 --destination-port 631 -j ACCEPT |
$IPT -A tcp_inbound -p TCP -s x.x.x.0/24 --destination-port 631 -j ACCEPT | $IPT -A tcp_inbound -p TCP -s x.x.x.0/24 --destination-port 631 -j ACCEPT |
</note> | </note> |
| |
<note warning>The [[http://localhost:631/help/sharing.html?TOPIC=Getting+Started|CUPS help]] tells you to enable sharing via; | <note warning>El [[http://localhost:631/help/sharing.html?TOPIC=Getting+Started | CUPS help]] le dice que habilite el intercambio a través de; |
cupsctl --share-printers | cupsctl --share-printers |
but be careful as this will clobber your /etc/cups/cupsd.conf</note> | pero tenga cuidado ya que esto afectará su /etc/cups/cupsd.conf</note> |
| |
The simplest configuration requires that CUPS listen on the LAN (rather than just the default of localhost). Inside /etc/cups/cupsd.conf the minimum necessary changes to the Slack 14.2 default are; | La configuración más simple requiere que CUPS escuche en la LAN (en lugar de solo el valor predeterminado de localhost). Dentro de /etc/cups/cupsd.conf, los cambios mínimos necesarios para el valor predeterminado de Slack 14.2 son: |
<code> | <code> |
#Listen localhost:631 | #Listen localhost:631 |
</Location> | </Location> |
</code> | </code> |
| Su impresora también debe configurarse para compartir. De forma predeterminada, se compartió mi HP LaserJet M402dn, y puede verificar esto en /etc/cups/printers.conf donde debería haber una línea para su impresora que diga; |
Your printer also needs to be set to shared. By default my HP LaserJet M402dn was shared, and you can check this in /etc/cups/printers.conf where there should be a line for your printer that says; | |
Shared Yes | Shared Yes |
| |
<note> | <note> |
printers.conf should not be edited while CUPS is running! You can stop it with; | ¡printers.conf no debe editarse mientras CUPS se está ejecutando! Puedes pararlo con; |
/etc/rc.d/rc.cups stop | /etc/rc.d/rc.cups stop |
</note> | </note> |
| |
| |
Sharing can also be enabled with the command; | El compartir también se puede habilitar con el comando; |
lpadmin -p printer -o printer-is-shared=true | lpadmin -p printer -o printer-is-shared=true |
| |
where 'printer' is the name of the CUPS printer (which can be found at [[http://localhost:631/printers|CUPS printers]]). Note that this will //not// cause the printer to show as "Shared" on its CUPS page. E.g. my LaserJet says "HP_LaserJet_M402dn (Idle, Accepting Jobs, **Not Shared**, Server Default)", however, this printer is in fact shared over the network. Adding the directive; | donde 'impresora' es el nombre de la impresora CUPS (que se puede encontrar en [[http://localhost: 631/printers | CUPS printers]]). Tenga en cuenta que esto // no // hará que la impresora se muestre como "Compartida" en su página CUPS. P.ej. mi LaserJet dice "HP_LaserJet_M402dn (inactivo, aceptando trabajos, ** no compartido **, predeterminado del servidor)", sin embargo, esta impresora de hecho se comparte a través de la red. Añadiendo la directiva; |
BrowseLocalProtocols dnssd | BrowseLocalProtocols dnssd |
will cause the printer to show up as "Shared", but I believe this is referring to printer browsing, and probably requires avahi. At any rate, it is not necessary for the simple sharing setup described in this guide. | hará que la impresora se muestre como "Compartida", pero creo que esto se refiere a la navegación de la impresora, y probablemente requiera avahi. En cualquier caso, no es necesario para la configuración de uso compartido simple descrita en esta guía. |
| ===== Configuración del cliente ===== |
| |
===== Client configuration ===== | Ahora que el servidor está configurado, el cliente puede configurarse para imprimir. Solo probé esto en una Mac, que fue tan simple como abrir la dirección IPP de la impresora en Safari (que luego brinda la opción de agregar la impresora de red). La dirección IPP de la impresora es casi la misma que la que se encuentra en CUPS (en el servidor). Por ejemplo, en mi [[http://localhost:631/printers/ | lista de impresoras del servidor CUPS]], tengo este enlace; http://localhost:631/printers/HP_LaserJet_M402dn |
Now that the server is configured, the client can be set up to print. I have only tested this on a Mac, which was as simple as opening the printer's IPP address in Safari (which then provides the option for adding the network printer). The printer's IPP address is nearly the same as the one found in CUPS (on the server). For example, on my [[http://localhost:631/printers/|CUPS server printer list]], I have this link; | Para la dirección IPP, simplemente reemplace el protocolo, el nombre de host y elimine el puerto. P.ej.; |
http://localhost:631/printers/HP_LaserJet_M402dn | |
| |
For the IPP address, simply replace the protocol, hostname, and remove the port. E.g.; | |
ipp://darkstar/printers/HP_LaserJet_M402dn | ipp://darkstar/printers/HP_LaserJet_M402dn |
or more generally | o más generalmente |
ipp://server_hostname/printers/cups_printer_name | ipp://server_hostname/printers/cups_printer_name |
| |
| No tengo experiencia en la configuración de clientes en otros sistemas operativos, por lo que se agradecería agregar esa información. |
| |
I have no experience with configuring clients on other operating systems, so the addition of that information would be appreciated. | ===== Solución de problemas ===== |
| Si tiene dificultades, puede consultar el registro de errores CUPS en [[http://localhost:631/admin/log/error_log]] |
===== Troubleshooting ===== | |
If you are having difficulty, you can check the CUPS error log at [[http://localhost:631/admin/log/error_log]] | |
| |
====== Sources ====== | ====== Sources ====== |