Setup: Boot to Browser (OctoPi or Jessie Light)

Paul de Vries edited this page Jan 6, 2018 · 31 revisions

This is a guide for Jessie Lite or OctoPi (0.13 and higher)

Follow this guide for Jessie Full.

It's not recommended to use a single-core Raspberry Pi with OctoPrint and a touchscreen. The single-core processor is only recommended for running OctoPrint. Attaching third-party equipment (e.g. camera or touchscreen) can result in failing prints or slow performance.

Before starting with this guide, make sure you've installed OctoPrint and installed TouchUI from the 'Plugins Manager'.

  1. Make sure you've expanded your file system. Note: If you are using OctoPi, that has already been taken care of automatically on first boot, no need to do it manually.

  2. Make sure you've your touchscreen working by installing the required drivers.

  3. Make sure all packages are up-to-date:

    sudo apt-get update
  4. Install all required packages:

    sudo apt-get install --no-install-recommends xinit xinput xserver-xorg xserver-xorg-video-fbdev x11-xserver-utils matchbox unclutter chromium-browser
  5. Register your touchscreen to X11 by creating a new config:

    sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf
    • If your touchscreen is connected with HDMI, paste the following code:
      Use this if you're using the Official Pi Touchscreen

      Section "Device"
        Identifier "touchscreen"
        Driver "fbdev"
        Option "fbdev" "/dev/fb0"
    • Otherwise, paste the following code:

      Section "Device"
        Identifier "touchscreen"
        Driver "fbdev"
        Option "fbdev" "/dev/fb1"

    Save and exit (CTR-O, enter and CTR-X)

    note you can check the touchscreen mount name through ls /dev | grep fb. Ensure this matches what you add in 99-fbdev.conf

  6. Allow X11 to run as anybody by running the following command:
    Ignore this step if it fails

    sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
  7. Get the TouchUI boot files:

    git clone ~/TouchUI-autostart/		
  8. Copy service file and register it as auto boot:

    sudo cp ~/TouchUI-autostart/touchui.init /etc/init.d/touchui
    sudo chmod +x /etc/init.d/touchui
    sudo cp ~/TouchUI-autostart/touchui.default /etc/default/touchui
    sudo update-rc.d touchui defaults
  9. Test if your kernel can run Chromium by running the following command:

    • If you get the following error, you need to upgrade your kernel to the latest version, follow these extra steps.

      /usr/lib/chromium-browser/chromium-browser: symbol lookup error: /usr/lib/chromium-browser/chromium-browser: undefined symbol: mmal_vc_init_fd
    • The errors below are ok. So if you see these you can proceed to step 10:

      /usr/bin/chromium-browser: line 138: lsb_release: command not found 
      /usr/bin/chromium-browser: line 139: lsb_release: command not found
      bootstrap_helper: /usr/lib/chromium-browser/nacl_helper: Cannot open ELF file!  errno=2
      [1:1:0605/] Bad NaCl helper startup ack (0 bytes)
      [3904:3904:0605/] Failed to put Xlib into threaded mode.
      [3904:3904:0605/] Gtk: cannot open display:
  10. Reboot

Upgrading your kernel:

  1. Run:

    sudo apt-get upgrade
    sudo apt-get install rpi-update
  2. Run:

    sudo rpi-update
  3. Reboot:

    sudo reboot