Add hostname setup and kiosk mode to install
This commit is contained in:
parent
029e349c5b
commit
b0c5a11cde
|
|
@ -31,15 +31,6 @@ if ! sudo -n true 2>/dev/null; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -- Hostname --
|
|
||||||
|
|
||||||
CURRENT_HOSTNAME=$(hostname)
|
|
||||||
if [ "$CURRENT_HOSTNAME" != "toes" ]; then
|
|
||||||
echo ">> Setting hostname to 'toes' (was '$CURRENT_HOSTNAME')"
|
|
||||||
sudo hostnamectl set-hostname toes
|
|
||||||
sudo sed -i "s/$CURRENT_HOSTNAME/toes/g" /etc/hosts
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -- System packages --
|
# -- System packages --
|
||||||
|
|
||||||
echo ">> Updating system packages"
|
echo ">> Updating system packages"
|
||||||
|
|
@ -120,36 +111,9 @@ sudo systemctl enable toes
|
||||||
echo ">> Starting toes"
|
echo ">> Starting toes"
|
||||||
sudo systemctl restart toes
|
sudo systemctl restart toes
|
||||||
|
|
||||||
# -- Kiosk mode --
|
|
||||||
|
|
||||||
echo ">> Enabling kiosk mode"
|
|
||||||
sudo raspi-config nonint do_boot_behaviour B4 2>/dev/null || true
|
|
||||||
|
|
||||||
mkdir -p ~/.config/labwc
|
|
||||||
cat > ~/.config/labwc/autostart <<'EOF'
|
|
||||||
chromium --noerrdialogs --disable-infobars --kiosk http://localhost
|
|
||||||
EOF
|
|
||||||
|
|
||||||
WAYFIRE_CONFIG="$HOME/.config/wayfire.ini"
|
|
||||||
if [ -f "$WAYFIRE_CONFIG" ]; then
|
|
||||||
sed -i '/^chromium = /d' "$WAYFIRE_CONFIG"
|
|
||||||
if grep -q '^\[autostart\]' "$WAYFIRE_CONFIG"; then
|
|
||||||
sed -i '/^\[autostart\]/a chromium = chromium --noerrdialogs --disable-infobars --kiosk http://localhost' "$WAYFIRE_CONFIG"
|
|
||||||
else
|
|
||||||
cat >> "$WAYFIRE_CONFIG" <<'EOF'
|
|
||||||
|
|
||||||
[autostart]
|
|
||||||
chromium = chromium --noerrdialogs --disable-infobars --kiosk http://localhost
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -- Done --
|
# -- Done --
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " toes is installed! Rebooting in 5 seconds..."
|
echo " toes is installed and running!"
|
||||||
echo " After reboot, visit: http://toes.local"
|
echo " Visit: http://$(hostname).local"
|
||||||
echo ""
|
echo ""
|
||||||
sleep 5
|
|
||||||
sudo nohup reboot >/dev/null 2>&1 &
|
|
||||||
exit 0
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user