Skip to content

Commit 38a7fed

Browse files
committed
Merge branch 'devel'
2 parents 1fa1e93 + 2dfb18e commit 38a7fed

File tree

13 files changed

+163
-62
lines changed

13 files changed

+163
-62
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#### What were you doing?
2+
3+
[Please be as specific as possible here]
4+
5+
#### What did you expect to happen?
6+
7+
#### What happened instead?
8+
9+
#### Was there an error message displayed? What did it say?
10+
11+
#### Version of FullPageOS?
12+
13+
[Can be found in /etc/fullpageos_version ALWAYS INCLUDE.]
14+
15+
#### Screenshot(s) showing the problem:
16+
17+
[If applicable. Always include if unsure or reporting UI issues.]

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ How to use it?
2525
#. Boot the Pi from the SD card
2626
#. Log into your Pi via SSH (it is located at ``fullpageos.local`` `if your computer supports bonjour <https://learn.adafruit.com/bonjour-zeroconf-networking-for-windows-and-linux/overview>`_ 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``.
2727

28+
Requirements
29+
------------
30+
* Raspberrypi 2 and newser or device running Armbian, Older Rasperry Pis are not currently supported. See `Raspberry Pi <https://github.com/guysoft/FullPageOS/issues/12>`_ and `Raspberry Pi <https://github.com/guysoft/FullPageOS/issues/43>`_.
31+
* 2A power supply
32+
33+
2834
Features
2935
--------
3036

@@ -87,6 +93,11 @@ After provisioning the machine, its also possible to run a nightly build which u
8793

8894
cd FullPageOS/src/vagrant
8995
run_vagrant_build.sh
96+
97+
To build a variant on the machine simply run::
98+
99+
cd FullPageOS/src/vagrant
100+
run_vagrant_build.sh [Variant]
90101

91102
Usage
92103
~~~~~

src/chroot_script

Lines changed: 87 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,98 @@ apt-get autoremove -y
2323
#apt-get tools
2424
apt-get -y --force-yes install python2.7 git screen checkinstall avahi-daemon libavahi-compat-libdnssd1 xterm
2525

26-
apt-get install -y --force-yes chromium-browser xdotool matchbox-window-manager xorg lightdm
26+
if [ "$FULLPAGEOS_INCLUDE_CHROMIUM" == "yes" ]
27+
then
28+
apt-get install -y --force-yes chromium-browser
29+
sudo -u pi sed -i 's@%BROWSER_START_SCRIPT%@/home/pi/scripts/start_chromium_browser@g' /home/pi/scripts/run_onepageos
30+
fi
31+
32+
apt-get install -y --force-yes xdotool matchbox-window-manager xorg lightdm
2733
apt-get install -y --force-yes vim x11vnc expect
2834

35+
2936
#Install web stack
30-
apt-get install -y lighttpd php5-common php5-cgi php5
31-
lighty-enable-mod fastcgi-php
32-
#service lighttpd force-reload
33-
chown -R www-data:www-data /var/www/html
34-
chmod 775 /var/www/html
35-
usermod -a -G www-data pi
36-
systemctl enable clear_lighttpd_cache.service
37-
pushd /var/www/html
38-
#Put git clones in place
39-
gitclone FULLPAGEOS_DASHBOARD_REPO FullPageDashboard
40-
gitclone FULLPAGEOS_WELCOME_REPO welcome
41-
chown -R pi:pi FullPageDashboard
42-
chown -R www-data:www-data FullPageDashboard
43-
chmod 775 FullPageDashboard
44-
pushd FullPageDashboard
45-
sed -i "s@'INIT_URL_PATH', __DIR__ . '/init.txt'@'INIT_URL_PATH', '/boot/fullpagedashboard.txt'@g" config.php
37+
if [ "$FULLPAGEOS_INCLUDE_LIGHTTPD" == "yes" ]
38+
then
39+
apt-get install -y lighttpd php5-common php5-cgi php5
40+
lighty-enable-mod fastcgi-php
41+
#service lighttpd force-reload
42+
chown -R www-data:www-data /var/www/html
43+
chmod 775 /var/www/html
44+
usermod -a -G www-data pi
45+
systemctl enable clear_lighttpd_cache.service
46+
systemctl enable ssh.socket
47+
pushd /var/www/html
48+
#Put git clones in place
49+
if [ "$FULLPAGEOS_INCLUDE_DASHBOARD" == "yes" ]
50+
then
51+
gitclone FULLPAGEOS_DASHBOARD_REPO FullPageDashboard
52+
chown -R pi:pi FullPageDashboard
53+
chown -R www-data:www-data FullPageDashboard
54+
chmod 775 FullPageDashboard
55+
pushd FullPageDashboard
56+
sed -i "s@'INIT_URL_PATH', __DIR__ . '/init.txt'@'INIT_URL_PATH', '/boot/fullpagedashboard.txt'@g" config.php
57+
popd
58+
fi
59+
#Set Welcome screen
60+
if [ "$FULLPAGEOS_INCLUDE_WELCOME" == "yes" ]
61+
then
62+
gitclone FULLPAGEOS_WELCOME_REPO welcome
63+
chown -R www-data:www-data welcome
64+
fi
4665
popd
4766

