Building MatterControl for Ubuntu 20.04 - MatterHackers/MatterControl GitHub Wiki
Install Mono
Mono install instructions from mono-project.com
open a terminal by pressing press Ctrl+Alt+T
- sudo apt install gnupg ca-certificates -y
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
- sudo apt update -y
- sudo apt install mono-complete -y
- sudo 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/local/bin or whatever directory you'd like
- 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"
- sudo git clone --recurse-submodules https://github.com/MatterHackers/MatterControl.git
- sudo chown -R $USER:$USER /opt/MatterControl
- cd MatterControl
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.