Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fff52cfcee | ||
|
|
46a73dfb9e |
2 changed files with 137 additions and 16 deletions
150
post_install.sh
150
post_install.sh
|
|
@ -1,14 +1,30 @@
|
||||||
printf "[daemon]\nAutomaticLoginEnable=true\nAutomaticLogin=kiosk\n\n[security]\n\n[xdmcp]\n\n[chooser]\n\n[debug]\n" > /etc/gdm3/daemon.conf
|
printf "[daemon]\nAutomaticLoginEnable=true\nAutomaticLogin=kiosk\n\n[security]\n\n[xdmcp]\n\n[chooser]\n\n[debug]\n" > /etc/gdm3/daemon.conf
|
||||||
mkdir -p /usr/lib/firefox-esr/distribution
|
|
||||||
tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF'
|
|
||||||
|
# Firefox policy
|
||||||
|
# (I used to put this in /etc/firefox/policies/policies.json instead)
|
||||||
|
mkdir -p /usr/lib/firefox-esr/distribution
|
||||||
|
tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF'
|
||||||
{
|
{
|
||||||
"policies": {
|
"policies": {
|
||||||
|
"AppAutoUpdate": true,
|
||||||
|
"BackgroundAppUpdate": true,
|
||||||
|
"BlockAboutAddons": true,
|
||||||
|
"BlockAboutConfig": true,
|
||||||
|
"BlockAboutProfiles": true,
|
||||||
|
"BlockAboutSupport": true,
|
||||||
"DisableDeveloperTools": true,
|
"DisableDeveloperTools": true,
|
||||||
"BlockAboutAddons": true,
|
"BlockAboutAddons": true,
|
||||||
"BlockAboutConfig": true,
|
"BlockAboutConfig": true,
|
||||||
"BlockAboutProfiles": true,
|
"BlockAboutProfiles": true,
|
||||||
"BlockAboutSupport": true,
|
"BlockAboutSupport": true,
|
||||||
|
"DisableFeedbackCommands": true,
|
||||||
"DisableFirefoxAccounts": true,
|
"DisableFirefoxAccounts": true,
|
||||||
|
"DisableFirefoxScreenshots": true,
|
||||||
|
"DisableFirefoxStudies": true,
|
||||||
|
"DisableForgetButton": true,
|
||||||
|
"DisableFormHistory": true,
|
||||||
|
"DisablePocket": true,
|
||||||
"DisablePrivateBrowsing": true,
|
"DisablePrivateBrowsing": true,
|
||||||
"DisableProfileImport": true,
|
"DisableProfileImport": true,
|
||||||
"DisableProfileRefresh": true,
|
"DisableProfileRefresh": true,
|
||||||
|
|
@ -16,10 +32,33 @@ tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF'
|
||||||
"DisablePocket": true,
|
"DisablePocket": true,
|
||||||
"DisableFirefoxScreenshots": true,
|
"DisableFirefoxScreenshots": true,
|
||||||
"DisableSetDesktopBackground": true,
|
"DisableSetDesktopBackground": true,
|
||||||
|
"DisableTelemetry": true,
|
||||||
|
"DisplayBookmarksToolbar": "never",
|
||||||
|
"DisplayMenuBar": "never",
|
||||||
|
"EnableTrackingProtection": {
|
||||||
|
"Cryptomining": true,
|
||||||
|
"Fingerprinting": true,
|
||||||
|
"Value": true
|
||||||
|
},
|
||||||
|
"ExtensionSettings": {
|
||||||
|
"*": {
|
||||||
|
"installation_mode": "allowed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"FirefoxHome": {
|
||||||
|
"Highlights": false,
|
||||||
|
"Pocket": false,
|
||||||
|
"Search": false,
|
||||||
|
"SponsoredPocket": false,
|
||||||
|
"SponsoredTopSites": false,
|
||||||
|
"TopSites": false
|
||||||
|
},
|
||||||
"Homepage": {
|
"Homepage": {
|
||||||
|
"StartPage": "homepage",
|
||||||
"URL": "https://mahn.ke",
|
"URL": "https://mahn.ke",
|
||||||
"Locked": true
|
"Locked": true
|
||||||
},
|
},
|
||||||
|
"ManualAppUpdateOnly": true,
|
||||||
"NewTabPage": {
|
"NewTabPage": {
|
||||||
"Enabled": false
|
"Enabled": false
|
||||||
},
|
},
|
||||||
|
|
@ -27,6 +66,21 @@ tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF'
|
||||||
"Path": "C:\\KioskDownloads",
|
"Path": "C:\\KioskDownloads",
|
||||||
"Locked": true
|
"Locked": true
|
||||||
},
|
},
|
||||||
|
"PictureInPicture": {
|
||||||
|
"Enabled": false
|
||||||
|
},
|
||||||
|
"Preferences": {
|
||||||
|
"extensions.getAddons.showPane": {
|
||||||
|
"Status": "locked",
|
||||||
|
"Type": "boolean",
|
||||||
|
"Value": false
|
||||||
|
},
|
||||||
|
"ui.key.menuAccessKeyFocuses": {
|
||||||
|
"Status": "locked",
|
||||||
|
"Type": "boolean",
|
||||||
|
"Value": false
|
||||||
|
}
|
||||||
|
},
|
||||||
"PromptForDownloadLocation": false,
|
"PromptForDownloadLocation": false,
|
||||||
"StartDownloadsInTempDirectory": false,
|
"StartDownloadsInTempDirectory": false,
|
||||||
"DisableAppUpdate": true,
|
"DisableAppUpdate": true,
|
||||||
|
|
@ -36,27 +90,93 @@ tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<'EOF'
|
||||||
"Location": "deny",
|
"Location": "deny",
|
||||||
"Notifications": "deny"
|
"Notifications": "deny"
|
||||||
},
|
},
|
||||||
|
"SanitizeOnShutdown": {
|
||||||
|
"Cache": true,
|
||||||
|
"Cookies": true,
|
||||||
|
"Downloads": true,
|
||||||
|
"FormData": true,
|
||||||
|
"History": true,
|
||||||
|
"OfflineApps": true,
|
||||||
|
"Sessions": true,
|
||||||
|
"SiteSettings": true
|
||||||
|
},
|
||||||
"ShowHomeButton": false,
|
"ShowHomeButton": false,
|
||||||
|
"UserMessaging": {
|
||||||
|
"ExtensionRecommendations": false,
|
||||||
|
"FeatureRecommendations": false,
|
||||||
|
"MoreFromMozilla": false,
|
||||||
|
"SkipOnboarding": false,
|
||||||
|
"UrlbarInterventions": false,
|
||||||
|
"WhatsNew": false,
|
||||||
|
"FirefoxLabs": false,
|
||||||
|
"Locked": false
|
||||||
|
},
|
||||||
"DisplayMenuBar": false,
|
"DisplayMenuBar": false,
|
||||||
"DisplayBookmarksToolbar": false,
|
"DisplayBookmarksToolbar": false,
|
||||||
"policies": {
|
"WebsiteFilter": {
|
||||||
"UserMessaging": {
|
"Block": [
|
||||||
"ExtensionRecommendations": false,
|
"<all_urls>"
|
||||||
"FeatureRecommendations": false,
|
],
|
||||||
"UrlbarInterventions": false,
|
"Exceptions": [
|
||||||
"SkipOnboarding": false,
|
"*://*.c3nav.de/*",
|
||||||
"MoreFromMozilla": false,
|
"*://*.hvv.de/*",
|
||||||
"FirefoxLabs": false,
|
"*://engel.events.ccc.de/*",
|
||||||
"Locked": false
|
"*://*.chaos.social/*",
|
||||||
}
|
"*://*.events.ccc.de/*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
chown -R kiosk:kiosk /home/kiosk/.config
|
|
||||||
|
|
||||||
|
# Bash autostart of sway
|
||||||
tee /home/kiosk/.bash_profile > /dev/null <<'EOF'
|
tee /home/kiosk/.bash_profile > /dev/null <<'EOF'
|
||||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
exec cage firefox --kiosk https://c3nav.de
|
exec sway
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Sway config
|
||||||
|
mkdir -p /home/kiosk/.config/sway/
|
||||||
|
tee /home/kiosk/.config/sway/config > /dev/null <<'EOF'
|
||||||
|
input type:pointer {
|
||||||
|
events disabled
|
||||||
|
}
|
||||||
|
|
||||||
|
input type:keyboard {
|
||||||
|
events disabled
|
||||||
|
}
|
||||||
|
|
||||||
|
input type:touch {
|
||||||
|
events enabled
|
||||||
|
}
|
||||||
|
|
||||||
|
input * xkb_layout de
|
||||||
|
|
||||||
|
## This may not be needed if there is a systemd unit
|
||||||
|
# exec_always firefox --wayland --kiosk
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
# Systemd unit
|
||||||
|
mkdir -p /home/kiosk/.config/systemd/user/
|
||||||
|
tee /home/kiosk/.config/systemd/user/firefox-kiosk.service > /dev/null <<'EOF'
|
||||||
|
service
|
||||||
|
[Unit]
|
||||||
|
Description=Firefox im Kiosk-Mode
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
TimeoutStartSec=0
|
||||||
|
ExecStart=/usr/bin/firefox --kiosk
|
||||||
|
Environment=DISPLAY=:0
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
EOF
|
||||||
|
mkdir -p /home/kiosk/.config/systemd/user/default.target.wants/
|
||||||
|
ln -s /home/kiosk/.config/systemd/user/firefox-kiosk.service /home/kiosk/.config/systemd/user/default.target.wants/firefox-kiosk.service
|
||||||
|
|
||||||
|
|
||||||
|
chown -R kiosk:kiosk /home/kiosk/.config
|
||||||
|
|
@ -53,7 +53,8 @@ d-i pkgsel/include string \
|
||||||
sudo \
|
sudo \
|
||||||
cage \
|
cage \
|
||||||
firefox-esr \
|
firefox-esr \
|
||||||
curl
|
curl \
|
||||||
|
sway
|
||||||
|
|
||||||
d-i pkgsel/exclude string gnome-software
|
d-i pkgsel/exclude string gnome-software
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue