Development/Running on Linux

From MatterControl Manual
Jump to: navigation, search

You can either download the official .deb package from MatterControl.com or build from source. There are also user contributed packages for Arch and Gentoo.

Installing Mono

MatterControl requires Mono version 3.10 or above. MatterControl works best with Mono 4.4. As of this writing (12/29/16) There is a bug in Mono 4.6 that prevents the cloud services from establishing a full connection. The connection indicator will remain yellow. All other features are fully functional.

If you are on an older version of Ubuntu (before Xenial 16.04 LTS) or Fedora that does not have the latest Mono then you can add the official Xamarin repository to get up to date. The official MatterControl download currently comes with a shell script to do this automatically on Debian based distros.

   $ sudo apt-get install curl
   $ curl -s http://download.mono-project.com/repo/xamarin.gpg | sudo apt-key add -
   $ echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.4.2 main" | sudo tee /etc/apt/sources.list.d/xamarin.list
   $ sudo apt-get update
   $ sudo apt-get -y install mono-complete

There are also instructions for other distributions on the Mono website.

Serial Port Permissions

In order for MatterControl to access the serial ports, you will need to give your user the appropriate permissions. On Debian or Fedora based distros, add yourself to the dialout group. On Arch, add yourself the the uucp and lock groups instead.

   $ gpasswd -a $USER dialout

You will then need to logout and log back in for the changes to take effect.

Assigning Serial Ports

On Linux, serial port assignments can change whenever a printer is connected or disconnected. MatterControl cannot tell which printer is connected to which serial port. You can setup a udev rule to permanently assign a unique port to your printer.

Do ls /dev/tty* before and after connecting your printer to find out which port it is assigned to. Printers will show up as either /dev/ttyACM# or /dev/ttyUSB#.

Use udevadm to get the serial number (UUID) of the USB device. This is a unique 20 digit hexadecimal value.

$ udevadm info --attribute-walk -n /dev/ttyACM0 | grep "serial"

Some printers will not report a serial number. In this case, you will have to use other attributes to identify it such as the vendor ID (idVendor) and the product ID (idProduct).

Create a file /etc/udev/rules.d/97-3dprinters.rules. Here is an example with rules for two printers.

   SUBSYSTEM=="tty", ATTRS{serial}=="6403237383335190E0F1", GROUP="uucp", MODE="0660", SYMLINK+="tty-taz"
   SUBSYSTEM=="tty", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="076b", GROUP="uucp", MODE="0660", SYMLINK+="tty-kosselpro"

Fill in either the serial number or vender and product IDs based on the information you obtained earlier. Make sure `GROUP` is set to the same group ownership as the rest of your serial ports. This is usually `dialout` on Debian or `uucp` on Arch. You can check by doing ls -l /dev/ttyACM*. Lastly, give your printer a unique name for the `SYMLINK`. This name must start with `tty` or it will not show up in the list in MatterControl.

The next time you connect the printer, a symlink will automatically be created that points to the correct serial device. You can now edit the printer in MatterControl and choose the new device.

Adding Proprietary Plugins

If you are building from source, MatterControl will not come with certain proprietary components such as the Cloud Services or Print Notifications plugins. To get these, you will need to download the official release from mattercontrol.com and copy the following `.dll`, `.dll.config` and `.dll.mdb` files to your MatterControl directory.

   CloudServices.dll
   CloudServices.dll.config
   CloudServices.dll.mdb
   MatterControlAuth.dll
   MatterControlAuth.dll.config
   MatterControlAuth.dll.mdb
   Mono.Nat.dll
   Mono.Nat.dll.mdb
   PictureCreator.dll
   PictureCreator.dll.config
   PictureCreator.dll.mdb
   PrintNotifications.dll
   PrintNotifications.dll.config
   PrintNotifications.dll.mdb
   X3GDriver.dll
   X3GDriver.dll.config
   X3GDriver.dll.mdb

Using Other Slice Engines

MatterControl's built in slice engine is MatterSlice, which is a port of CuraEngine to C#. You can also choose other slicing engines. The official release comes with Slic3r, but when building from source or using unofficial packages you will have to install the other engines separately and make symlinks in the MatterControl directory. For example on Arch, make a symlink in /usr/lib/mattercontrol/Slic3r/bin to the Slic3r executable.

   # mkdir /usr/lib/MatterControl/Slic3r
   # mkdir /usr/lib/MatterControl/Slic3r/bin
   # ln -s /usr/bin/slic3r /usr/lib/MatterControl/Slic3r/bin/slic3r

To use CuraEngine, do

   # ln -s /usr/share/cura/CuraEngine /usr/lib/MatterControl/CuraEngine.exe

Yes, it expects the `.exe` extension even on Linux.

Raspberry Pi

The regular Linux version of MatterControl will run on the Pi as long as you have the experimental OpenGL drivers enabled. To do this, run raspi-config and go to Advanced Options > GL Driver.

If you have the Raspberry Pi touchscreen, remember that you can switch MatterControl into Touchscreen Mode.