PRINTDECKDOCS

Reference

Commands

The commands and the flags of the printdeck program.

The program is printdeck, in deck/cmd/printdeck. Without a command, it runs the application on the touch screen; systemd starts it that way on the deck. The commands, from the comment at the top of main.go:

CommandWhat it does
printdeckrun the application (started by systemd)
printdeck apprun the desktop app: the deck for a printer on USB, with no screen
printdeck demo DIRwrite PNG pictures of the screens to DIR
printdeck remote-demo [ADDR]serve the remote screen of a demo deck (password "demo")
printdeck preview FILE.pngwrite the model view of the print that runs now
printdeck shot FILE.pngwrite a picture of the screen, with live data
printdeck splashshow the start screen at boot (started by printdeck-init)
printdeck passwordprint a new random password of four words
printdeck boardfind the printer board, and print its MCU and firmware version
printdeck manual DIRwrite the manual (DIR/index.html and its pictures)
printdeck snapshot URL PASSWORD OUT.png [h=H] [tap=X,Y ...]a frame of the UI of a Printdeck, as a PNG
printdeck helperthe system helper: the actions of the deck that need root (started by systemd)
printdeck klipper-probe DEVICE [BAUD]connect to a Klipper board and print what it reports
printdeck klippy [options] CONFIGrun the Klipper host (the Go port of klippy.py)
printdeck verify FILEcheck the signature and the checksums of an update file
printdeck host-apiprint the interface version for the Klipper host and the helper
printdeck bench SOCKET OUT.pngrun the deck UI with no screen on a Klipper host (a test bench)

The options of the commands

The usage lines from the files of the commands.

printdeck app app.go

printdeck app [-dir DIR] [-addr ADDR] [-parent] [-sim [-fake-update]]

printdeck bench bench.go

printdeck bench SOCKET OUT.png

printdeck board board.go

printdeck board

printdeck flash board.go

printdeck flash [-check] DEVICE

printdeck klipper-probe klipperprobe.go

printdeck klipper-probe DEVICE [BAUD]

printdeck manual cura.go

printdeck manual DIR cura

printdeck manual manual.go

printdeck manual DIR [wide|cura|large]
                                      write DIR/index.html, DIR/booklet.html and the pictures in
                                      DIR/img. wide draws the screens of a display that is mounted
                                      wide. cura is the booklet of the
                                      Cura plugin (cura.go). large draws the tall screens with the
                                      large text of the Touch Display 2.

printdeck snapshot snapshot.go

printdeck snapshot URL PASSWORD OUT.png [w=WIDTH] [h=HEIGHT] [tap=X,Y ...] [wait=MS]

printdeck klippy

The Klipper host has the options of klippy.py. The G-code pseudo-terminal (-I) is not ported: the deck sends G-code through the API socket. The Klipper version of the port is v0.13.0-777-g7bc4d0946, and the firmware of the board must be this version.

usage: printdeck klippy [options] <config file>

  -i FILE   read commands from file instead of from tty port
  -a FILE   api server unix domain socket filename
  -l FILE   write log to file instead of stderr
  -v        enable debug messages
  -o FILE   write output to file instead of to serial port
  -d FILE   file to read for mcu protocol dictionary (or NAME=FILE)

The system programs

On Printdeck OS, these names are links to the printdeck program in /usr/bin. The program runs the program of the name it was started under.

ProgramWhat it does
printdeck-initthe first program at boot
printdeck-update BUNDLEwrite an update bundle to the other slot, and restart
printdeck-commitmake the new slot the default after an update
printdeck-credentialsmake the password and the API key at the first start
printdeck-settingsapply the settings of the config partition
printdeck-wifi SSID PASSWORD [COUNTRY]set the Wi-Fi network

The deck runs as the user deck. The actions that need root go through the system helper (printdeck helper) on a socket. See How it works.