Command-line printing (Linux)
Print a .pos template without opening the GUI.
Run posprint cli-help to print this section from the binary (no GUI required).
Syntax
posprint print <file.pos> --printer <DEVICE> --set Name=Value [--set Other=Value ...]
Short form:
posprint print receipt.pos -p /dev/ttyUSB0 --set StoreName="My Shop" --set DocumentNumber=1001
Rules
--printer/-p(required): serial device path (e.g./dev/ttyUSB0,/dev/ttyACM0), or another printer id accepted by discovery.--set NAME=VALUE(required for every parameter): one flag per${Name}in the template.- If any
${Name}is missing or empty, the command fails and lists missing parameters. - The GUI is not started when using the
printsubcommand.
Permissions
Your user must be in the dialout group:
sudo usermod -aG dialout "$USER"
# log out and back in
groups
Examples
posprint print ~/receipts/sale.pos -p /dev/ttyUSB0 \
--set StoreName="Corner Cafe" \
--set DocumentNumber=42 \
--set Date=2026-07-15 \
--set GrandTotal=19.99
Printer device
ls -l /dev/ttyUSB* /dev/ttyACM* 2>/dev/null
Use the device node shown when the printer is connected.
Exit codes
| Code | Meaning |
|---|---|
0 | Printed successfully |
1 | Error (missing parameters, parse error, permission denied, etc.) |
Help
posprint print --help
posprint --help
Launch the graphical designer by running posprint with no subcommand.
Source
| 1 | # Command-line printing (Linux) |
| 2 | |
| 3 | Print a `.pos` template without opening the GUI. |
| 4 | |
| 5 | Run `posprint cli-help` to print this section from the binary (no GUI required). |
| 6 | |
| 7 | ## Syntax |
| 8 | |
| 9 | ```bash |
| 10 | posprint print <file.pos> --printer <DEVICE> --set Name=Value [--set Other=Value ...] |
| 11 | ``` |
| 12 | |
| 13 | Short form: |
| 14 | |
| 15 | ```bash |
| 16 | posprint print receipt.pos -p /dev/ttyUSB0 --set StoreName="My Shop" --set DocumentNumber=1001 |
| 17 | ``` |
| 18 | |
| 19 | ## Rules |
| 20 | |
| 21 | - **`--printer` / `-p`** (required): serial device path (e.g. `/dev/ttyUSB0`, `/dev/ttyACM0`), or another printer id accepted by discovery. |
| 22 | - **`--set NAME=VALUE`** (required for every parameter): one flag per `${Name}` in the template. |
| 23 | - If any `${Name}` is missing or empty, the command **fails** and lists missing parameters. |
| 24 | - The GUI is not started when using the `print` subcommand. |
| 25 | |
| 26 | ## Permissions |
| 27 | |
| 28 | Your user must be in the **`dialout`** group: |
| 29 | |
| 30 | ```bash |
| 31 | sudo usermod -aG dialout "$USER" |
| 32 | # log out and back in |
| 33 | groups |
| 34 | ``` |
| 35 | |
| 36 | ## Examples |
| 37 | |
| 38 | ```bash |
| 39 | posprint print ~/receipts/sale.pos -p /dev/ttyUSB0 \ |
| 40 | --set StoreName="Corner Cafe" \ |
| 41 | --set DocumentNumber=42 \ |
| 42 | --set Date=2026-07-15 \ |
| 43 | --set GrandTotal=19.99 |
| 44 | ``` |
| 45 | |
| 46 | ## Printer device |
| 47 | |
| 48 | ```bash |
| 49 | ls -l /dev/ttyUSB* /dev/ttyACM* 2>/dev/null |
| 50 | ``` |
| 51 | |
| 52 | Use the device node shown when the printer is connected. |
| 53 | |
| 54 | ## Exit codes |
| 55 | |
| 56 | | Code | Meaning | |
| 57 | |------|---------| |
| 58 | | `0` | Printed successfully | |
| 59 | | `1` | Error (missing parameters, parse error, permission denied, etc.) | |
| 60 | |
| 61 | ## Help |
| 62 | |
| 63 | ```bash |
| 64 | posprint print --help |
| 65 | posprint --help |
| 66 | ``` |
| 67 | |
| 68 | Launch the graphical designer by running `posprint` with **no** subcommand. |