Step 12.22 — Add the Mainsail include at the top of printer.cfg¶
Step 22 of 37 · Chapter 12 — Software: Pi OS image, Klipper/Moonraker/Mainsail, firmware, printer.cfg
(no image of your own printer yet — simulated printer: your numbers differ)
Parts: none.
Do: In Mainsail, Machine → open printer.cfg in the editor. It is already there under the right name, so no upload and no rename. Add one line at the very top, above the header comments:
[include mainsail.cfg]
Check
printer.cfg sits next to mainsail.cfg and moonraker.conf in the config list, and line 1 is the include.
What you're looking at
An [include] line pulls another config file in at that point. mainsail.cfg is already on the card and supplies the sections and macros the web interface needs: virtual SD card, display status, pause, resume, cancel.
Why: Mainsail needs [virtual_sdcard], [display_status], [pause_resume] and the PAUSE/RESUME/CANCEL_PRINT macros. mainsail.cfg is already on the SD card and bundles all six. Do not edit mainsail.cfg itself — it is a read-only include; override it later with a _CLIENT_VARIABLE macro in printer.cfg if you need to. src
Source: Mainsail mainsail.cfg · leviathan-printer-rev-d-sbv2.cfg