Created
May 11, 2016 18:30
-
-
Save mauro-moreno/79ed4b4c22e3268c3cab19d9a7182618 to your computer and use it in GitHub Desktop.
Creates a kiosk computer based on a clean installation of Debian Jessie with Chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
echo '# Chrome' >> /etc/apt/sources.list | |
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list | |
gpg --keyserver keys.gnupg.net --recv-key A040830F7FAC5991 | |
gpg --export --armor A040830F7FAC5991 | apt-key add - | |
aptitude update | |
aptitude install -y google-chrome-stable matchbox-window-manager pulseaudio sudo xorg | |
echo 'user ALL=(ALL:ALL) ALL' >> /etc/sudoers | |
cat <<EOT >> /opt/kiosk.sh | |
#!/bin/bash | |
xhost + | |
xset -dpms | |
xset s off | |
matchbox-window-manager -use_cursor no -use_titlebar no & | |
start-pulseaudio-x11 | |
while true; do | |
rm -rf ~/.{config,cache}/google-chrome/ | |
google-chrome --kiosk --no-first-run --disable-translate http://google.com | |
sleep 1s | |
done | |
EOT | |
chmod +x /opt/kiosk.sh | |
cat <<EOT >> /lib/systemd/system/kiosk.service | |
[Unit] | |
Description=Kiosk service | |
After=network-online.target | |
[Service] | |
Restart=always | |
User=user | |
Group=user | |
ExecStart=/bin/bash -ec "xinit /opt/kiosk.sh -- -nocursor" | |
[Install] | |
WantedBy=multi-user.target | |
EOT | |
sed -i -e 's/allowed_users=console/allowed_users=anybody/g' /etc/X11/Xwrapper.config | |
systemctl enable /lib/systemd/system/kiosk.service | |
systemctl start kiosk.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment