tmp
This commit is contained in:
parent
33628f6c4c
commit
a1a0d4fbd1
2 changed files with 93 additions and 68 deletions
74
post_install.sh
Normal file
74
post_install.sh
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
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'
|
||||
{
|
||||
"policies": {
|
||||
"DisableDeveloperTools": true,
|
||||
"BlockAboutAddons": true,
|
||||
"BlockAboutConfig": true,
|
||||
"BlockAboutProfiles": true,
|
||||
"BlockAboutSupport": true,
|
||||
"DisableFirefoxAccounts": true,
|
||||
"DisablePrivateBrowsing": true,
|
||||
"DisableProfileImport": true,
|
||||
"DisableProfileRefresh": true,
|
||||
"DisableSafeMode": true,
|
||||
"DisablePocket": true,
|
||||
"DisableFirefoxScreenshots": true,
|
||||
"DisableSetDesktopBackground": true,
|
||||
"Homepage": {
|
||||
"URL": "https://mahn.ke",
|
||||
"Locked": true
|
||||
},
|
||||
"NewTabPage": {
|
||||
"Enabled": false
|
||||
},
|
||||
"DownloadDirectory": {
|
||||
"Path": "C:\\KioskDownloads",
|
||||
"Locked": true
|
||||
},
|
||||
"PromptForDownloadLocation": false,
|
||||
"StartDownloadsInTempDirectory": false,
|
||||
"DisableAppUpdate": true,
|
||||
"Permissions": {
|
||||
"Camera": "deny",
|
||||
"Microphone": "deny",
|
||||
"Location": "deny",
|
||||
"Notifications": "deny"
|
||||
},
|
||||
"ShowHomeButton": false,
|
||||
"DisplayMenuBar": false,
|
||||
"DisplayBookmarksToolbar": false,
|
||||
"policies": {
|
||||
"UserMessaging": {
|
||||
"ExtensionRecommendations": false,
|
||||
"FeatureRecommendations": false,
|
||||
"UrlbarInterventions": false,
|
||||
"SkipOnboarding": false,
|
||||
"MoreFromMozilla": false,
|
||||
"FirefoxLabs": false,
|
||||
"Locked": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
chown -R kiosk:kiosk /home/kiosk/.config
|
||||
tee /etc/systemd/system/firefox-kiosk.service > /dev/null <<'EOF'
|
||||
[Unit]
|
||||
Description=Firefox Kiosk
|
||||
After=graphical.target
|
||||
Wants=graphical.target
|
||||
|
||||
[Service]
|
||||
User=kiosk
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/firefox --kiosk https://mahn.ke
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Environment=DISPLAY=:0
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
||||
EOF
|
||||
systemctl enable firefox-kiosk.service
|
||||
87
preseed.cfg
87
preseed.cfg
|
|
@ -1,5 +1,19 @@
|
|||
#_preseed_V1
|
||||
|
||||
# Installer interface language
|
||||
d-i localechooser/language string en
|
||||
d-i localechooser/language-name string English
|
||||
d-i localechooser/supported-locales multiselect en_US.UTF-8
|
||||
|
||||
d-i debian-installer/language string en
|
||||
d-i debian-installer/country string US
|
||||
d-i debian-installer/locale string en_US.UTF-8
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
d-i keyboard-configuration/xkb-keymap select en
|
||||
|
||||
# System locale
|
||||
d-i debian-installer/locale string en_US.UTF-8
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i keyboard-configuration/layoutcode string us
|
||||
d-i time/zone string UTC
|
||||
|
||||
d-i netcfg/choose_interface select auto
|
||||
|
|
@ -49,71 +63,8 @@ d-i grub-installer/only_debian boolean true
|
|||
d-i grub-installer/bootdev string default
|
||||
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
d-i preseed/late_command string \
|
||||
in-target sh -c 'printf "[daemon]\nAutomaticLoginEnable=true\nAutomaticLogin=kiosk\n\n[security]\n\n[xdmcp]\n\n[chooser]\n\n[debug]\n" > /etc/gdm3/daemon.conf'; \
|
||||
in-target sh -c 'printf "[Desktop Entry]\nType=Application\nName=Firefox\nExec=firefox --kiosk https://mahn.ke\nX-GNOME-Autostart-enabled=true\n" > /etc/xdg/autostart/myapp.desktop'; \
|
||||
in-target sh -c 'sudo tee /usr/lib/firefox-esr/distribution/policies.json > /dev/null <<EOF
|
||||
{
|
||||
"policies": {
|
||||
"DisableDeveloperTools": true,
|
||||
"BlockAboutAddons": true,
|
||||
"BlockAboutConfig": true,
|
||||
"BlockAboutProfiles": true,
|
||||
"BlockAboutSupport": true,
|
||||
"DisableFirefoxAccounts": true,
|
||||
"DisablePrivateBrowsing": true,
|
||||
"DisableProfileImport": true,
|
||||
"DisableProfileRefresh": true,
|
||||
"DisableSafeMode": true,
|
||||
"DisablePocket": true,
|
||||
"DisableFirefoxScreenshots": true,
|
||||
"DisableSetDesktopBackground": true,
|
||||
|
||||
"Homepage": {
|
||||
"URL": "https://mahn.ke",
|
||||
"Locked": true
|
||||
},
|
||||
|
||||
"NewTabPage": {
|
||||
"Enabled": false
|
||||
},
|
||||
|
||||
"DownloadDirectory": {
|
||||
"Path": "C:\\KioskDownloads",
|
||||
"Locked": true
|
||||
},
|
||||
|
||||
"PromptForDownloadLocation": false,
|
||||
|
||||
"StartDownloadsInTempDirectory": false,
|
||||
|
||||
"DisableAppUpdate": true,
|
||||
|
||||
"Permissions": {
|
||||
"Camera": "deny",
|
||||
"Microphone": "deny",
|
||||
"Location": "deny",
|
||||
"Notifications": "deny"
|
||||
},
|
||||
|
||||
"ShowHomeButton": false,
|
||||
"DisplayMenuBar": false,
|
||||
"DisplayBookmarksToolbar": false,
|
||||
"policies": {
|
||||
"UserMessaging": {
|
||||
"ExtensionRecommendations": false,
|
||||
"FeatureRecommendations": false,
|
||||
"UrlbarInterventions": false,
|
||||
"SkipOnboarding": false,
|
||||
"MoreFromMozilla": false,
|
||||
"FirefoxLabs": false,
|
||||
"Locked": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EOF'
|
||||
in-target chown -R kiosk:kiosk /home/kiosk/.config; \
|
||||
in-target mkdir -p /usr/lib/firefox-esr/distribution
|
||||
# Download and execute post_install.sh
|
||||
in-target curl -o /tmp/post_install.sh https://example.com/post_install.sh; \
|
||||
in-target chmod +x /tmp/post_install.sh; \
|
||||
in-target /tmp/post_install.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue