diff options
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | chromium-fullscreen.install | 8 | ||||
-rw-r--r-- | chromium-fullscreen.xinitrc | 16 |
4 files changed, 34 insertions, 22 deletions
@@ -1,7 +1,7 @@ pkgbase = chromium-fullscreen - pkgdesc = Systemd service and user to run Chromium in fullscreen mode + pkgdesc = A script in order to run Chromium in fullscreen mode under the chromium user pkgver = 1 - pkgrel = 1 + pkgrel = 2 install = chromium-fullscreen.install arch = x86_64 arch = i686 @@ -13,12 +13,11 @@ pkgbase = chromium-fullscreen depends = xorg-xrandr depends = xorg-xinit depends = chromium - source = chromium-fullscreen.service + depends = xlogin-git source = chromium-fullscreen.sysuser - source = chromium-fullscreen.sh - md5sums = c1b2275b9f28359fe8742b6ed0f120e1 + source = chromium-fullscreen.xinitrc md5sums = 9e979fbdd1e4a5a04fd0e91ce6a9a7be - md5sums = 9cdf91af72c57eb9e4f359942ced5ddd + md5sums = 9fb3d73709f7461c8381183ac93a4e79 pkgname = chromium-fullscreen @@ -1,26 +1,21 @@ # Author: Julian Xhokaxhiu <info@julianxhokaxhiu.com> pkgname=chromium-fullscreen pkgver=1 -pkgrel=1 -pkgdesc="Systemd service and user to run Chromium in fullscreen mode" +pkgrel=2 +pkgdesc="A script in order to run Chromium in fullscreen mode under the chromium user" url="" arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h') license=('MIT') -depends=('xorg-server' 'xorg-xrandr' 'xorg-xinit' 'chromium') +depends=('xorg-server' 'xorg-xrandr' 'xorg-xinit' 'chromium' 'xlogin-git') install='chromium-fullscreen.install' -source=('chromium-fullscreen.service' - 'chromium-fullscreen.sysuser' - 'chromium-fullscreen.sh') -md5sums=('c1b2275b9f28359fe8742b6ed0f120e1' - '9e979fbdd1e4a5a04fd0e91ce6a9a7be' - '9cdf91af72c57eb9e4f359942ced5ddd') +source=('chromium-fullscreen.sysuser' + 'chromium-fullscreen.xinitrc') +md5sums=('9e979fbdd1e4a5a04fd0e91ce6a9a7be' + '9fb3d73709f7461c8381183ac93a4e79') package() { # Copy autorun script - install -Dm644 ${srcdir}/chromium-fullscreen.sh "$pkgdir/home/chromium/.systemd/chromium-fullscreen.sh" - - #Install service file - install -Dm644 ${srcdir}/chromium-fullscreen.service "$pkgdir/usr/lib/systemd/system/chromium-fullscreen.service" + install -Dm644 ${srcdir}/chromium-fullscreen.xinitrc "$pkgdir/home/chromium/.xinitrc" #Install sysuser config install -Dm644 ${srcdir}/chromium-fullscreen.sysuser "$pkgdir/usr/lib/sysusers.d/chromium-fullscreen.conf" diff --git a/chromium-fullscreen.install b/chromium-fullscreen.install index 0e32523c5931..a0dca1e6886d 100644 --- a/chromium-fullscreen.install +++ b/chromium-fullscreen.install @@ -6,18 +6,20 @@ post_install() { mkdir -p /home/chromium # Create a first sample of Autostart Url - echo -e "https://www.archlinux.org/\n" >> /home/chromium/chromium-autostart-url.txt + echo -e "https://www.archlinux.org/\n" > /home/chromium/chromium-autostart-url.txt # Fix permissions chown -R chromium:chromium /home/chromium + # Enable the xlogin service + systemctl enable xlogin@chromium + # Print additional useful informations 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" + echo -e "==> [INFO] Please restart in order to start Chromium Fullscreen." } post_upgrade() { diff --git a/chromium-fullscreen.xinitrc b/chromium-fullscreen.xinitrc new file mode 100644 index 000000000000..05b08a850e68 --- /dev/null +++ b/chromium-fullscreen.xinitrc @@ -0,0 +1,16 @@ +#!/bin/bash + +# 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 + + +# Autostart Chromium in Fullscreen mode +exec /usr/bin/chromium --desktop-window-1080p --kiosk "$URL" |