Added inital modification for Kiosk version

This commit is contained in:
2022-09-14 17:00:04 +02:00
parent d19b2f3c1b
commit bd1b77c19e
21 changed files with 116 additions and 80 deletions

View File

@@ -0,0 +1,39 @@
#Clear screen on startup
clear
#Functions
NetCheck(){
unset counter
while [[ $counter -lt 3 && "$Net" = "false" ]]
do
sleep 5
ping -q -c1 ictmaatwerk.com &>/dev/null && Net=true || Net=false
counter=$(( $counter + 1 ))
done
}
#Check for network
echo "Waiting for network"
ping -q -c1 google.com &>/dev/null && Net=true || Net=false
#If no network enter wait loop
NetCheck
#Check for manual retry for netwerk
while [[ "$Net" = "false" ]]; do
read -p "Network could not be initialized, Try again (y/n) " yn
case $yn in
[yY]* )
NetCheck
break;;
[Nn]* ) break;;
* ) echo invalid response;;
esac
done
#Check if video and network are ok, else error out
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]] && [[ "$Net" = "true" ]]; then
echo "Loading, please wait..."
exec startx >/dev/null 2>&1
else
echo "System could not be initialized, exited"
sleep 10000
fi

View File

@@ -1,3 +0,0 @@
#set tabstospaces
set tabsize 4
# include ~/.nano/*.nanorc

View File

@@ -0,0 +1,12 @@
#Disable dpms to prevent screen from blanking
xset -dpms; xset s off
#Configure displays (man xrandr for more options)
xrandr --output DP1 --prefered
xrandr --output HDMI1 --prefered
#Start matchbox wm (man matchbox-window-manager for more options)
exec matchbox-window-manager -use_titlebar no -use_cursor no &
#Open browser
exec chromium --kiosk --no-first-run --disable --disable-infobars --disable-suggestions-service --app="https://wm.ictmaatwerk.com/test"