From 258d673b8a1a86b4a0b5c92009c0e95316515b6d Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Thu, 30 Jun 2016 14:26:55 +0300 Subject: [PATCH 01/23] Increment version to 0.7.0 --- src/filesystem/root/etc/fullpageos_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem/root/etc/fullpageos_version b/src/filesystem/root/etc/fullpageos_version index a918a2a..faef31a 100644 --- a/src/filesystem/root/etc/fullpageos_version +++ b/src/filesystem/root/etc/fullpageos_version @@ -1 +1 @@ -0.6.0 +0.7.0 From 6f47e5187aa7c9752557627f57b8ad39c2a4077a Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sun, 3 Jul 2016 10:53:00 +0300 Subject: [PATCH 02/23] Make chromium install optinal via switch, lets variant use diffrent browser --- src/chroot_script | 8 +++++++- src/config | 1 + src/filesystem/home/pi/scripts/run_onepageos | 2 +- src/filesystem/home/pi/scripts/start_chromium_browser | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 src/filesystem/home/pi/scripts/start_chromium_browser diff --git a/src/chroot_script b/src/chroot_script index 5e5f6d9..e663793 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -23,7 +23,13 @@ apt-get autoremove -y #apt-get tools apt-get -y --force-yes install python2.7 git screen checkinstall avahi-daemon libavahi-compat-libdnssd1 xterm -apt-get install -y --force-yes chromium-browser xdotool matchbox-window-manager xorg lightdm +if [ "$FULLPAGEOS_INCLUDE_CHROMIUM" == "yes" ] +then + apt-get install -y --force-yes chromium-browser + sudo -u pi sed -i 's@%BROWSER_START_SCRIPT%@/home/pi/scripts/start_chromium_browser@g' /home/pi/scripts/run_onepageos +fi + +apt-get install -y --force-yes xdotool matchbox-window-manager xorg lightdm apt-get install -y --force-yes vim x11vnc expect #Install web stack diff --git a/src/config b/src/config index 9d311dd..3a46166 100755 --- a/src/config +++ b/src/config @@ -54,6 +54,7 @@ fi [ -n "$FULLPAGEOS_OVERRIDE_HOSTNAME" ] || FULLPAGEOS_OVERRIDE_HOSTNAME=fullpageos +[ -n "$FULLPAGEOS_INCLUDE_CHROMIUM" ] || FULLPAGEOS_INCLUDE_CHROMIUM=yes # FullPageDashboard repo & branch [ -n "$FULLPAGEOS_DASHBOARD_REPO_SHIP" ] || FULLPAGEOS_DASHBOARD_REPO_SHIP=https://github.com/amitdar/FullPageDashboard.git diff --git a/src/filesystem/home/pi/scripts/run_onepageos b/src/filesystem/home/pi/scripts/run_onepageos index 84c8c86..9f9bf68 100755 --- a/src/filesystem/home/pi/scripts/run_onepageos +++ b/src/filesystem/home/pi/scripts/run_onepageos @@ -10,7 +10,7 @@ do if [ $(curl -sL -w "%{http_code}\\n" "http://localhost/FullPageDashboard" -o /dev/null) == "200" ]; then (sleep 15 ; /home/pi/scripts/fullscreen) & xdotool mousemove 9000 9000 - chromium-browser --kiosk --app=$(head -n 1 /boot/fullpageos.txt) + %BROWSER_START_SCRIPT% fi sleep 1 done diff --git a/src/filesystem/home/pi/scripts/start_chromium_browser b/src/filesystem/home/pi/scripts/start_chromium_browser new file mode 100755 index 0000000..c434bfa --- /dev/null +++ b/src/filesystem/home/pi/scripts/start_chromium_browser @@ -0,0 +1,2 @@ +#!/bin/bash +chromium-browser --kiosk --app=$(head -n 1 /boot/fullpageos.txt) \ No newline at end of file From d5dd49305235e125eab5c132d4de9df0f8980735 Mon Sep 17 00:00:00 2001 From: Andrew Waite Date: Mon, 18 Jul 2016 09:36:22 +0100 Subject: [PATCH 03/23] Updated Readme to include point about older Pis not being supported. Added point to requirements about older Pis not being supported. Save on issue creation and helps newbies. --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 26c9bf4..adc2ceb 100644 --- a/README.rst +++ b/README.rst @@ -39,6 +39,7 @@ Developing Requirements ~~~~~~~~~~~~ +#. Older Rasperry Pis are not currently supported. See `Raspberry Pi `_ and `Raspberry Pi `_. #. `qemu-arm-static `_ #. Downloaded `Raspbian `_ image. #. root privileges for chroot From c3711d873d18a1fabb2617c24f6ebc8e1c8028d7 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Mon, 18 Jul 2016 13:12:00 +0300 Subject: [PATCH 04/23] Added requirements to using FullPageOS --- README.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index adc2ceb..51e33bc 100644 --- a/README.rst +++ b/README.rst @@ -25,6 +25,12 @@ How to use it? #. Boot the Pi from the SD card #. Log into your Pi via SSH (it is located at ``fullpageos.local`` `if your computer supports bonjour `_ or the IP address assigned by your router), default username is "pi", default password is "raspberry", change the password using the ``passwd`` command and expand the filesystem of the SD card through the corresponding option when running ``sudo raspi-config``. +Requirements +------------ + * Raspberrypi 2 and newser or device running Armbian, Older Rasperry Pis are not currently supported. See `Raspberry Pi `_ and `Raspberry Pi `_. + * 2A power supply + + Features -------- @@ -39,7 +45,6 @@ Developing Requirements ~~~~~~~~~~~~ -#. Older Rasperry Pis are not currently supported. See `Raspberry Pi `_ and `Raspberry Pi `_. #. `qemu-arm-static `_ #. Downloaded `Raspbian `_ image. #. root privileges for chroot From e6ee00fb322c709f50873de0cdcd338e58b420aa Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Mon, 18 Jul 2016 13:12:46 +0300 Subject: [PATCH 05/23] Fix syntax typo --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 51e33bc..d6b82b2 100644 --- a/README.rst +++ b/README.rst @@ -27,8 +27,8 @@ How to use it? Requirements ------------ - * Raspberrypi 2 and newser or device running Armbian, Older Rasperry Pis are not currently supported. See `Raspberry Pi `_ and `Raspberry Pi `_. - * 2A power supply +* Raspberrypi 2 and newser or device running Armbian, Older Rasperry Pis are not currently supported. See `Raspberry Pi `_ and `Raspberry Pi `_. +* 2A power supply Features From 3d56740682abbe20116d53cb19ea8b95e32413ee Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Wed, 20 Jul 2016 12:30:31 +0300 Subject: [PATCH 06/23] Add LIGHTTPD, FULLPAGEDASHBOARD and WELCOME switches to config, fixes #51 --- src/chroot_script | 50 ++++++++++++++++++++++++++++------------------- src/config | 1 + 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/chroot_script b/src/chroot_script index e663793..abeb79b 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -32,28 +32,38 @@ fi apt-get install -y --force-yes xdotool matchbox-window-manager xorg lightdm apt-get install -y --force-yes vim x11vnc expect + #Install web stack -apt-get install -y lighttpd php5-common php5-cgi php5 -lighty-enable-mod fastcgi-php -#service lighttpd force-reload -chown -R www-data:www-data /var/www/html -chmod 775 /var/www/html -usermod -a -G www-data pi -systemctl enable clear_lighttpd_cache.service -pushd /var/www/html - #Put git clones in place - gitclone FULLPAGEOS_DASHBOARD_REPO FullPageDashboard - gitclone FULLPAGEOS_WELCOME_REPO welcome - chown -R pi:pi FullPageDashboard - chown -R www-data:www-data FullPageDashboard - chmod 775 FullPageDashboard - pushd FullPageDashboard - sed -i "s@'INIT_URL_PATH', __DIR__ . '/init.txt'@'INIT_URL_PATH', '/boot/fullpagedashboard.txt'@g" config.php +if [ "$FULLPAGEOS_INCLUDE_LIGHTTPD" == "yes" ] +then + apt-get install -y lighttpd php5-common php5-cgi php5 + lighty-enable-mod fastcgi-php + #service lighttpd force-reload + chown -R www-data:www-data /var/www/html + chmod 775 /var/www/html + usermod -a -G www-data pi + systemctl enable clear_lighttpd_cache.service + pushd /var/www/html + #Put git clones in place + if [ "$FULLPAGEOS_INCLUDE_DASHBOARD" == "yes" ] + then + gitclone FULLPAGEOS_DASHBOARD_REPO FullPageDashboard + chown -R pi:pi FullPageDashboard + chown -R www-data:www-data FullPageDashboard + chmod 775 FullPageDashboard + pushd FullPageDashboard + sed -i "s@'INIT_URL_PATH', __DIR__ . '/init.txt'@'INIT_URL_PATH', '/boot/fullpagedashboard.txt'@g" config.php + popd + fi + #Set Welcome screen + if [ "$FULLPAGEOS_INCLUDE_WELCOME" == "yes" ] + then + gitclone FULLPAGEOS_WELCOME_REPO welcome + chown -R www-data:www-data welcome + fi popd - - #Set Welcome screen - chown -R www-data:www-data welcome -popd +fi + #reach pi by name echo "$FULLPAGEOS_OVERRIDE_HOSTNAME" > /etc/hostname diff --git a/src/config b/src/config index 3a46166..5d299dc 100755 --- a/src/config +++ b/src/config @@ -55,6 +55,7 @@ fi [ -n "$FULLPAGEOS_OVERRIDE_HOSTNAME" ] || FULLPAGEOS_OVERRIDE_HOSTNAME=fullpageos [ -n "$FULLPAGEOS_INCLUDE_CHROMIUM" ] || FULLPAGEOS_INCLUDE_CHROMIUM=yes +[ -n "$FULLPAGEOS_INCLUDE_LIGHTTPD" ] || FULLPAGEOS_INCLUDE_LIGHTTPD=yes # FullPageDashboard repo & branch [ -n "$FULLPAGEOS_DASHBOARD_REPO_SHIP" ] || FULLPAGEOS_DASHBOARD_REPO_SHIP=https://github.com/amitdar/FullPageDashboard.git From 860097730efdea4f888f3b0d71aac7385c7d3da8 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sat, 23 Jul 2016 00:08:39 +0300 Subject: [PATCH 07/23] Fixes #60 --- src/chroot_script | 3 +++ src/filesystem/home/pi/scripts/run_onepageos | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/chroot_script b/src/chroot_script index abeb79b..54ff54b 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -62,6 +62,9 @@ then chown -R www-data:www-data welcome fi popd + echo "enabled" > /boot/check_for_httpd +else + echo "disabled" > /boot/check_for_httpd fi diff --git a/src/filesystem/home/pi/scripts/run_onepageos b/src/filesystem/home/pi/scripts/run_onepageos index 9f9bf68..1782305 100755 --- a/src/filesystem/home/pi/scripts/run_onepageos +++ b/src/filesystem/home/pi/scripts/run_onepageos @@ -7,7 +7,7 @@ matchbox-window-manager & x11vnc -many -rfbauth /home/pi/.vnc/passwd & while true do - if [ $(curl -sL -w "%{http_code}\\n" "http://localhost/FullPageDashboard" -o /dev/null) == "200" ]; then + if [ $(curl -sL -w "%{http_code}\\n" "http://localhost/FullPageDashboard" -o /dev/null) == "200" ] || grep -q disabled "/boot/check_for_httpd" ; then (sleep 15 ; /home/pi/scripts/fullscreen) & xdotool mousemove 9000 9000 %BROWSER_START_SCRIPT% From 93c34bebad8b158c126c6c85e13aea9f8b0907bb Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sat, 23 Jul 2016 21:16:02 +0300 Subject: [PATCH 08/23] Update how to run a variant on vagrant --- README.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.rst b/README.rst index d6b82b2..cdb57f6 100644 --- a/README.rst +++ b/README.rst @@ -93,6 +93,11 @@ After provisioning the machine, its also possible to run a nightly build which u cd FullPageOS/src/vagrant run_vagrant_build.sh + +To build a variant on the machine simply run: + + cd FullPageOS/src/vagrant + run_vagrant_build.sh [Variant] Usage ~~~~~ From 7b8dd9ff2c68360cbf810d41f61b8aa978bc4883 Mon Sep 17 00:00:00 2001 From: Bart van Leeuwen Date: Tue, 26 Jul 2016 18:04:43 +0200 Subject: [PATCH 09/23] Make timezone configurable Related to #60 --- src/chroot_script | 7 +++++++ src/config | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/chroot_script b/src/chroot_script index 5d9ca24..42eb1a4 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -68,6 +68,13 @@ else fi +#override timezone +if [ "$FULLPAGEOS_OVERRIDE_TIMEZONE" != "default" ] +then + echo "$FULLPAGEOS_OVERRIDE_TIMEZONE" > /etc/timezone + dpkg-reconfigure -f noninteractive tzdata +fi + #reach pi by name echo "$FULLPAGEOS_OVERRIDE_HOSTNAME" > /etc/hostname sed -i -e "s@raspberrypi@$FULLPAGEOS_OVERRIDE_HOSTNAME@g" /etc/hosts diff --git a/src/config b/src/config index 5d299dc..3b4d5c1 100755 --- a/src/config +++ b/src/config @@ -54,6 +54,9 @@ fi [ -n "$FULLPAGEOS_OVERRIDE_HOSTNAME" ] || FULLPAGEOS_OVERRIDE_HOSTNAME=fullpageos +#override timezone, otherwise use image timezone +[ -n "$FULLPAGEOS_OVERRIDE_TIMEZONE" ] || FULLPAGEOS_OVERRIDE_TIMEZONE=default + [ -n "$FULLPAGEOS_INCLUDE_CHROMIUM" ] || FULLPAGEOS_INCLUDE_CHROMIUM=yes [ -n "$FULLPAGEOS_INCLUDE_LIGHTTPD" ] || FULLPAGEOS_INCLUDE_LIGHTTPD=yes From 8324e423ab3c460b311c236251eb53a36b82ebbc Mon Sep 17 00:00:00 2001 From: Bart van Leeuwen Date: Tue, 26 Jul 2016 18:04:43 +0200 Subject: [PATCH 10/23] Make timezone configurable Related to #58 --- src/chroot_script | 7 +++++++ src/config | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/chroot_script b/src/chroot_script index 5d9ca24..42eb1a4 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -68,6 +68,13 @@ else fi +#override timezone +if [ "$FULLPAGEOS_OVERRIDE_TIMEZONE" != "default" ] +then + echo "$FULLPAGEOS_OVERRIDE_TIMEZONE" > /etc/timezone + dpkg-reconfigure -f noninteractive tzdata +fi + #reach pi by name echo "$FULLPAGEOS_OVERRIDE_HOSTNAME" > /etc/hostname sed -i -e "s@raspberrypi@$FULLPAGEOS_OVERRIDE_HOSTNAME@g" /etc/hosts diff --git a/src/config b/src/config index 5d299dc..3b4d5c1 100755 --- a/src/config +++ b/src/config @@ -54,6 +54,9 @@ fi [ -n "$FULLPAGEOS_OVERRIDE_HOSTNAME" ] || FULLPAGEOS_OVERRIDE_HOSTNAME=fullpageos +#override timezone, otherwise use image timezone +[ -n "$FULLPAGEOS_OVERRIDE_TIMEZONE" ] || FULLPAGEOS_OVERRIDE_TIMEZONE=default + [ -n "$FULLPAGEOS_INCLUDE_CHROMIUM" ] || FULLPAGEOS_INCLUDE_CHROMIUM=yes [ -n "$FULLPAGEOS_INCLUDE_LIGHTTPD" ] || FULLPAGEOS_INCLUDE_LIGHTTPD=yes From 7a2eb41931dad8cecb8d5837c41f26d6e96f9672 Mon Sep 17 00:00:00 2001 From: Bart van Leeuwen Date: Thu, 28 Jul 2016 17:24:10 +0200 Subject: [PATCH 11/23] Allow override of the locale --- src/chroot_script | 8 ++++++++ src/config | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/chroot_script b/src/chroot_script index 42eb1a4..9a819e8 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -75,6 +75,14 @@ then dpkg-reconfigure -f noninteractive tzdata fi +#override locale +if [ "$FULLPAGEOS_OVERRIDE_LOCALE" != "default" ] +then + sed -i '/^#.* '"$FULLPAGEOS_OVERRIDE_LOCALE"' /s/^# //' /etc/locale.gen + locale-gen + update-locale LANG="$FULLPAGEOS_OVERRIDE_LOCALE" +fi + #reach pi by name echo "$FULLPAGEOS_OVERRIDE_HOSTNAME" > /etc/hostname sed -i -e "s@raspberrypi@$FULLPAGEOS_OVERRIDE_HOSTNAME@g" /etc/hosts diff --git a/src/config b/src/config index 3b4d5c1..e808e65 100755 --- a/src/config +++ b/src/config @@ -57,6 +57,9 @@ fi #override timezone, otherwise use image timezone [ -n "$FULLPAGEOS_OVERRIDE_TIMEZONE" ] || FULLPAGEOS_OVERRIDE_TIMEZONE=default +#override locale, otherwise use image locale +[ -n "$FULLPAGEOS_OVERRIDE_LOCALE" ] || FULLPAGEOS_OVERRIDE_LOCALE=default + [ -n "$FULLPAGEOS_INCLUDE_CHROMIUM" ] || FULLPAGEOS_INCLUDE_CHROMIUM=yes [ -n "$FULLPAGEOS_INCLUDE_LIGHTTPD" ] || FULLPAGEOS_INCLUDE_LIGHTTPD=yes From 5d6183131df502971daaf5a5ca3cba68b3aaddc4 Mon Sep 17 00:00:00 2001 From: Bart van Leeuwen Date: Thu, 28 Jul 2016 17:34:31 +0200 Subject: [PATCH 12/23] Make password configurable --- src/chroot_script | 7 +++++++ src/config | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/chroot_script b/src/chroot_script index 9a819e8..d4cee43 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -83,6 +83,13 @@ then update-locale LANG="$FULLPAGEOS_OVERRIDE_LOCALE" fi +#override password +if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" != "default" ] +then + echo "pi:$FULLPAGEOS_OVERRIDE_PASSWORD" | chpasswd +fi + + #reach pi by name echo "$FULLPAGEOS_OVERRIDE_HOSTNAME" > /etc/hostname sed -i -e "s@raspberrypi@$FULLPAGEOS_OVERRIDE_HOSTNAME@g" /etc/hosts diff --git a/src/config b/src/config index e808e65..874752b 100755 --- a/src/config +++ b/src/config @@ -60,6 +60,9 @@ fi #override locale, otherwise use image locale [ -n "$FULLPAGEOS_OVERRIDE_LOCALE" ] || FULLPAGEOS_OVERRIDE_LOCALE=default +#override password, otherwise use image default +[ -n "$FULLPAGEOS_OVERRIDE_PASSWORD" ] || FULLPAGEOS_OVERRIDE_PASSWORD=default + [ -n "$FULLPAGEOS_INCLUDE_CHROMIUM" ] || FULLPAGEOS_INCLUDE_CHROMIUM=yes [ -n "$FULLPAGEOS_INCLUDE_LIGHTTPD" ] || FULLPAGEOS_INCLUDE_LIGHTTPD=yes From e85e06b18ce527d19693607b3ed13f0ba62d6163 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sun, 23 Oct 2016 22:12:46 +0300 Subject: [PATCH 13/23] Enable ssh deamon on boot --- src/chroot_script | 1 + 1 file changed, 1 insertion(+) diff --git a/src/chroot_script b/src/chroot_script index d4cee43..28600b0 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -43,6 +43,7 @@ then chmod 775 /var/www/html usermod -a -G www-data pi systemctl enable clear_lighttpd_cache.service + systemctl enable ssh.socket pushd /var/www/html #Put git clones in place if [ "$FULLPAGEOS_INCLUDE_DASHBOARD" == "yes" ] From e9c31de000f34e993fab676e8b02b430b8388a73 Mon Sep 17 00:00:00 2001 From: NoviCMS Date: Wed, 26 Oct 2016 10:05:44 +0200 Subject: [PATCH 14/23] Better touch support These options improve the ease of use. --touch-events=enabled wil enable the functionality of sliders when using a touchscreen --disable-pinch when using a touchscreen this function does not work very well with a RPI 3 (laggy) --noerrdialogs obviously optional: --incognito when using the kiosk as webshop --overscroll-history-navigation=0 prevents history --- src/filesystem/home/pi/scripts/start_chromium_browser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem/home/pi/scripts/start_chromium_browser b/src/filesystem/home/pi/scripts/start_chromium_browser index c434bfa..d9209f4 100755 --- a/src/filesystem/home/pi/scripts/start_chromium_browser +++ b/src/filesystem/home/pi/scripts/start_chromium_browser @@ -1,2 +1,2 @@ #!/bin/bash -chromium-browser --kiosk --app=$(head -n 1 /boot/fullpageos.txt) \ No newline at end of file +chromium-browser --kiosk --touch-events=enabled --disable-pinch --noerrdialogs --app=$(head -n 1 /boot/fullpageos.txt) From e2a0c8e1a398043a21231c072c8b2a192ad76130 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Mon, 26 Dec 2016 17:49:54 +0200 Subject: [PATCH 15/23] Add rpi-chromium-mods package --- src/chroot_script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chroot_script b/src/chroot_script index 28600b0..9f04b78 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -25,7 +25,7 @@ apt-get -y --force-yes install python2.7 git screen checkinstall avahi-daemon li if [ "$FULLPAGEOS_INCLUDE_CHROMIUM" == "yes" ] then - apt-get install -y --force-yes chromium-browser + apt-get install -y --force-yes chromium-browser rpi-chromium-mods sudo -u pi sed -i 's@%BROWSER_START_SCRIPT%@/home/pi/scripts/start_chromium_browser@g' /home/pi/scripts/run_onepageos fi From f7e53cc6dd5011d0ebfbbfea6ab02658a2d35e75 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Tue, 27 Dec 2016 18:44:28 +0200 Subject: [PATCH 16/23] Remove octoprint config --- src/filesystem/home/pi/.octoprint/config.yaml | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/filesystem/home/pi/.octoprint/config.yaml diff --git a/src/filesystem/home/pi/.octoprint/config.yaml b/src/filesystem/home/pi/.octoprint/config.yaml deleted file mode 100644 index 51daab5..0000000 --- a/src/filesystem/home/pi/.octoprint/config.yaml +++ /dev/null @@ -1,35 +0,0 @@ -webcam: - stream: /webcam/?action=stream - snapshot: http://127.0.0.1:8080/?action=snapshot - ffmpeg: /usr/bin/avconv -plugins: - cura: - cura_engine: /usr/local/bin/cura_engine - discovery: - publicPort: 80 - softwareupdate: - checks: - octoprint: - update_folder: /home/pi/OctoPrint - octoprint_restart_command: sudo service octoprint restart - environment_restart_command: sudo shutdown -r now -system: - actions: - - name: Shutdown - command: sudo shutdown -h now - action: shutdown - confirm: You are about to shutdown the system. - async: true - ignore: true - - name: Reboot - command: sudo shutdown -r now - action: reboot - confirm: You are about to reboot the system - async: true - ignore: true - - name: Restart OctoPrint - command: sudo service octoprint restart - action: restart - confirm: You are about to restart OctoPrint - async: true - ignore: true From 342ab281435c2f5d36ebb792ea4a541c885c5d1d Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Tue, 27 Dec 2016 19:36:09 +0200 Subject: [PATCH 17/23] Add GPU acceleration, fixes #75 #29 #22 --- src/chroot_script | 25 +++++++++++++++++-- src/config | 4 +++ src/filesystem/home/pi/scripts/enable_gpu | 12 +++++++++ .../apt/sources.list.d/chromium-browser.list | 1 - .../system/enable_gpu_first_boot.service | 7 ++++++ 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100755 src/filesystem/home/pi/scripts/enable_gpu delete mode 100644 src/filesystem/root_init/etc/apt/sources.list.d/chromium-browser.list create mode 100644 src/filesystem/root_init/etc/systemd/system/enable_gpu_first_boot.service diff --git a/src/chroot_script b/src/chroot_script index 9f04b78..4b3fb43 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -25,7 +25,7 @@ apt-get -y --force-yes install python2.7 git screen checkinstall avahi-daemon li if [ "$FULLPAGEOS_INCLUDE_CHROMIUM" == "yes" ] then - apt-get install -y --force-yes chromium-browser rpi-chromium-mods + apt-get install -y --force-yes chromium-browser sudo -u pi sed -i 's@%BROWSER_START_SCRIPT%@/home/pi/scripts/start_chromium_browser@g' /home/pi/scripts/run_onepageos fi @@ -63,6 +63,28 @@ then chown -R www-data:www-data welcome fi popd + + + if [ "$FULLPAGEOS_INCLUDE_ACCELERATION" == "yes" ] + then + #TODO enable_gpu + apt-get -y --force-yes install xcompmgr libgl1-mesa-dri mesa-utils + + # 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 + + systemctl enable enable_gpu_first_boot.service + + else + echo "gpu_mem=128" >> /boot/config.txt + fi + echo "enabled" > /boot/check_for_httpd else echo "disabled" > /boot/check_for_httpd @@ -103,7 +125,6 @@ chmod +x /root/bin/git # enable raspicam echo "# enable raspicam" >> /boot/config.txt echo "start_x=1" >> /boot/config.txt -echo "gpu_mem=128" >> /boot/config.txt # allow network configuration via /boot/fullpageos-network.txt sed -i "s@iface wlan0 @iface wlan0-raspbian @g" /etc/network/interfaces diff --git a/src/config b/src/config index 874752b..85cb45b 100755 --- a/src/config +++ b/src/config @@ -78,6 +78,10 @@ fi [ -n "$FULLPAGEOS_WELCOME_REPO_BRANCH" ] || FULLPAGEOS_WELCOME_REPO_BRANCH=master [ -n "$FULLPAGEOS_INCLUDE_WELCOME" ] || FULLPAGEOS_INCLUDE_WELCOME=yes +# Add GPU acceleration +[ -n "$FULLPAGEOS_INCLUDE_ACCELERATION" ] || FULLPAGEOS_INCLUDE_ACCELERATION=yes + + ############################################################################### # Rewrite any build urls that are not yet set if we have a repository mirror # configured. diff --git a/src/filesystem/home/pi/scripts/enable_gpu b/src/filesystem/home/pi/scripts/enable_gpu new file mode 100755 index 0000000..e8a37c7 --- /dev/null +++ b/src/filesystem/home/pi/scripts/enable_gpu @@ -0,0 +1,12 @@ +#!/bin/bash +if [ ! -f /etc/gpu_enabled ]; then + sudo sed 's@matchbox-window-manager \&@xcompmgr -a \&\nmatchbox-window-manager \&@g' -i /home/pi/scripts/run_onepageos + sudo sed -i /boot/cmdline.txt -e "s/ quiet//" + sudo sed -i /boot/cmdline.txt -e "s/ splash//" + sudo sed -i /boot/cmdline.txt -e "s/ plymouth.ignore-serial-consoles//" + sudo sed -i /boot/config.txt -e "s/^\#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d/" + sudo sed -i /boot/config.txt -e "s/^gpu_mem/\#gpu_mem/" + printf "dtoverlay=vc4-kms-v3d\n" | sudo tee -a /boot/config.txt + touch /etc/gpu_enabled + sudo shutdown -r now +fi diff --git a/src/filesystem/root_init/etc/apt/sources.list.d/chromium-browser.list b/src/filesystem/root_init/etc/apt/sources.list.d/chromium-browser.list deleted file mode 100644 index 2c6f350..0000000 --- a/src/filesystem/root_init/etc/apt/sources.list.d/chromium-browser.list +++ /dev/null @@ -1 +0,0 @@ -deb http://ppa.launchpad.net/canonical-chromium-builds/stage/ubuntu vivid main diff --git a/src/filesystem/root_init/etc/systemd/system/enable_gpu_first_boot.service b/src/filesystem/root_init/etc/systemd/system/enable_gpu_first_boot.service new file mode 100644 index 0000000..6895300 --- /dev/null +++ b/src/filesystem/root_init/etc/systemd/system/enable_gpu_first_boot.service @@ -0,0 +1,7 @@ +[Unit] +Description=on first boot set up GPU acceleration +[Service] +ExecStart=/home/pi/scripts/enable_gpu +ExecStop= +[Install] +WantedBy=multi-user.target From 11ec7ea73bcde8b677d1a39d4e8122aa8186d059 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sat, 11 Mar 2017 14:28:16 +0200 Subject: [PATCH 18/23] Add issue template --- .github/ISSUE_TEMPLATE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..0ba1bfa --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ +#### What were you doing? + +[Please be as specific as possible here] + +#### What did you expect to happen? + +#### What happened instead? + +#### What happened instead? + +#### Was there an error message displayed? What did it say? + +#### Version of FullPageOS? + +[Can be found in /etc/octopi_version ALWAYS INCLUDE.] + +#### Screenshot(s) showing the problem: + +[If applicable. Always include if unsure or reporting UI issues.] From 144092b730cc22888e85b503f366b3761cac77e1 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sat, 11 Mar 2017 14:29:09 +0200 Subject: [PATCH 19/23] Fix typo --- .github/ISSUE_TEMPLATE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 0ba1bfa..458fa5c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -6,8 +6,6 @@ #### What happened instead? -#### What happened instead? - #### Was there an error message displayed? What did it say? #### Version of FullPageOS? From d450929d966688b59364a368a9e6551a04ea5e57 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Tue, 4 Apr 2017 14:21:46 +0300 Subject: [PATCH 20/23] Fix typo in syntax --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index cdb57f6..ff65230 100644 --- a/README.rst +++ b/README.rst @@ -94,7 +94,7 @@ After provisioning the machine, its also possible to run a nightly build which u cd FullPageOS/src/vagrant run_vagrant_build.sh -To build a variant on the machine simply run: +To build a variant on the machine simply run:: cd FullPageOS/src/vagrant run_vagrant_build.sh [Variant] From 6671175412f3335c18fcb4b2a479397aa1d20183 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Wed, 19 Apr 2017 13:45:36 +0300 Subject: [PATCH 21/23] Fix /etc/fullpageos_version --- .github/ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 458fa5c..0bd8fd4 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -10,7 +10,7 @@ #### Version of FullPageOS? -[Can be found in /etc/octopi_version ALWAYS INCLUDE.] +[Can be found in /etc/fullpageos_version ALWAYS INCLUDE.] #### Screenshot(s) showing the problem: From 00340c9d78cf4472bdf38a5e7213f45fbebdf64e Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Fri, 23 Jun 2017 17:17:59 +0300 Subject: [PATCH 22/23] Fix #133 and cause of #118 --- src/chroot_script | 5 ++++- src/filesystem/home/pi/scripts/enable_gpu | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/chroot_script b/src/chroot_script index 4b3fb43..2c887c6 100755 --- a/src/chroot_script +++ b/src/chroot_script @@ -68,7 +68,7 @@ then if [ "$FULLPAGEOS_INCLUDE_ACCELERATION" == "yes" ] then #TODO enable_gpu - apt-get -y --force-yes install xcompmgr libgl1-mesa-dri mesa-utils + 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 @@ -78,6 +78,9 @@ then 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 diff --git a/src/filesystem/home/pi/scripts/enable_gpu b/src/filesystem/home/pi/scripts/enable_gpu index e8a37c7..7f8629a 100755 --- a/src/filesystem/home/pi/scripts/enable_gpu +++ b/src/filesystem/home/pi/scripts/enable_gpu @@ -1,6 +1,6 @@ #!/bin/bash if [ ! -f /etc/gpu_enabled ]; then - sudo sed 's@matchbox-window-manager \&@xcompmgr -a \&\nmatchbox-window-manager \&@g' -i /home/pi/scripts/run_onepageos + sudo sed 's@matchbox-window-manager \&@compton --backend glx --unredir-if-possible --glx-swap-method buffer-age --glx-no-stencil --paint-on-overlay --vsync opengl &\nmatchbox-window-manager \&@g' -i /home/pi/scripts/run_onepageos sudo sed -i /boot/cmdline.txt -e "s/ quiet//" sudo sed -i /boot/cmdline.txt -e "s/ splash//" sudo sed -i /boot/cmdline.txt -e "s/ plymouth.ignore-serial-consoles//" From 2dfb18eeeda2c2b6e2fd7c6fab417b5896ecc151 Mon Sep 17 00:00:00 2001 From: Guy Sheffer Date: Sat, 24 Jun 2017 13:01:56 +0300 Subject: [PATCH 23/23] Fix offset mount and and add sizelimit to work with iamge 2017-06-21 --- src/common.sh | 2 +- src/vagrant/Vagrantfile | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/common.sh b/src/common.sh index 581fe8f..f6d30a1 100755 --- a/src/common.sh +++ b/src/common.sh @@ -125,7 +125,7 @@ function mount_image() { # mount root and boot partition sudo mount -o loop,offset=$root_offset $image_path $mount_path/ - sudo mount -o loop,offset=$boot_offset $image_path $mount_path/boot + sudo mount -o loop,offset=$boot_offset,sizelimit=$( expr $root_offset - $boot_offset ) $image_path $mount_path/boot sudo mount -o bind /dev/pts $mount_path/dev/pts } diff --git a/src/vagrant/Vagrantfile b/src/vagrant/Vagrantfile index c880617..21123eb 100644 --- a/src/vagrant/Vagrantfile +++ b/src/vagrant/Vagrantfile @@ -1,9 +1,16 @@ Vagrant.configure("2") do |o| # o.vm.box = "fullpageos-build" - o.vm.box= "https://github.com/kraksoft/vagrant-box-ubuntu/releases/download/15.04/ubuntu-15.04-amd64.box" + #o.vm.box= "https://github.com/kraksoft/vagrant-box-ubuntu/releases/download/15.04/ubuntu-15.04-amd64.box" + o.vm.box= "ubuntu/zesty64" o.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" o.vm.synced_folder "../../", "/FullPageOS", create:true, type: "nfs" o.vm.network :private_network, ip: "192.168.55.55" o.vm.provision :shell, :path => "setup.sh", args: ENV['SHELL_ARGS'] + o.vm.provider "virtualbox" do |v| + v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] + end + + end