summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Xhokaxhiu2016-09-12 14:53:36 +0200
committerJulian Xhokaxhiu2016-09-12 14:53:36 +0200
commitc2afe470755111e2691c370d73e46e134fc95bde (patch)
tree95ea016975d416dd6c779dcbcb2a37a08dd2385e
parent39b288ca09144e0212cec2b15377cbd2e323aae3 (diff)
downloadaur-c2afe470755111e2691c370d73e46e134fc95bde.tar.gz
Better installation guide
When the user install this package, print some required informations like the URL file path, and possibility to customize it. Finally update hashes of the sh file.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--chromium-fullscreen.install8
-rw-r--r--chromium-fullscreen.sh19
4 files changed, 25 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e52973eb2a28..7f04971f7550 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -18,7 +18,7 @@ pkgbase = chromium-fullscreen
source = chromium-fullscreen.sh
md5sums = 738beda830fcf4f094b83659c9c936c4
md5sums = 9e979fbdd1e4a5a04fd0e91ce6a9a7be
- md5sums = 4f88ade0f45fa6358cd942881229b873
+ md5sums = 9cdf91af72c57eb9e4f359942ced5ddd
pkgname = chromium-fullscreen
diff --git a/PKGBUILD b/PKGBUILD
index 87c874c2cc12..1922b511ba81 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,7 +13,7 @@ source=('chromium-fullscreen.service'
'chromium-fullscreen.sh')
md5sums=('738beda830fcf4f094b83659c9c936c4'
'9e979fbdd1e4a5a04fd0e91ce6a9a7be'
- '4f88ade0f45fa6358cd942881229b873')
+ '9cdf91af72c57eb9e4f359942ced5ddd')
package() {
# Copy autorun script
diff --git a/chromium-fullscreen.install b/chromium-fullscreen.install
index a1e55ea79d0b..0e32523c5931 100644
--- a/chromium-fullscreen.install
+++ b/chromium-fullscreen.install
@@ -12,8 +12,12 @@ post_install() {
chown -R chromium:chromium /home/chromium
# Print additional useful informations
- echo "==> [INFO] To run Chromium Fullscreen everytime at boot please run ==> systemctl enable chromium-fullscreen.service"
- echo "==> [INFO] To simply start Chromium Fullscreen just run ==> systemctl start chromium-fullscreen.service"
+ echo -e "==> [INFO] For comodity, the file '/home/chromium/chromium-autostart-url.txt' has been created for you. That file although can be located also on:"
+ echo -e "==> [INFO] - '/boot/chromium-autostart-url.txt'"
+ echo -e "==> [INFO] - '/home/chromium/chromium-autostart-url.txt'"
+ echo -e "==> [INFO] Order is mandatory! The first that matches, is the first that wins."
+ echo -e "==> [INFO] To run Chromium Fullscreen everytime at boot please run ==> systemctl enable chromium-fullscreen.service"
+ echo -e "==> [INFO] To simply start Chromium Fullscreen just run ==> systemctl start chromium-fullscreen.service"
}
post_upgrade() {
diff --git a/chromium-fullscreen.sh b/chromium-fullscreen.sh
index ee4a3a68308b..550814b57dc9 100644
--- a/chromium-fullscreen.sh
+++ b/chromium-fullscreen.sh
@@ -1,2 +1,17 @@
-# Autostart Chromium in Fullscreen mode
-/usr/bin/xinit /usr/bin/chromium --desktop-window-1080p --kiosk $(cat /home/chromium/chromium-autostart-url.txt)
+# The URL variuabile where we will store the final address to open
+URL=''
+
+# This is usually the case of a Raspberry Pi-like installation ( arm platforms )
+if [ -f "/boot/chromium-autostart-url.txt" ]; then
+ URL=`cat /boot/chromium-autostart-url.txt`
+# This is probably the case of generic setups on x86 platforms
+elif [ -f "/home/chromium/chromium-autostart-url.txt" ]; then
+ URL=`cat /home/chromium/chromium-autostart-url.txt`
+fi
+
+if [ ! -z "$URL" ]; then
+ # Autostart Chromium in Fullscreen mode
+ /usr/bin/xinit /usr/bin/chromium --desktop-window-1080p --kiosk "$URL"
+else
+ echo -e "==> [ERROR] No 'chromium-autostart-url.txt' file found."
+fi