Skip to content

Commit

Permalink
Autoselect chromium or chromium-browser to support Debian wheezy
Browse files Browse the repository at this point in the history
  • Loading branch information
schlomo committed Nov 18, 2013
1 parent 21c665b commit 23c9dc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: kiosk-browser
Version: 29
Version: 30
Priority: optional
Section: web
Architecture: all
Expand Down
8 changes: 7 additions & 1 deletion src/var/lib/kiosk-browser/.xsession
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,20 @@ fi
#forget about running jobs
disown -a

# Ubuntu has chromium-browser and Debian wheezy has chromium
CHROME=$(type -p chromium-browser 2>/dev/null)
if [[ -z "$CHROME" ]] ; then
CHROME=$(type -p chromium 2>/dev/null)
fi

while true; do
# exit if no display given, use xwininfo to test for running X server
xwininfo -root &>/dev/null || exit 0
# wipe state data
rm -Rf ~/.config/chromium/* ~/.cache/* ~/.pki/*
# if KIOSK_BROWSER_PORTS is set, assume that it specifies multiple screens connected.
for (( c=0 ; c<${#KIOSK_BROWSER_PORTS[@]} ; c++ )) ; do
chromium-browser --user-data-dir=$HOME/.config/chromium/$c "${KIOSK_BROWSER_OPTIONS[@]}" --disable-translate --no-first-run --start-maximized --kiosk "${KIOSK_BROWSER_START_PAGE[c]:-$KIOSK_BROWSER_START_PAGE}" &
$CHROME --user-data-dir=$HOME/.config/chromium/$c "${KIOSK_BROWSER_OPTIONS[@]}" --disable-translate --no-first-run --start-maximized --kiosk "${KIOSK_BROWSER_START_PAGE[c]:-$KIOSK_BROWSER_START_PAGE}" &
sleep 5
# move new window to the current screen. We identify the window by the --user-data-dir option which appears in the window class name :-)
port=$(xrandr_find_port "${KIOSK_BROWSER_PORTS[c]}")
Expand Down

0 comments on commit 23c9dc2

Please sign in to comment.