Moved all default preferences to the same location.

This commit is contained in:
Jocelyn Le Sage 2023-04-08 21:55:01 -04:00
parent e1d32c30f2
commit b1b68dcfea
4 changed files with 10 additions and 17 deletions

View File

@ -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 {} ';' && \ find /usr/share/icons/Adwaita -type d -mindepth 1 -maxdepth 1 -not -name 16x16 -not -name scalable -exec rm -rf {} ';' && \
true 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. # Install profile-cleaner.
#RUN \ #RUN \
# add-pkg --virtual build-dependencies curl && \ # add-pkg --virtual build-dependencies curl && \

View File

@ -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);

View File

@ -14,9 +14,6 @@ if [ ! -f /config/machine-id ]; then
cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id cat /proc/sys/kernel/random/uuid | tr -d '-' > /config/machine-id
fi fi
# Copy default preferences.
[ -f /config/profile/prefs.js ] || cp /defaults/prefs.js /config/profile/prefs.js
# Clean/optimize Firefox databases. # Clean/optimize Firefox databases.
#if [ -d /config/.mozilla/firefox ] && [ -d /config/profile ]; then #if [ -d /config/.mozilla/firefox ] && [ -d /config/profile ]; then
# [ -f /config/.mozilla/firefox/profiles.ini ] || cp /defaults/profiles.ini /config/.mozilla/firefox/ # [ -f /config/.mozilla/firefox/profiles.ini ] || cp /defaults/profiles.ini /config/.mozilla/firefox/

View File

@ -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);