48-
#Set Welcome screen
49-
chown -R www-data:www-data welcome
50-
popd
67+
68+
if [ "$FULLPAGEOS_INCLUDE_ACCELERATION" == "yes" ]
69+
then
70+
#TODO enable_gpu
71+
apt-get -y --force-yes install xcompmgr libgl1-mesa-dri mesa-utils compton libconfig9
72+
73+
# Hack to pass non-interactive install
74+
mv /usr/bin/whiptail /usr/bin/whiptail.bak
75+
echo "#!/bin/bash" > /usr/bin/whiptail
76+
echo "exit 0" >> /usr/bin/whiptail
77+
chmod 755 /usr/bin/whiptail
78+
apt-get -y --force-yes install rpi-chromium-mods
79+
rm /usr/bin/whiptail
80+
mv /usr/bin/whiptail.bak /usr/bin/whiptail
81+
if [ -e /usr/share/X11/xorg.conf.d/99-fbturbo.conf ]; then
82+
mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.~
83+
fi
84+
85+
systemctl enable enable_gpu_first_boot.service
86+
87+
else
88+
echo "gpu_mem=128" >> /boot/config.txt
89+
fi
90+
91+
echo "enabled" > /boot/check_for_httpd
92+
else
93+
echo "disabled" > /boot/check_for_httpd
94+
fi
95+
96+
97+
#override timezone
98+
if [ "$FULLPAGEOS_OVERRIDE_TIMEZONE" != "default" ]
99+
then
100+
echo "$FULLPAGEOS_OVERRIDE_TIMEZONE" > /etc/timezone
101+
dpkg-reconfigure -f noninteractive tzdata
102+
fi
103+
104+
#override locale
105+
if [ "$FULLPAGEOS_OVERRIDE_LOCALE" != "default" ]
106+
then
107+
sed -i '/^#.* '"$FULLPAGEOS_OVERRIDE_LOCALE"' /s/^# //' /etc/locale.gen
108+
locale-gen
109+
update-locale LANG="$FULLPAGEOS_OVERRIDE_LOCALE"
110+
fi
111+
112+
#override password
113+
if [ "$FULLPAGEOS_OVERRIDE_PASSWORD" != "default" ]
114+
then
115+
echo "pi:$FULLPAGEOS_OVERRIDE_PASSWORD" | chpasswd
116+
fi
117+
51118

52119
#reach pi by name
53120
echo "$FULLPAGEOS_OVERRIDE_HOSTNAME" > /etc/hostname
@@ -61,7 +128,6 @@ chmod +x /root/bin/git
61128
# enable raspicam
62129
echo "# enable raspicam" >> /boot/config.txt
63130
echo "start_x=1" >> /boot/config.txt
64-
echo "gpu_mem=128" >> /boot/config.txt
65131

66132
# allow network configuration via /boot/fullpageos-network.txt
67133
sed -i "s@iface wlan0 @iface wlan0-raspbian @g" /etc/network/interfaces

src/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function mount_image() {
125125

126126
# mount root and boot partition
127127
sudo mount -o loop,offset=$root_offset $image_path $mount_path/
128-
sudo mount -o loop,offset=$boot_offset $image_path $mount_path/boot
128+
sudo mount -o loop,offset=$boot_offset,sizelimit=$( expr $root_offset - $boot_offset ) $image_path $mount_path/boot
129129
sudo mount -o bind /dev/pts $mount_path/dev/pts
130130
}
131131

