diff --git a/Dockerfile b/Dockerfile index 46d0163..3ef5388 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,13 +51,6 @@ RUN \ find /usr/share/icons/Adwaita -type d -mindepth 1 -maxdepth 1 -not -name 16x16 -not -name scalable -exec rm -rf {} ';' && \ true -# Set default settings. -RUN \ - CFG_FILE="/usr/lib/firefox/browser/defaults/preferences/firefox-branding.js" && \ - echo '// Default download directory.' >> "$CFG_FILE" && \ - echo 'pref("browser.download.dir", "/config/downloads");' >> "$CFG_FILE" && \ - echo 'pref("browser.download.folderList", 2);' >> "$CFG_FILE" - # Install profile-cleaner. #RUN \ # add-pkg --virtual build-dependencies curl && \ diff --git a/rootfs/defaults/prefs.js b/rootfs/defaults/prefs.js deleted file mode 100644 index 5e1d3e9..0000000 --- a/rootfs/defaults/prefs.js +++ /dev/null @@ -1,7 +0,0 @@ -// Disable the privacy notice page. -user_pref("toolkit.telemetry.reportingpolicy.firstRun", false); -// Prevent closing Firefox when closing the last tab. -user_pref("browser.tabs.closeWindowWithLastTab", false); -// Disable confirmation before quitting with Ctrl+Q. Needed to allow Firefox -// to quit cleanly when container is shutted down. -user_pref("browser.warnOnQuitShortcut", false); diff --git a/rootfs/etc/cont-init.d/55-firefox.sh b/rootfs/etc/cont-init.d/55-firefox.sh index ddaf322..1beb953 100755 --- a/rootfs/etc/cont-init.d/55-firefox.sh +++ b/rootfs/etc/cont-init.d/55-firefox.sh @@ -14,9 +14,6 @@ if [ ! -f /config/machine-id ]; then cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id fi -# Copy default preferences. -[ -f /config/profile/prefs.js ] || cp /defaults/prefs.js /config/profile/prefs.js - # Clean/optimize Firefox databases. #if [ -d /config/.mozilla/firefox ] && [ -d /config/profile ]; then # [ -f /config/.mozilla/firefox/profiles.ini ] || cp /defaults/profiles.ini /config/.mozilla/firefox/ diff --git a/rootfs/usr/lib/firefox/browser/defaults/preferences/firefox-branding.js b/rootfs/usr/lib/firefox/browser/defaults/preferences/firefox-branding.js new file mode 100644 index 0000000..9e9e1da --- /dev/null +++ b/rootfs/usr/lib/firefox/browser/defaults/preferences/firefox-branding.js @@ -0,0 +1,10 @@ +// Default download directory. +pref("browser.download.dir", "/config/downloads"); +pref("browser.download.folderList", 2); +// Disable the privacy notice page. +pref("toolkit.telemetry.reportingpolicy.firstRun", false); +// Prevent closing Firefox when closing the last tab. +pref("browser.tabs.closeWindowWithLastTab", false); +// Disable confirmation before quitting with Ctrl+Q. Needed to allow Firefox +// to quit cleanly when container is shutted down. +pref("browser.warnOnQuitShortcut", false);