Building MatterControl for Raspberry Pi OS, Debian 11 Bullseye 64 bit - MatterHackers/MatterControl GitHub Wiki

Install Mono

Mono Install Instructions from linuxcapable.com

open a terminal by pressing press Ctrl+Alt+T

  • sudo apt update && sudo apt upgrade -y
  • sudo apt install dirmngr gnupg apt-transport-https ca-certificates -y
  • sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  • sudo sh -c 'echo "deb https://download.mono-project.com/repo/debian stable-buster main" > /etc/apt/sources.list.d/mono-official-stable.list'
  • sudo apt update -y
  • sudo apt install mono-complete -y
  • apt-cache policy mono-complete ##checking that Mono installed correctly

Install gcc and git in case we don't have it

gcc needed for libSetSerial build script

  • sudo apt install git gcc -y

Change Directory to /opt

or use /usr/bin or whatever directory you like to install software you build yourself

  • cd /opt

Clone Public Github repo, Chown MatterControl folder and Change Directory into folder

Normally we won't have permission in /opt, so we have to "sudo git clone"

libSetSerial only needed for 250000 baud rate

You can skip this, will not cause a build issue. But if you receive a communication error with your printer you can do this step retroactively, that is no need to rebuild. Most Pulse 3D Printers will require this however.

  • cd MatterControl.Printing/SerialHelper
  • chmod +x build.sh
  • ./build.sh

Change Directory back to MatterControl folder

If you following these instructions it will be /opt/MatterControl, but if you are using a different directory remember change /opt

  • cd /opt/MatterControl

Build MatterControl solution file

  • msbuild MatterControl.sln /restore /p:Configuration=Release -m

Create Symbolic Link for StaticData folder to bin/Release folder

unless you are using a different install directory

  • ln -s /opt/MatterControl/StaticData /opt/MatterControl/bin/Release

Change Directory to /bin/Release and use mono to launch MatterControl.exe

Again unless you are using a different install directory

  • cd /opt/MatterControl/bin/Release
  • mono MatterControl.exe

Misc.

  • If the window appears black and frozen simply resize the MatterControl window or minimize and maximize and that typically fixes it.
  • Fix for "X11 Error: BadMatch (invalid parameter attributes)" here
  • sudo access is required, and a 64 bit OS (kind of goes without saying)
  • This same process should work on any Distro assuming mono-complete can be installed, although for whatever reason Mono does not compile MC on Arch Linux.
  • Ignore the update notifications, this build confuses the update checker.
  • Cross compiling does work, simply copying the the MatterControl folder to directly of choice and use Mono to launch MatterControl.exe from inside /bin/Release folder or make a desktop link, or add it to PATH or whatever you'd like.
  • I haven't tested every MatterControl feature, but slicing connecting to printers, basic design features all work on my test build.