Adjustments to support workstation mode
This commit is contained in:
27
distfiles/usr/local/bin/kiosk_viewhtml
Executable file
27
distfiles/usr/local/bin/kiosk_viewhtml
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# kiosk_viewhtml
|
||||
|
||||
if [ "$1" = "" ]
|
||||
then
|
||||
"usage: kiosk_viewhtml <url> <config file path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url="$1"
|
||||
conf_file="$2"
|
||||
|
||||
source $conf_file
|
||||
if [[ "$EUID" == "0" || $(who|cut -d" " -f1) == "kioskuser" ]]
|
||||
then
|
||||
# Use standalone args
|
||||
chromargs="--test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito"
|
||||
else
|
||||
# Use workstation args
|
||||
chromargs="--test-type --ignore-certificate-errors --start-fullscreen --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito"
|
||||
fi
|
||||
if ! chromium $chromargs $url
|
||||
then
|
||||
kiosk_cleanup.sh
|
||||
xmessage -buttons "Ok:1" -center "Failed to retrieve web page."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user