0004

Installing OctoPrint on Void Linux

To get my 3D Printer running, I had to install OctoPrint onto my iBook G4. Most of the commands are adapted from here.

# Dependencies
sudo xbps-install python3-devel
# Login as root
sudo su
# create the new user
useradd -m -G dialout,tty -s /bin/bash pi
passwd pi
# Login to pi user
su pi

Install OctoPrint in Void Linux

All of the dependencies got installed in the Klipper install, so this is pretty simple.

  1. make the directory
cd ~
mkdir OctoPrint && cd OctoPrint
  1. Setup Python3 venv
python3 -m venv venv
source venv/bin/activate
  1. Install Octoprint
./venv/bin/pip install pip --upgrade
./venv/bin/pip install octoprint
  1. Create runsv service(runit) direcotry and file
sudo su
mkdir /etc/sv/octoprint
touch /etc/sv/octoprint/run
chmod +x /etc/sv/octoprint/run
  1. Edit the file /etc/sv/octoprint/run
#!/bin/bash
export USER=pi
export HOME=/home/pi
groups="$(id -Gn "$USER" | tr ' ' ':')"

exec chpst -u "$USER:$groups" "$HOME"/OctoPrint/venv/bin/octoprint serve
  1. Enable Octoprint
sudo ln -srv /etc/sv/octoprint /var/service

Note: Octoprint on Void Linux seems not to support 250000 Baudrate.

Connecting to port /dev/ttyUSB0, baudrate 250000
Changing monitoring state from "Opening serial connection" to "Error"
Changing monitoring state from "Error" to "Offline after error"
Unexpected error while connecting to serial port /dev/ttyUSB0, baudrate 250000 from hook default: error: '(22, 'Invalid argument')' @ comm.py:_open_serial:3832

Next Post Previous Post