Browse Source

Switch from Chome to Firefox

tags/nilmbuntu-6
Jim Paris 1 year ago
parent
commit
1dd5c6ab8d
2 changed files with 19 additions and 30 deletions
  1. +3
    -30
      files/customize-inner.sh
  2. +16
    -0
      files/syspref.js

+ 3
- 30
files/customize-inner.sh View File

@@ -104,42 +104,15 @@ cp /usr/share/applications/exo-terminal-emulator.desktop $DESKTOP || true
cp /usr/share/applications/exo-web-browser.desktop $DESKTOP || true
chmod +x $DESKTOP/*

# Custom background image (which was already copied in by customize.sh)
# Custom background image
XML=/etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
BG=/usr/share/xfce4/backdrops/nilmbuntu.png
apt -y install xmlstarlet
xmlstarlet ed -L -u "//property[@name='image-path']/@value" -v "$BG" $XML
xmlstarlet ed -L -u "//property[@name='image-style']/@value" -v "3" $XML

# Get Chrome
wget -O chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i chrome.deb

# Make Chrome a little nicer:
# - No first run
mkdir -p /etc/skel/.config/google-chrome/Default
touch '/etc/skel/.config/google-chrome/First Run'
# - Set up some default bookmarks on the bookmark bar
cat >/etc/skel/.config/google-chrome/Default/Bookmarks <<"EOF"
{ "version": 1, "roots": {
"other": { "id": "2", "name": "Other bookmarks", "type": "folder",
"children": [ ] },
"synced": { "id": "3", "name": "Mobile bookmarks", "type": "folder",
"children": [ ] },
"bookmark_bar": { "id": "1", "name": "Bookmarks bar", "type": "folder",
"children": [ {
"id": "6", "type": "url",
"name": "Wattsworth",
"url": "https://www.wattsworth.net/"
}, {
"id": "7", "type": "url",
"name": "Standalone NILM",
"type": "url",
"url": "http://nilm.primary/"
} ] }
} }
EOF

# Make Firefox nicer
install -D -m 0644 files/syspref.js /etc/hosts.nilm

# Create NILM user. This should happen after anything that we put in
# /etc/skel, since files get copied from there. Note that this user


+ 16
- 0
files/syspref.js View File

@@ -0,0 +1,16 @@
pref("browser.aboutwelcome.enabled", false);
pref("datareporting.policy.firstRunURL", "");
pref("network.trr.mode", 5);
pref("toolkit.telemetry.reportingpolicy.firstRun", false);
pref("browser.startup.homepage_override.mstone", "ignore");
pref("trailhead.firstrun.didSeeAboutWelcome", true);

pref("browser.newtabpage.activity-stream.default.sites","https://www.google.com/");
pref("browser.newtabpage.activity-stream.feeds.asrouterfeed", false);
pref("browser.newtabpage.activity-stream.feeds.discoverystreamfeed", false);
pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
pref("browser.newtabpage.activity-stream.feeds.snippets", false);
pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false);
pref("browser.newtabpage.pinned", "[{\"url\":\"https://www.wattsworth.net\",\"label\":\"Wattsworth\"},{\"url\":\"http://nilm.primary\",\"label\":\"Local NILM\"}]");
pref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts", false);

Loading…
Cancel
Save