blob: 743d53edb69fcdf92b1e8802960edda4cf0b6859 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/bash
# ^SOURCED, actually running in ash
. /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%/*}
if [ -n "$SLX_BROWSER_BOOKMARKS" ]; then
bookmarkbar=true
else
bookmarkbar=false
fi
cat <<- EOF > "$chromium_policy_file"
{
"AutoFillEnabled": false,
"BackgroundModeEnabled": false,
"BookmarkBarEnabled": $bookmarkbar,
"DefaultBrowserSettingEnabled": true,
"DownloadRestrictions": 3,
"PasswordManagerEnabled": false,
"ShowAppsShortcutInBookmarkBar": false,
"TranslateEnabled": false
}
EOF
}
if [ "${PAM_SERVICE//autologin/}" != "$PAM_SERVICE" -a "$PAM_TTY" = ":0" ]; then
chromium_policies
fi
true
|