#!/usr/bin/env bash set -x set -e # CustomPiOS generation script # Helper script that runs in a Raspbian chroot to create the CustomPiOS distro gui module # Written by Guy Sheffer # GPL V3 source /common.sh unpack /filesystem/opt /opt/custompios pi unpack /filesystem/root_init / ln -s /opt/custompios/scripts /home/pi/scripts echo exit 101 > /usr/sbin/policy-rc.d chmod +x /usr/sbin/policy-rc.d apt-get update apt-get install -y --force-yes matchbox-window-manager xorg lightdm xinput if [ "$GUI_INCLUDE_ACCELERATION" == "yes" ] then apt_update_skip apt-get -y --force-yes install xcompmgr libgl1-mesa-dri mesa-utils compton libconfig9 # Hack to pass non-interactive install mv /usr/bin/whiptail /usr/bin/whiptail.bak echo "#!/bin/bash" > /usr/bin/whiptail echo "exit 0" >> /usr/bin/whiptail chmod 755 /usr/bin/whiptail apt-get -y --force-yes install rpi-chromium-mods rm /usr/bin/whiptail mv /usr/bin/whiptail.bak /usr/bin/whiptail if [ -e /usr/share/X11/xorg.conf.d/99-fbturbo.conf ]; then mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.~ fi systemctl enable enable_gpu_first_boot.service else echo "gpu_mem=128" >> /"${BASE_BOOT_MOUNT_PATH}"/config.txt fi