diff options
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | chromium-fullscreen.install | 8 | ||||
-rw-r--r-- | chromium-fullscreen.sh | 19 |
4 files changed, 25 insertions, 6 deletions
@@ -18,7 +18,7 @@ pkgbase = chromium-fullscreen source = chromium-fullscreen.sh md5sums = 738beda830fcf4f094b83659c9c936c4 md5sums = 9e979fbdd1e4a5a04fd0e91ce6a9a7be - md5sums = 4f88ade0f45fa6358cd942881229b873 + md5sums = 9cdf91af72c57eb9e4f359942ced5ddd pkgname = chromium-fullscreen @@ -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 |