Files

145 lines
3.6 KiB
Markdown

# Printing
Printing at PSI usually goes via the Findme printing system. More details about this and what printers are available can be found here: https://intranet.psi.ch/de/computing/pull-printing .
Each user can see his individual active printing queue on:
https://printmgmt.psi.ch/user
An overview about the past printing jobs (which were executed) can be found at:
https://printmgmt.psi.ch/ui
## Configuration
Enable printing on a system (printing is usually enabled by default on desktop systems):
```yaml
base::enable_printing: true
```
### Configure Findme and usual PSI Ricoh printers
By default Findme is
Special printing configuration:
```yaml
# Configure your own printers
printing::printers:
'C5500':
- 'Findme'
'C400':
- 'ODGA_006'
# set default printer - default if not specified: Findme
printing::default_printer: 'ODGA_006'
```
### Configure Custom Printer
List local printers
```
# lpinfo -v
network beh
serial serial:/dev/ttyS0?baud=115200
network http
network socket
network lpd
network ipps
network ipp
network https
direct usb://Brother/PT-9300PC?serial=M2A385973
network smb
#
```
Ideally the device speaks IPP everywhere, else list available drivers:
```
# lpinfo -m | grep PT-9200DX
foomatic:Brother-PT-9200DX-ptouch-pt.ppd Brother PT-9200DX Foomatic/ptouch-pt
#
```
add this information to Hiera key `printing::custom_queues` where you can add custom printing queues:
```
printing::custom_queues:
'label_printer':
ensure: 'printer'
enabled: true
accepting: true
model: 'foomatic:Brother-PT-9200DX-ptouch-pt.ppd'
uri: 'usb://Brother/PT-9300PC?serial=M2A385973'
description: 'Label Printer PT-9200DX'
options:
'PageSize': 'tz-18'
```
If you have a PPD file, best [place it](../files/distribute_files) onto the system at `/usr/share/cups/model/` and in the Hiera hash replace the `model` key with `ppd`:
```
ppd: '/usr/share/cups/model/my_printer.ppd'
```
The supported options by your printer are found with:
```
# lpoptions -p label_printer -l
PageSize/Page Size: Custom.WIDTHxHEIGHT tz-6 tz-9 tz-12 *tz-18 tz-24 tz-36
MirrorPrint/Mirror Print: True *False
AutoCut/Auto Cut: *True False
AutoEject/Auto Eject: *True False
ExtraMargin/Extra Margin: *0mm 1mm 2mm 3mm 4mm 5mm 6mm 7mm 8mm 9mm 10mm 11mm 12mm 13mm 14mm 15mm 16mm 17mm 18mm 19mm 20mm 21mm 22mm 23mm 24mm 25mm 26mm 27mm
HalfCut/Half Cut (Crack & Peel): *True False
#
```
## Usage / Troubleshooting
| Command | Description|
|-|-|
| `lpstat -p` | All printers (queues) that CUPS knows about, with their current state (idle, printing, stopped)|
| `lpstat -p -d` | Same as above plus which printer is the default|
| `cupsenable <printer_name>` | Enable a printer queue |
| `lp $FILE` | Print to default queue |
| `lpq -a` | List all print queues for all printers (useful when you want the job list for each queue)|
| `lprm $JOB_ID` | Remove a job listed above |
Below find more examples:
List status of all printers / default printer:
```bash
%> lpstat -p
printer Findme is idle. enabled since Do 25 Sep 2025 12:45:52
printer label_printer is idle. enabled since Fr 10 Okt 2025 10:45:49
%> lpstat -p -d
printer Findme is idle. enabled since Do 25 Sep 2025 12:45:52
printer label_printer is idle. enabled since Fr 10 Okt 2025 11:12:34
system default destination: Findme
```
Enable a specific print queue:
```
cupsenable <printer_name>
```
Print a file (using the default queue):
```
lp test.txt
```
List all print jobs:
```
# lpq -a
Rank Owner Job File(s) Total Size
1st root 3 test.txt 1024 bytes
#
```
Delete a print job from the queue
```
lprm 3
```