Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastProject committed May 30, 2018
0 parents commit d8b7844
Show file tree
Hide file tree
Showing 14 changed files with 801 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
src/config.local
src/image/*.zip
src/custompios_path
src/build.log
src/workspace/*
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
sudo: required
language: generic
os: linux

before_install:
- sudo apt update
- sudo apt install realpath p7zip-full qemu-user-static

script:
- pushd ../
- git clone https://github.com/guysoft/CustomPiOS.git
- popd
- cd src/image
- wget -c 'https://downloads.raspberrypi.org/raspbian_lite_latest' -O 'latest-raspbian.zip'
- cd ../
- ../../CustomPiOS/src/update-custompios-paths
- sudo modprobe loop
- sudo bash ./build_dist
- wget https://github.com/probonopd/uploadtool/raw/master/upload.sh

after_success:
- if [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
- zip -j minimal-kiosk-os-$(date +"%Y-%m-%d").zip workspace/*.img
- bash upload.sh *.zip

branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# minimalKioskOS
[![Build Status](https://travis-ci.org/TheLastProject/minimalKioskOS.svg?branch=master)](https://travis-ci.org/TheLastProject/minimalKioskOS)

minimalKioskOS is a small [CustomPiOS](https://github.com/guysoft/CustomPiOS) system modelled after [FullPageOS](https://github.com/guysoft/FullPageOS).

minimalKioskOS starts Chromium with the URL defined in /boot/url.txt.

## Why not use FullPageOS?

minimalKioskOS focuses on security more. By default, it's locked down and not running any unnecessary processes. Just Chromium in Kiosk mode with the page you want. If anything goes wrong, there's no way to login and fix things (the password is randomized on first boot for security). Just power-cycle it.

In comparison, FullPageOS runs Lighttpd, keeps the default pi:raspberry username:password combination, has SSH and X11VNC set up.

## How to use it?

*In most cases, you will probably want the continuous build, as this is rebuild once a month using a Travis cron and will contain the latest security patches released for Raspbian. However, it has not been tested. If you are more concerned with proper testing than security patches, use a stable release.*

1. Download a build from the releases tab on GitHub
2. Unzip
3. Install it [like any other Raspberry Pi image](https://www.raspberrypi.org/documentation/installation/installing-images/README.md)

## Building minimalKioskOS

```
sudo apt-get install realpath p7zip-full qemu-user-static
git clone https://github.com/guysoft/CustomPiOS.git
git clone https://github.com/TheLastProject/minimalKioskOS.git
cd minimalKioskOS/src/image
wget -c 'https://downloads.raspberrypi.org/raspbian_lite_latest' -O 'latest-raspbian.zip'
cd ..
../../CustomPiOS/src/update-custompios-paths
sudo modprobe loop
sudo bash -x ./build_dist
```
8 changes: 8 additions & 0 deletions src/build_dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export DIST_PATH=${DIR}
export CUSTOM_PI_OS_PATH=$(<${DIR}/custompios_path)
export PATH=$PATH:$CUSTOM_PI_OS_PATH

${CUSTOM_PI_OS_PATH}/build_custom_os $@
5 changes: 5 additions & 0 deletions src/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export DIST_NAME=minimalKioskOS
export DIST_VERSION=0.1
export MODULES="base(network, disable-services(gui(minimalkioskos)))"

export GUI_STARTUP_SCRIPT=/home/pi/scripts/startup.sh
Empty file added src/image/.empty
Empty file.
Empty file.
1 change: 1 addition & 0 deletions src/modules/minimalkioskos/filesystem/boot/url.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://example.com/
11 changes: 11 additions & 0 deletions src/modules/minimalkioskos/filesystem/home/pi/scripts/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Give pi account a complex random password
NEWPW='$(openssl rand -base64 32 | tr -d 'EOF')'
passwd <<EOF
raspberry
$NEWPW
$NEWPW
EOF

# Start Chromium
chromium-browser --kiosk --touch-events=enabled --disable-pinch --noerrdialogs --disable-session-crashed-bubble --enable-offline-auto-reload --start-fullscreen --app=$(head -n 1 /boot/url.txt)
1 change: 1 addition & 0 deletions src/modules/minimalkioskos/filesystem/home/root/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
What you put in this folder will go to the home directory of root /root, and will have the root user permissions
Empty file.
31 changes: 31 additions & 0 deletions src/modules/minimalkioskos/start_chroot_script
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Setup minimalKioskOS
# Install Chromium and disable SSH
# Written by Sylvia van Os
# GPL V3
########


# Source error handling, leave this in place
set -x
set -e

source /common.sh

unpack /filesystem/home/pi /home/pi pi
unpack /filesystem/home/root /root root
unpack /filesystem/boot /boot

set +x

# Install Chromium
apt-get update
apt-get install -y chromium-browser

# Diable SSH
rm /boot/ssh

set -x

# Unpack root at the end, so files are modified before
unpack /filesystem/root /
1 change: 1 addition & 0 deletions src/variants/jessielite/config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BASE_IMAGE_ENLARGEROOT=250

0 comments on commit d8b7844

Please sign in to comment.