diff options
author | Jonathan Bauer | 2019-07-30 13:18:23 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-07-30 13:18:23 +0200 |
commit | ee1a78aeacdbaf70681d86dd768cb56b2fdc3c89 (patch) | |
tree | 2296a6a5578d59ea9afd92c5fff5e01d3b553b96 /core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/00-chromium-policies | |
parent | [hardware-stats] abs. symlink to usage_stats (diff) | |
download | mltk-ee1a78aeacdbaf70681d86dd768cb56b2fdc3c89.tar.gz mltk-ee1a78aeacdbaf70681d86dd768cb56b2fdc3c89.tar.xz mltk-ee1a78aeacdbaf70681d86dd768cb56b2fdc3c89.zip |
[kiosk-chromium] implement SLX_BROWSER_RELOAD_SECS
+ space-safe arguments array for chromium-browser call
+ directly create bookmark template without creating a billion
tempfiles...
Diffstat (limited to 'core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/00-chromium-policies')
-rw-r--r-- | core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/00-chromium-policies | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/00-chromium-policies b/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/00-chromium-policies index 743d53ed..9f7712d2 100644 --- a/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/00-chromium-policies +++ b/core/modules/kiosk-chromium/data/opt/openslx/pam/hooks/session-open.d/00-chromium-policies @@ -3,28 +3,27 @@ . /opt/openslx/config -chromium_policies() { - # create managed policy file, those settings cannot be changed by the user - # (if he even gets to the settings dialog in the first place) - local chromium_policy_file="/etc/chromium-browser/policies/managed/kiosk-mode.json" - [ -e "$chromium_policy_file" ] && rm -f "$chromium_policy_file" - - mkdir -p ${chromium_policy_file%/*} - +# creates managed policy file, those settings cannot be changed by the user +# (if he even gets to the settings dialog in the first place) +create_chromium_policies() { if [ -n "$SLX_BROWSER_BOOKMARKS" ]; then bookmarkbar=true else bookmarkbar=false fi - cat <<- EOF > "$chromium_policy_file" + cat <<- EOF > "/etc/chromium-browser/policies/managed/kiosk-mode.json" { "AutoFillEnabled": false, "BackgroundModeEnabled": false, "BookmarkBarEnabled": $bookmarkbar, "DefaultBrowserSettingEnabled": true, "DownloadRestrictions": 3, + "HomepageLocation": "$SLX_BROWSER_URL", + "NewTabPageLocation": "$SLX_BROWSER_URL", "PasswordManagerEnabled": false, + "RestoreOnStartup": 4, + "RestoreOnStartupURLs": "$SLX_BROWSER_URL", "ShowAppsShortcutInBookmarkBar": false, "TranslateEnabled": false } @@ -32,6 +31,6 @@ chromium_policies() { } if [ "${PAM_SERVICE//autologin/}" != "$PAM_SERVICE" -a "$PAM_TTY" = ":0" ]; then - chromium_policies + create_chromium_policies fi true |