From b94d01cea2bd7c90da54391dc01dae3e2d89216a Mon Sep 17 00:00:00 2001 From: Logan Gartner Date: Tue, 11 Aug 2020 01:04:29 -0600 Subject: [PATCH] Implemented GUI, build OctoPrint GUI has been implemented using NoDM Some files have been shifted to more appropriate stages Updated the name in NOOBS (although whats the point?) OctoPrint is now built and installed Removed LightDM as its a buggy mess --- build.sh | 2 +- export-image/04-finalise/01-run.sh | 2 +- stage1/00-boot-files/files/config.txt | 2 +- stage1/01-sys-tweaks/00-run.sh | 3 + stage1/01-sys-tweaks/files/.xprofile | 1 + stage1/01-sys-tweaks/files/autostart | 1 + stage2/01-sys-tweaks/00-packages | 6 - stage2/01-sys-tweaks/01-run.sh | 2 +- stage2/04-octoprint/00-packages | 6 + stage2/04-octoprint/01.run.sh | 11 ++ stage2/EXPORT_NOOBS | 4 +- stage3/00-install-packages/00-packages | 1 + stage3/00-install-packages/00-packages-nr | 1 - stage3/00-install-packages/01-run.sh | 2 + stage3/00-install-packages/files/nodm.conf | 2 + stage3/01-tweaks/00-run.sh | 2 + stage3/01-tweaks/files/lightdm.conf | 164 +++++++++++++++++++++ stage3/EXPORT_NOOBS | 2 + 18 files changed, 201 insertions(+), 13 deletions(-) create mode 100644 stage1/01-sys-tweaks/files/.xprofile create mode 100644 stage1/01-sys-tweaks/files/autostart create mode 100644 stage2/04-octoprint/00-packages create mode 100755 stage2/04-octoprint/01.run.sh create mode 100644 stage3/00-install-packages/files/nodm.conf create mode 100644 stage3/01-tweaks/files/lightdm.conf create mode 100644 stage3/EXPORT_NOOBS diff --git a/build.sh b/build.sh index 7d00af5..5da3653 100755 --- a/build.sh +++ b/build.sh @@ -159,7 +159,7 @@ export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}" export SCRIPT_DIR="${BASE_DIR}/scripts" export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}" export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"} -export DEPLOY_ZIP="${DEPLOY_ZIP:-0}" +export DEPLOY_ZIP="${DEPLOY_ZIP:-2}" export LOG_FILE="${WORK_DIR}/build.log" export TARGET_HOSTNAME=${TARGET_HOSTNAME:-octoprintkiosk} diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index bc8ba7c..aaa3e99 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -95,7 +95,7 @@ if [ "${DEPLOY_ZIP}" == "1" ]; then "$(basename "${IMG_FILE}")" popd > /dev/null elif [ "${DEPLOY_ZIP}" == "2" ]; then - xz -z -c "$IMG_FILE" > "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img.xz" + xz -z -c -T$(nproc) "$IMG_FILE" > "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img.xz" else cp "$IMG_FILE" "$DEPLOY_DIR" fi diff --git a/stage1/00-boot-files/files/config.txt b/stage1/00-boot-files/files/config.txt index 548f4ac..b7ca90b 100644 --- a/stage1/00-boot-files/files/config.txt +++ b/stage1/00-boot-files/files/config.txt @@ -7,7 +7,7 @@ # uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan -#disable_overscan=1 +disable_overscan=1 # uncomment the following to adjust overscan. Use positive numbers if console # goes off screen, and negative if there is too much border diff --git a/stage1/01-sys-tweaks/00-run.sh b/stage1/01-sys-tweaks/00-run.sh index 9c380ec..f769e9e 100755 --- a/stage1/01-sys-tweaks/00-run.sh +++ b/stage1/01-sys-tweaks/00-run.sh @@ -3,6 +3,9 @@ install -d "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d" install -m 644 files/noclear.conf "${ROOTFS_DIR}/etc/systemd/system/getty@tty1.service.d/noclear.conf" install -v -m 644 files/fstab "${ROOTFS_DIR}/etc/fstab" +install -m 755 files/.xprofile "${ROOTFS_DIR}/etc/skel/.xprofile" +mkdir -p "${ROOTFS_DIR}/etc/skel/.config/openbox" +install -m 644 files/autostart "${ROOTFS_DIR}/etc/skel/.config/openbox/autostart" on_chroot << EOF if ! id -u ${FIRST_USER_NAME} >/dev/null 2>&1; then diff --git a/stage1/01-sys-tweaks/files/.xprofile b/stage1/01-sys-tweaks/files/.xprofile new file mode 100644 index 0000000..5d3d1f9 --- /dev/null +++ b/stage1/01-sys-tweaks/files/.xprofile @@ -0,0 +1 @@ +exec openbox-session diff --git a/stage1/01-sys-tweaks/files/autostart b/stage1/01-sys-tweaks/files/autostart new file mode 100644 index 0000000..3cf629e --- /dev/null +++ b/stage1/01-sys-tweaks/files/autostart @@ -0,0 +1 @@ +surf -d -F -g -K -n -p google.com & diff --git a/stage2/01-sys-tweaks/00-packages b/stage2/01-sys-tweaks/00-packages index 06ff829..39892fd 100644 --- a/stage2/01-sys-tweaks/00-packages +++ b/stage2/01-sys-tweaks/00-packages @@ -15,12 +15,6 @@ unzip build-essential manpages-dev python -python-pip -python-dev -python-setuptools -python-virtualenv -git -libyaml-dev bash-completion gdb pkg-config diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 8d28adc..adee88b 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -40,7 +40,7 @@ on_chroot <