Printing: Difference between revisions
imported>Onny mNo edit summary |
imported>Onny move usage section behind configuration |
||
Line 7: | Line 7: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.printing.enable = true; | services.printing.enable = true; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 142: | Line 110: | ||
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]]. | ||
== Usage == | |||
After enabling the printing service you'll be able to configure and add network printers via http://localhost:631. You may need to authenticate with your local user when you add the printer. | |||
Depending on your desktop environment, there are several graphical tools available which will connect to this backend service and allow you a more convenient printer management, for example <code>system-config-printer</code>. | |||
=== Command line === | |||
List printers | |||
<syntaxhighlight lang="bash"> | |||
# lpstat -p | |||
</syntaxhighlight> | |||
Print test page for printer called <code>HP-LaserJet-1020</code> | |||
<syntaxhighlight lang="bash"> | |||
# lp -o job-sheets=standard,none -d HP-LaserJet-1020 /dev/null | |||
</syntaxhighlight> | |||
List jobs | |||
<syntaxhighlight lang="bash"> | |||
# lpstat | |||
</syntaxhighlight> | |||
Cancel job | |||
<syntaxhighlight lang="bash"> | |||
# cancel 1 | |||
</syntaxhighlight> | |||
== Tips and tricks == | == Tips and tricks == |