From 3b226d19bb19a87eb565f3e1d16e14f446b56e76 Mon Sep 17 00:00:00 2001 From: johannst Date: Tue, 27 Aug 2024 22:25:00 +0000 Subject: deploy: 9b47b98b7c5efce0bf50d57aa5d7e374bcbabf23 --- linux/cups.html | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 linux/cups.html (limited to 'linux/cups.html') diff --git a/linux/cups.html b/linux/cups.html new file mode 100644 index 0000000..81a879a --- /dev/null +++ b/linux/cups.html @@ -0,0 +1,291 @@ + + + + + + cups - Notes + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+

cups(1)

+

Discover

+
# List available printer driver.
+lpinfo -m
+
+# List available printer devices (connected + network).
+lpinfo -v
+
+

Install printer

+
# Add device with PRINTER name, practically all modern network printer use the
+# everywhere driver.
+lpadmin -p PRINTER -m everywhere -v DEVICE_URI
+
+# Delete named printer.
+lpadmin -x PRINTER
+
+

Printer & Printing options

+
# List printer options.
+# CHECK printer-make-and-model
+lpoptions -p Brother_MFC_L2750DW_series
+# List printing options.
+lpoptions -p Brother_MFC_L2750DW_series -l
+
+# Set the default printer (stored in ~/.cups/lpoptions).
+lpoptions -d Brother_MFC_L2750DW_series
+
+

Inspect installed printer.

+
# List default printer.
+lpstat -d
+# List installed printer (-l for longer output).
+lpstat -p
+# List printer accepting state.
+lpstat -a
+# List printer and the attached device (eg device uri).
+lpstat -v
+
+# List all states at once.
+lpstat -t
+
+ +
# Create print job.
+lp -d PRINTER FILE
+    -n NUM                           number of copies
+    -P PAGE_LIST                     pages to print (eg 1,3-5,10)
+    -o media=a4                      paper format
+    -o number-up={2|4|6|9|16}        input pages per output page
+    -o sides=one-sided               print front-page only
+    -o sides=two-sided-long-edge     print duplex
+
+# Remove pending print job.
+lprm JOOBID
+
+

Control printer

+
# Enable/disable printer.
+cupsenable PRINTER
+cupsdisable PRINTER
+
+# Accept/rejects jobs for printer.
+cupsaccept PRINTER
+cupsreject PRINTER
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + +
+ + -- cgit v1.2.3