PRINTDECKDOCS

Reference

Files, paths and services

The config partition, the files of the deck, and the services of the image.

The PRINTDECK partition

The first partition of the disk is FAT, with the label PRINTDECK. Any computer can open it. See How it works for the other partitions.

FileWhat it is
printdeck.txtThe settings that you can change before the first start, and the settings of the touch screen. The file below.
autoboot.txtThe A/B switch of the Pi firmware. printdeck-update and printdeck-commit change it.
printer.cfgA Klipper configuration that you put there. The next start copies it to Klipper and renames it to printer.cfg.imported.
printdeck-boot.logThe kernel log, when printdeck-init cannot continue.

printdeck.txt

# Printdeck settings
#
# Edit this file on any computer before the first boot, or set the Wi-Fi on the touch screen.
# The Pi reads this file at each boot. Then it clears wifi_password.

# The Wi-Fi network. wifi_country is the two-letter country code.
wifi_ssid=
wifi_password=
wifi_country=US

# The web pages (http://printdeck.local) have a random password. The touch screen shows it
# (Print > Control > Help). The debug image also has the user "printdeck" with this password for
# SSH. A public SSH key here lets you log in to the debug image with the key, on one line.
ssh_key=

# The name that slicers show, and the name on the network (http://printdeck.local). Settings,
# Name on the deck sets both. An empty name keeps "Printdeck".
name=
hostname=printdeck
timezone=America/New_York

# The settings of the touch screen. An empty value keeps the setting of the image.
# display_rotate: 90 or 270 to turn a wide display to tall, 0 or 180 for the native shape of the
#   display (a wide shape gives the wide layout). Empty: 0 for a tall display (the Raspberry Pi
#   Touch Display 2), 270 for a wide display.
# touch_invert_x, touch_invert_y, touch_swap_xy: 1 to turn the touch axes.
# preheat_tool, preheat_bed: the temperatures of the Preheat button.
# night_from, night_to: the hours of the night colors.
display_rotate=
touch_invert_x=
touch_invert_y=
touch_swap_xy=
preheat_tool=
preheat_bed=
night_from=
night_to=

Paths on the deck

PathWhat it is
/etc/printdeck/deck.envThe settings of the deck, in the image. See the environment variables.
/var/lib/printdeck/The state folder of the deck (STATE_DIRECTORY). Only the deck can read it.
/var/lib/printdeck/passwordThe password of the web pages, from printdeck-credentials at the first start.
/var/lib/printdeck/api.envThe API key for slicers (OCTOPRINT_API_KEY), from printdeck-credentials.
/var/lib/printdeck/settings.envThe settings from printdeck.txt, from printdeck-settings at each start.
/var/lib/printdeck/apikeys.jsonThe keys that the App Keys flow gave to slicers.
/var/lib/printdeck/spools.jsonThe rolls of filament.
/var/lib/printdeck/history.jsonThe history of the prints.
/var/lib/printdeck/theme, clock, materialThe theme (day, night, auto), the clock (12 or 24) and the loaded material.
/var/lib/printdeck/update-channelThe update channel: beta, or stable.
/var/lib/printdeck/models/STL files for the model view (MODEL_DIR). An STL with the name of the G-code file gives a shaded model.
/var/lib/klipper/config/printer.cfgThe Klipper configuration (KLIPPER_CONFIG).
/var/lib/klipper/gcodes/The G-code files: the uploads of the slicers, the folder of [virtual_sdcard] (GCODE_DIR).
/var/lib/klipper/logs/klippy.logThe log of the Klipper host.
/run/klipper/klippy.sockThe API socket of the Klipper host (KLIPPY_SOCKET).
/usr/share/printdeck/klipper/printdeck.cfgThe Klipper sections that Printdeck needs. printer.cfg includes it as its last line.
/usr/share/printdeck/firmware/The Klipper firmware files for the boards, and their version.
/var/log/journal/The journal, on the data partition.
/data/The data partition, with the writable layer over /etc, /var, /home and /root.

printdeck.cfg

# The Klipper sections that Printdeck needs. Include this file at the END of printer.cfg:
#
#   [include /usr/share/printdeck/klipper/printdeck.cfg]
#
# Klipper uses the last value of a setting, so the end makes these settings win over the same
# sections in printer.cfg, for example a [virtual_sdcard] path of another setup.
#
# Printdeck saves the uploads of the slicers in this folder, and starts them with
# SDCARD_PRINT_FILE.
[virtual_sdcard]
path: /var/lib/klipper/gcodes

# Pause, resume and cancel (PAUSE, RESUME, CANCEL_PRINT) for the touch screen and the slicers.
[pause_resume]

# The progress and the M117 message of the print.
[display_status]

# The deck draws the display of the printer, and reads its knob. With no [display] in printer.cfg,
# this section has no effect.
[printdeck_display]

# A pause with a message for the user, for a part in a pocket or an insert (PRINTDECK_PAUSE), with a
# height check on the part. The Printdeck plugin for Cura writes it in the G-code.
[printdeck_pause]

# The park of the toolhead for the pictures of the camera of the deck: a frame of the time lapse at
# each layer change, and the picture of the first layer (PRINTDECK_TIMELAPSE). The deck turns it on
# in Settings, then Time lapse.
[printdeck_timelapse]

Services

The units of the image, in os/board/rootfs/usr/lib/systemd/system/:

UnitDescription
klipper.serviceKlipper 3D printer host (the Go port in the Printdeck program)
printdeck-commit.serviceMake the new slot the default after an update
printdeck-credentials.serviceMake the Printdeck login at the first start
printdeck-deck.servicePrintdeck touch screen
printdeck-helper.servicePrintdeck system helper: the actions of the deck that need root
printdeck-helper.socketThe socket of the Printdeck system helper
printdeck-settings.serviceApply the settings in printdeck.txt

The deck serves the web pages on port 80. The address on the network is printdeck.local (mDNS), or the hostname of printdeck.txt.

The desktop app

The app keeps its files in the configuration folder of the user, in Printdeck, or Printdeck Sim with -sim. On Linux that is ~/.config/Printdeck. The -dir flag sets another folder. The web server is on 127.0.0.1:7351. See printdeck app.