PrusaSlicer¶
Configure PrusaSlicer for optimal use with Mainsail and Klipper.
Thumbnails¶
To display thumbnail previews in Mainsail, you need to configure the G-code flavor and thumbnail settings in PrusaSlicer.
- Open Printer Settings > General
- Set G-code flavor to
Klipper - Set G-code thumbnails to
32x32/PNG, 400x300/PNG
![]()
Layer Information¶
To have Slicer based layer information displayed in Mainsail, you have to add some lines of G-Code to the Slicer Printer Settings. Open the Printers Tab (in the topbar) and then Custom G-code set these lines of G-Code:
-
Start G-Code (before your start G-Code):
-
End G-Code (at the last line):
-
After layer change G-Code:
Exclude Objects¶
PrusaSlicer 2.7.0 and newer supports native object labeling for Klipper's Exclude Objects feature, eliminating the need for Moonraker preprocessing.
- Open Printer Settings > General
- Set G-code flavor to
Klipper - Open Print Settings > Output options
- Set Label objects to
Firmware-specific


Version Requirement
Native Exclude Objects support requires PrusaSlicer version 2.7.0 or newer. For older versions, use Moonraker preprocessing.
Upload to Printer¶
Upload G-code files directly from PrusaSlicer to your printer using the Physical Printer feature with Moonraker integration.
- Click the cogs icon next to the printer name
-
Select Add physical printer

-
Configure the physical printer settings:
- Host Type:
Klipper (via Moonraker) - Hostname, IP or URL: Your Mainsail address, e.g.,
mainsail.local

- Host Type:
-
Click Test to verify the connection
- Click OK to save
After configuration, you can upload G-code directly to your printer using the Send to printer button in the slice dialog or via File > Export > Send a G-Code.