Printing: Difference between revisions

imported>Onny
mNo edit summary
imported>Onny
Further cleanup
Line 155: Line 155:
Once printer sharing is enabled, it could be additionally advertised in the home network via the Samba protocol, [[Samba#Printer_sharing|see]].
Once printer sharing is enabled, it could be additionally advertised in the home network via the Samba protocol, [[Samba#Printer_sharing|see]].


=== Client (Linux) ===
===See also===


If you want to use a printer shared on the network, and if you enabled {{nixos:option|services.avahi.publish.userServices}} in the server configuration, enabling printing and avahi on the client should be sufficient for the printer to be detected:
* [https://github.com/NixOS/nixpkgs/issues/13901 How to properly setup a shared (home) printer? #13901]
<syntaxhighlight lang="nix">
* [https://wiki.archlinux.org/index.php/CUPS/Printer_sharing Printer sharing (Arch Linux wiki)]
{
* [https://github.com/NixOS/nixpkgs/issues/23993 Little Printing/CUPS Documentation for Configuration as a Print Server #23993]
  ...
* [https://web.archive.org/web/20160829175522/https://nixos.org/wiki/Printers Old wiki page]
  services.printing.enable = true;
 
  services.avahi.enable = true;
[[Category:Configuration]][[Category:Hardware]]
  # Important to resolve .local domains of printers, otherwise you get an error
 
  # like  "Impossible to connect to XXX.local: Name or service not known"
==Troubleshooting==
  services.avahi.nssmdns = true;
 
}
=== Adding network printer "Name or service not known" ===
</syntaxhighlight>


If CUPS complains about "''Impossible to connect to XXX.local: Name or service not known''" even if {{nixos:option|services.avahi.nssmdns}} is enabled as shown above, the reason could be that mdns does not work properly with IPv6 in your network. In such a case, switching to mdns4-only setup can help:
If CUPS complains about "''Impossible to connect to XXX.local: Name or service not known''" even if {{nixos:option|services.avahi.nssmdns}} is enabled as shown above, the reason could be that mdns does not work properly with IPv6 in your network. In such a case, switching to mdns4-only setup can help:
Line 184: Line 183:
See [https://github.com/NixOS/nixpkgs/issues/118628 this bug report] for details.
See [https://github.com/NixOS/nixpkgs/issues/118628 this bug report] for details.


===See also===
=== Upgrade required ===
 
* [https://github.com/NixOS/nixpkgs/issues/13901 How to properly setup a shared (home) printer? #13901]
* [https://wiki.archlinux.org/index.php/CUPS/Printer_sharing Printer sharing (Arch Linux wiki)]
* [https://github.com/NixOS/nixpkgs/issues/23993 Little Printing/CUPS Documentation for Configuration as a Print Server #23993]
* [https://web.archive.org/web/20160829175522/https://nixos.org/wiki/Printers Old wiki page]
 
[[Category:Configuration]][[Category:Hardware]]
 
==Troubleshooting==
 
===Upgrade Required===
Described in: [https://github.com/NixOS/nixpkgs/issues/23993 Github issue 23993]<br />
Described in: [https://github.com/NixOS/nixpkgs/issues/23993 Github issue 23993]<br />
'''Problem'''<br />
'''Problem'''<br />