src/config

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ fi
5454

5555
[ -n "$FULLPAGEOS_OVERRIDE_HOSTNAME" ] || FULLPAGEOS_OVERRIDE_HOSTNAME=fullpageos
5656

57+
#override timezone, otherwise use image timezone
58+
[ -n "$FULLPAGEOS_OVERRIDE_TIMEZONE" ] || FULLPAGEOS_OVERRIDE_TIMEZONE=default
59+
60+
#override locale, otherwise use image locale
61+
[ -n "$FULLPAGEOS_OVERRIDE_LOCALE" ] || FULLPAGEOS_OVERRIDE_LOCALE=default
62+
63+
#override password, otherwise use image default
64+
[ -n "$FULLPAGEOS_OVERRIDE_PASSWORD" ] || FULLPAGEOS_OVERRIDE_PASSWORD=default
65+
66+
[ -n "$FULLPAGEOS_INCLUDE_CHROMIUM" ] || FULLPAGEOS_INCLUDE_CHROMIUM=yes
67+
[ -n "$FULLPAGEOS_INCLUDE_LIGHTTPD" ] || FULLPAGEOS_INCLUDE_LIGHTTPD=yes
5768

5869
# FullPageDashboard repo & branch
5970
[ -n "$FULLPAGEOS_DASHBOARD_REPO_SHIP" ] || FULLPAGEOS_DASHBOARD_REPO_SHIP=https://github.com/amitdar/FullPageDashboard.git
@@ -67,6 +78,10 @@ fi
6778
[ -n "$FULLPAGEOS_WELCOME_REPO_BRANCH" ] || FULLPAGEOS_WELCOME_REPO_BRANCH=master
6879
[ -n "$FULLPAGEOS_INCLUDE_WELCOME" ] || FULLPAGEOS_INCLUDE_WELCOME=yes
6980

81+
# Add GPU acceleration
82+
[ -n "$FULLPAGEOS_INCLUDE_ACCELERATION" ] || FULLPAGEOS_INCLUDE_ACCELERATION=yes
83+
84+
7085
###############################################################################
7186
# Rewrite any build urls that are not yet set if we have a repository mirror
7287
# configured.

src/filesystem/home/pi/.octoprint/config.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
if [ ! -f /etc/gpu_enabled ]; then
3+
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
4+
sudo sed -i /boot/cmdline.txt -e "s/ quiet//"
5+
sudo sed -i /boot/cmdline.txt -e "s/ splash//"
6+
sudo sed -i /boot/cmdline.txt -e "s/ plymouth.ignore-serial-consoles//"
7+
sudo sed -i /boot/config.txt -e "s/^\#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d/"
8+
sudo sed -i /boot/config.txt -e "s/^gpu_mem/\#gpu_mem/"
9+
printf "dtoverlay=vc4-kms-v3d\n" | sudo tee -a /boot/config.txt
10+
touch /etc/gpu_enabled
11+
sudo shutdown -r now
12+
fi

src/filesystem/home/pi/scripts/run_onepageos

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ matchbox-window-manager &
77
x11vnc -many -rfbauth /home/pi/.vnc/passwd &
88
while true
99
do
10-
if [ $(curl -sL -w "%{http_code}\\n" "http://localhost/FullPageDashboard" -o /dev/null) == "200" ]; then
10+
if [ $(curl -sL -w "%{http_code}\\n" "http://localhost/FullPageDashboard" -o /dev/null) == "200" ] || grep -q disabled "/boot/check_for_httpd" ; then
1111
(sleep 15 ; /home/pi/scripts/fullscreen) &
1212
xdotool mousemove 9000 9000
13-
chromium-browser --kiosk --app=$(head -n 1 /boot/fullpageos.txt)
13+
%BROWSER_START_SCRIPT%
1414
fi
1515
sleep 1
1616
done
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
chromium-browser --kiosk --touch-events=enabled --disable-pinch --noerrdialogs --app=$(head -n 1 /boot/fullpageos.txt)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6.0
1+
0.7.0

0 commit comments

Comments
 (0)