PRINTDECKDOCS

Reference

Environment variables

The settings of the deck, and the variables of the tools and the build.

The settings of the deck

To change a setting, put it in printdeck.txt on the PRINTDECK partition, in lower case, for example display_rotate=90. Then start the Pi again.

The service printdeck-deck loads /etc/printdeck/deck.env, then /var/lib/printdeck/api.env, then /var/lib/printdeck/settings.env (from printdeck.txt). See Files, paths and services.

VariableDefaultWhat it does
DISPLAY_KINDpanelDisplay is the screen of the UI: "panel" (the framebuffer and the touch panel of the deck) or "none" (no local screen; the remote screen only).
FRAMEBUFFER/dev/fb0
DISPLAY_ROTATE-190 or 270 for a wide display that is mounted tall, whichever is the right way up. 0 or 180 for a display that shows its native shape: wide gives the wide layout. Empty: 0 for a tall panel (the Raspberry Pi Touch Display 2), 270 for a wide panel.
TOUCH_INVERT_X0Set to 1 if touches land mirrored.
TOUCH_INVERT_Y0Set to 1 if touches land mirrored.
TOUCH_SWAP_XY0Set to 1 if touches land mirrored.
TOUCH_LOG0Set to 1 to log each touch sample (raw panel values and the position), to measure the calibration.
TOUCH_OFFSET_X0Move each touch by this many pixels (right and down are positive), for a panel that reads the touches beside the finger. Measure the offset with TOUCH_LOG=1.
TOUCH_OFFSET_Y0Move each touch by this many pixels (right and down are positive), for a panel that reads the touches beside the finger. Measure the offset with TOUCH_LOG=1.
STATE_DIRECTORY/var/lib/printdeck
REMOTE_ADDR(empty)The remote screen: open http://printdeck.local and log in with the password of the printdeck user. Empty turns it off.
TLS_ADDR(empty)The same pages on HTTPS, with a certificate for the name that the cloud service gives the deck (Settings, Cloud). The name has the LAN address of the deck in public DNS. HTTP stays on. Empty turns it off.
WEB_ORIGINShttps://zslice.beetlebug.orgThe web pages that can call the API for slicers from the browser, separated by spaces: the zslice web app sends prints to the deck. Each call still needs the API key, and a print starts only with a press on the touch screen. "none" turns it off.
KLIPPY_SOCKET/run/klipper/klippy.sockThe deck follows Klipper directly, and serves the OctoPrint-compatible API for slicers on REMOTE_ADDR.
GCODE_DIR/var/lib/klipper/gcodesThe deck follows Klipper directly, and serves the OctoPrint-compatible API for slicers on REMOTE_ADDR.
KLIPPER_CONFIG/var/lib/klipper/config/printer.cfgprinter.cfg of the Klipper host
KLIPPY_LOG/run/klipper/klippy.logthe log of the Klipper host, for the system page
OCTOPRINT_API_KEY(empty)the key of the OctoPrint-compatible API for slicers
MODEL_DIR/var/lib/printdeck/modelsfolder with STL files for the preview
PREHEAT_TOOL200
JOG_INVERT_Y0
NIGHT_FROM20hours of the night theme in auto mode
NIGHT_TO7hours of the night theme in auto mode
PREHEAT_BED60

deck.env of the image

# Settings for the touch screen. Restart it after a change: sudo systemctl restart printdeck-deck

# The deck follows Klipper directly, and serves the OctoPrint-compatible API for slicers on
# REMOTE_ADDR.
KLIPPY_SOCKET=/run/klipper/klippy.sock
GCODE_DIR=/var/lib/klipper/gcodes

# The remote screen: open http://printdeck.local and log in with the password of the printdeck user.
# Empty turns it off.
REMOTE_ADDR=:80

# The same pages on HTTPS, with a certificate for the name that the cloud service gives the deck
# (Settings, Cloud). The name has the LAN address of the deck in public DNS. HTTP stays on.
# Empty turns it off.
TLS_ADDR=:443

# The web pages that can call the API for slicers from the browser, separated by spaces: the zslice
# web app sends prints to the deck. Each call still needs the API key, and a print starts only with
# a press on the touch screen. "none" turns it off.
WEB_ORIGINS=https://zslice.beetlebug.org

# 90 or 270 for a wide display that is mounted tall, whichever is the right way up. 0 or 180 for
# a display that shows its native shape: wide gives the wide layout. Empty: 0 for a tall panel
# (the Raspberry Pi Touch Display 2), 270 for a wide panel.
DISPLAY_ROTATE=
# Set to 1 if touches land mirrored.
TOUCH_INVERT_X=0
TOUCH_INVERT_Y=0
TOUCH_SWAP_XY=0
# Move each touch by this many pixels (right and down are positive), for a panel that reads the
# touches beside the finger. Measure the offset with TOUCH_LOG=1.
TOUCH_OFFSET_X=0
TOUCH_OFFSET_Y=0
# Set to 1 to log each touch sample (raw panel values and the position), to measure the calibration.
TOUCH_LOG=0

PREHEAT_TOOL=200
PREHEAT_BED=60

FILAMENT_UNLOAD_MM=80
FILAMENT_LOAD_MM=70
JOG_INVERT_Y=0

NIGHT_FROM=20
NIGHT_TO=7

Other variables

These variables are for the tools and the build. The window of the desktop app has its own: see the window.

VariableWhereWhat it does
FIRMWARE_DIRprintdeck flashThe folder of the Klipper firmware files (default /usr/share/printdeck/firmware).
DEMO_PREVIEWprintdeck demo, manualA PNG file for the model view of the demo print.
DEMO_HEATprintdeck benchSet: the bench shows a heater that heats.
LCD_FONTprintdeck benchA font for the display of the printer on the bench.
PRINTDECK_SIM_DEBUGprintdeck app -simSet: the simulated board logs its homing.
PRINTDECK_OS_CACHEos/build.shThe folder of the Buildroot tree, the downloads and the build files (default ~/.cache/printdeck-os).
PRINTDECK_SIGNING_KEYos/build.sh, CIThe ed25519 key in PEM that signs the update bundle. With no key, the bundle has no signature, and only a debug image installs it.
PRINTDECK_SIGNING_KEY_FILEos/build.shThe file of the key (default ~/.config/printdeck/update-signing-key.pem).
GCODE_FILESslicer testsG-code files that test_adaptive_speed also checks: only the speeds may change.