-
-
Save ekapujiw2002/c17d00cf1614964077bd72ff2dab9c98 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
| # | |
| # Setup Kiosk mode for Alpine Linux | |
| # | |
| #!/bin/sh | |
| USER=kiosk | |
| KEYBOARD_LAYOUT=fr | |
| KEYBOARD_MODEL=mac | |
| WIDTH=1024 | |
| HEIGHT=768 | |
| BROWSER=chromium | |
| PRIVATE=yes | |
| TABS=yes | |
| URL=https://www.google.com | |
| # Install Xorg | |
| # | |
| setup-xorg-base | |
| apk add xrandr setxkbmap xset xsetroot | |
| # apk add xterm xeyes xcalc | |
| # Enable Community repo | |
| # | |
| # Install Browser | |
| # | |
| apk add chromium | |
| # Automatic login, no VTs, silent boot | |
| # | |
| cp /etc/inittab /etc/inittab.bak | |
| cat << EOF > /etc/inittab | |
| ::sysinit:/sbin/openrc -q -C sysinit | |
| ::sysinit:/sbin/openrc -q -C boot | |
| ::wair:/sbin/openrc -q -C default | |
| tty1::respawn:/bin/login -f kiosk | |
| #tty2::respawn:/sbin/getty 38400 tty2 | |
| EOF | |
| # Autostart Xorg | |
| # | |
| cat << EOF > /etc/skel/.profile | |
| startx 2> /dev/null | |
| EOF | |
| # Xorg Session | |
| cat << EOF > /etc/skel/.xinitrc | |
| setxkbmap $KEYBOARD_LAYOUT $KEYBOARD_MODEL | |
| exec chromium-browser | |
| EOF | |
| # Disable Xorg VT Switch | |
| cat << EOF > /etc/X11/xorg.conf | |
| Section "ServerFlags" | |
| Option "DontVTSwitch" "true" | |
| Option "DontZap" "true" | |
| EndSection | |
| EOF | |
| # Create user | |
| adduser $USER -D | |
| # Silent Boot | |
| echo "" > /etc/motd | |
| echo "" > /etc/issue | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment