Skip to content

Commit

Permalink
install: improve Wayland detection, no kiosk setup on wayland (#1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
andi34 authored Dec 2, 2024
1 parent 5cfe838 commit 623b177
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions install-photobooth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CHROME_FLAGS=false
CHROME_DEFAULT_FLAGS="--noerrdialogs --disable-infobars --disable-features=Translate --no-first-run --check-for-update-interval=31536000 --touch-events=enabled --password-store=basic"
AUTOSTART_FILE=""
DESKTOP_OS=true
WAYLAND_ENV=true
WAYLAND_ENV=$(pgrep wayfire > /dev/null || pgrep labwc > /dev/null && echo true || echo false)
PHP_VERSION="8.3"

# Update
Expand Down Expand Up @@ -1033,14 +1033,6 @@ else
warn "Can not check Internet connection, wget missing!"
fi

if [ "$RUNNING_ON_PI" = true ]; then
if [ -f "/home/$USERNAME/.config/wayfire.ini" ]; then
WAYLAND_ENV=true
else
WAYLAND_ENV=false
fi
fi

############################################################
# #
# Try updating Photobooth #
Expand All @@ -1061,10 +1053,12 @@ if [ "$RUN_UPDATE" = true ]; then

if [ "$GIT_INSTALL" = true ]; then
detect_browser
if [ -d "/etc/xdg/autostart" ] && [ "$WEBBROWSER" != "unknown" ]; then
ask_kiosk_mode
else
if [ "$WAYLAND_ENV" = true ]; then
warn "### Kiosk-Mode can't be setup automatically on wayland!"
elif [ "$WEBBROWSER" = "unknown" ]; then
warn "### No supported webbrowser found!"
else
ask_kiosk_mode
fi
print_spaces

Expand Down Expand Up @@ -1197,14 +1191,14 @@ fi
print_spaces

detect_browser
if [ -d "/etc/xdg/autostart" ]; then
if [ "$WEBBROWSER" != "unknown" ]; then
ask_kiosk_mode
else
warn "### No supported webbrowser found!"
fi
print_spaces
if [ "$WAYLAND_ENV" = true ]; then
warn "### Kiosk-Mode can't be setup automatically on wayland!"
elif [ "$WEBBROWSER" = "unknown" ]; then
warn "### No supported webbrowser found!"
else
ask_kiosk_mode
fi
print_spaces

# Pi specific setup start
if [ "$RUNNING_ON_PI" = true ]; then
Expand Down

0 comments on commit 623b177

Please sign in to comment.