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.
| Variable | Default | What it does |
|---|---|---|
DISPLAY_KIND | panel | Display 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 | -1 | 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. |
TOUCH_INVERT_X | 0 | Set to 1 if touches land mirrored. |
TOUCH_INVERT_Y | 0 | Set to 1 if touches land mirrored. |
TOUCH_SWAP_XY | 0 | Set to 1 if touches land mirrored. |
TOUCH_LOG | 0 | Set to 1 to log each touch sample (raw panel values and the position), to measure the calibration. |
TOUCH_OFFSET_X | 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_Y | 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. |
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_ORIGINS | https://zslice.beetlebug.org | 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. |
KLIPPY_SOCKET | /run/klipper/klippy.sock | The deck follows Klipper directly, and serves the OctoPrint-compatible API for slicers on REMOTE_ADDR. |
GCODE_DIR | /var/lib/klipper/gcodes | The deck follows Klipper directly, and serves the OctoPrint-compatible API for slicers on REMOTE_ADDR. |
KLIPPER_CONFIG | /var/lib/klipper/config/printer.cfg | printer.cfg of the Klipper host |
KLIPPY_LOG | /run/klipper/klippy.log | the 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/models | folder with STL files for the preview |
PREHEAT_TOOL | 200 | |
JOG_INVERT_Y | 0 | |
NIGHT_FROM | 20 | hours of the night theme in auto mode |
NIGHT_TO | 7 | hours of the night theme in auto mode |
PREHEAT_BED | 60 |
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.
| Variable | Where | What it does |
|---|---|---|
FIRMWARE_DIR | printdeck flash | The folder of the Klipper firmware files (default /usr/share/printdeck/firmware). |
DEMO_PREVIEW | printdeck demo, manual | A PNG file for the model view of the demo print. |
DEMO_HEAT | printdeck bench | Set: the bench shows a heater that heats. |
LCD_FONT | printdeck bench | A font for the display of the printer on the bench. |
PRINTDECK_SIM_DEBUG | printdeck app -sim | Set: the simulated board logs its homing. |
PRINTDECK_OS_CACHE | os/build.sh | The folder of the Buildroot tree, the downloads and the build files (default ~/.cache/printdeck-os). |
PRINTDECK_SIGNING_KEY | os/build.sh, CI | The 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_FILE | os/build.sh | The file of the key (default ~/.config/printdeck/update-signing-key.pem). |
GCODE_FILES | slicer tests | G-code files that test_adaptive_speed also checks: only the speeds may change. |