Month: January 2017

Setting up Raspberry Pi as a Kiosk

Octoprint LogoI run a 3D printer at home, and to control it I use the excellent OctoPrint (written by the awesome Gina Häußge), distributed as a ready-to-go SD image OctoPi.  I use port forwarding and can control and check in on the printer visually through OctoPrint.

At work I now have a Lulzbot TAZ 6 printer, but not the network control to port forward, etc., so I am trying Astroprint, which is based on top of OctoPrint and offers a web-based service to manage and monitor your 3D printer.   I will soon find out if that will work correctly behind the corporate firewall.  Locally, Astroprint offers a web-based interface, which should be convenient for me and others to work with the printer.

Astroprint LogoAt the printer itself, I wanted more than just the built in ‘full graphic controller’ with wheel and click to control it.  To add to the Astroprint Raspberry Pi, I bought the official Raspberry Pi 7″ LCD and a nice bamboo case/stand, which makes a much nicer control ability; both direct and remote.   

The Astroprint image is meant to run ‘head-less’, so took a bit of work to set up as a kiosk interface to the controller.  After digging around the not-so-seedy parts of the interwebs, I was finally able to gather the information I needed to make this happen.  I will try to post links to all articles to which I referred, at the end of the post.

Step 1 – Install GUI

The GUI is not installed on the Astrobox image to save space, but we need it.  Sign into your RPi as the standard pi user and run these commands, which will install the files needed:

sudo apt-get install lxde lightdm xinit xserver-xorg

Step 2 – Install chromium browser

The chromium browser is easy to configure for a kiosk mode.  Still as the local pi user, run these commands to install the browser:

# Make sure everything installed is up-to-date
sudo apt-get update
# Download public key and install source to get chromium browser
wget -qO - http://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
echo "deb http://dl.bintray.com/kusti8/chromium-rpi jessie main" | sudo tee -a /etc/apt/sources.list
# Make sure (again) that everything is up-to-date
sudo apt-get update
# Install the browser, x11-xserver-utils, and unclutter (hides mouse when no movement) 
sudo apt-get install chromium-browser x11-xserver-utils unclutter

Step 3 – Setup chromium kiosk mode

# The lines are added to the autostart file for user pi  
# Stop the screensaver from running on startup
sudo sed -i.bak -e 's/@xscreensaver -no-splash/#@xscreensaver -no-splash/' ~/.config/lxsession/LXDE/autostart
# Turn off power savings and timeouts
sudo sed -i.bak -e "$a@xset s off" ~/.config/lxsession/LXDE/autostart
sudo sed -i.bak -e "$a@xset -dpms" ~/.config/lxsession/LXDE/autostart
sudo sed -i.bak -e "$a@xset s noblank" ~/.config/lxsession/LXDE/autostart
# Checks and clears flag that is created on a crash or unexpected restart
sudo sed -i.bak -e "$a@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences" ~/.config/lxsession/LXDE/autostart
# Start the chromium browser with desired URL. "--enable-offline-auto-reload" will help with network disconnects
sudo sed -i.bak -e "$a@chromium-browser --noerrdialogs --disable-infobars --incognito --enable-offline-auto-reload --kiosk http://localhost" ~/.config/lxsession/LXDE/autostart

Step 4 – Setup Raspian to boot into GUI

If you haven’t done this step already, run these commands to tell the Raspberry Pi to boot into GUI versus command line.

sudo raspi-config

In the version I am using (

Getting Raspbian to boot GUI

I found this good article about getting Raspbian Jessie Lite to boot with GUI.   I found that I also had to run

sudo apt-get install xorg

to finally get it to work.

[SOLVED] Controlling Astroprint directly from installed Pi?

Been looking around and can’t seem to find an answer. I have Astroprint installed and working on a Raspberry Pi on my Taz5 printer. I’m wondering if it’s possible to control the astroprint software directly from the Pi, with a monitor, keyboard and mouse connected to the Raspberry Pi that’s running the Astroprint software.

 

Multiple printers with one RPi and OctoPrint…

I will have to remember this if I need to run more than one…

 

Control Multiple 3D Printers Using A Single Raspberry Pi and Octoprint

When they asked me to run the 3D-printing department over at TheLab.ms makerspace, I knew right away that we had to use OctoPrint. I’ve been using OctoPrint to run my MakerFarm Prusa i3 printer at home, and I have been very pleased with it.