Ender3V2S1
Ender3V2S1 copied to clipboard
add flatpack hack
Description
A hack that allows people using PrusaSlicer in flatpak generate previews using the python binary on their host system.
Also requires an edit of this part of the wiki: https://github.com/mriscoc/Ender3V2S1/wiki/How-to-generate-a-gcode-preview#for-prusasuper-slicer
### Flatpak on Linux
Since the flatpak build of PrusaSlicer includes `python` inside, but it lacks `Pillow` or `pip`, you can run the python script outside of the flatpak's sandbox on your host system (keep in mind this completely kills the security benefits of flatpak's sandboxing for the script you are running).
Open Flatseal (install using `flatpak install com.github.tchx84.Flatseal` if you don't have it installed), select PrusaSlicer on the sidebar and scroll down until you see Session Bus, there you will need to press the "+" button and add `org.freedesktop.Flatpak` to the list.
![image](https://user-images.githubusercontent.com/28237353/234108052-7fd75083-4d2d-4053-bcbd-818f8d180012.png)
After that make sure to restart PrusaSlicer, go into settings, and put `flatpak-spawn --env=FLATPAK=true --host /path/to/python3 /path/to/script.py ` in Post-processing scripts. You still need to install Pillow on your system (either use your distribution's package manager or pip).
Requirements
Benefits
Allows people using PrusaSlicer in flatpak on Linux to generate previews.
Configurations
Related Issues
I like this enhancement but I prefer not to merge and leave it available as a reference for advanced users.