| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| git.txt | ||
| LaserGRBL.exe | ||
| README.md | ||
| threshold-linux-fix.patch | ||
| TUTORIAL.md | ||
LaserGRBL under Linux (Wine) — fixed build
(note : I added the already compiled LasrGRBL.exe" ojn my Debian/Trixie linux box)
LaserGRBL is a Windows GUI for GRBL laser cutters. This repo documents how to
run it under Linux with Wine, including a fix for the raster-import hang where
only 1bit BW Dithering worked and Line-to-Line / Vectorize / Centerline spun
forever.
Root cause: ImageTransform.Threshold() used
ImageAttributes.SetThreshold(), which Wine's built-in gdiplus does not
implement (fixme:gdiplus:GdipSetImageAttributesThreshold not implemented →
NotImplementedException). The preview thread swallows the exception, so the
progress spinner never stops. Dithering was the only tool skipping Threshold().
Fix: portable per-pixel threshold with LockBits (no ImageAttributes).
See threshold-linux-fix.patch and
Resources/LaserGRBL-master/LaserGRBL/RasterConverter/ImageTransform.cs:61.
Prerequisites
- Wine 11 (with 32-bit support,
wine-stable-i386) mono-complete6.12 +libgdiplus6.1 (for rebuilding withxbuild)- Original LaserGRBL source in
Resources/LaserGRBL-master/(git-ignored reference copy)
Verified with: wine-11.0, Mono JIT 6.12.0.199, libgdiplus 6.1.
Quick start
- Install LaserGRBL once under Wine (produces
~/.wine/drive_c/Program Files (x86)/LaserGRBL/LaserGRBL.exe):wine install.exe - Rebuild with the fix (from repo root):
xbuild Resources/LaserGRBL-master/LaserGRBL.sln /p:Configuration=Release - Back up and install the fixed exe:
WINE_EXE="$HOME/.wine/drive_c/Program Files (x86)/LaserGRBL/LaserGRBL.exe" cp "$WINE_EXE" "$WINE_EXE.bak-$(date +%Y%m%d-%H%M)" cp Resources/LaserGRBL-master/LaserGRBL/bin/Release/LaserGRBL.exe "$WINE_EXE" - Launch:
wine "$HOME/.wine/drive_c/Program Files (x86)/LaserGRBL/LaserGRBL.exe"
See TUTORIAL.md for the full step-by-step (serial port, image-import test,
troubleshooting).
Repo layout
Resources/— upstream source copy (ignored by git, see.gitignore)threshold-linux-fix.patch— the runtime fix forThreshold()README.md/TUTORIAL.md— this documentation
Linux build notes
xbuild needs three trivial local adjustments in the Resources/ copy
(Windows-only / case issues, no behavior change on Windows):
LaserGRBL/UserControls/MyPictureBox.designer.cs→ symlink toMyPictureBox.Designer.cs(case-sensitive filesystem)LaserGRBL/Telegram.cs:20,22→is nullto== null(mcs ≤ 7.2)LaserGRBL/PreviewForm.cs:12→ drop unusedusing System.Diagnostics.Eventing.Reader;LaserGRBL/MainForm.cs:573→ explicitTools.ModifyProgressBarColor.SetState(PbBuffer.ProgressBar, …)(mcs ambiguity)