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.
| File | What it is |
|---|---|
printdeck.txt | The settings that you can change before the first start, and the settings of the touch screen. The file below. |
autoboot.txt | The A/B switch of the Pi firmware. printdeck-update and printdeck-commit change it. |
printer.cfg | A Klipper configuration that you put there. The next start copies it to Klipper and renames it to printer.cfg.imported. |
printdeck-boot.log | The 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
| Path | What it is |
|---|---|
/etc/printdeck/deck.env | The 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/password | The password of the web pages, from printdeck-credentials at the first start. |
/var/lib/printdeck/api.env | The API key for slicers (OCTOPRINT_API_KEY), from printdeck-credentials. |
/var/lib/printdeck/settings.env | The settings from printdeck.txt, from printdeck-settings at each start. |
/var/lib/printdeck/apikeys.json | The keys that the App Keys flow gave to slicers. |
/var/lib/printdeck/spools.json | The rolls of filament. |
/var/lib/printdeck/history.json | The history of the prints. |
/var/lib/printdeck/theme, clock, material | The theme (day, night, auto), the clock (12 or 24) and the loaded material. |
/var/lib/printdeck/update-channel | The 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.cfg | The 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.log | The log of the Klipper host. |
/run/klipper/klippy.sock | The API socket of the Klipper host (KLIPPY_SOCKET). |
/usr/share/printdeck/klipper/printdeck.cfg | The 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/:
| Unit | Description |
|---|---|
klipper.service | Klipper 3D printer host (the Go port in the Printdeck program) |
printdeck-commit.service | Make the new slot the default after an update |
printdeck-credentials.service | Make the Printdeck login at the first start |
printdeck-deck.service | Printdeck touch screen |
printdeck-helper.service | Printdeck system helper: the actions of the deck that need root |
printdeck-helper.socket | The socket of the Printdeck system helper |
printdeck-settings.service | Apply 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.