Skip to content

Commit

Permalink
Better Chromium: install Raspberry Pi Foundation chromium on rpi Ubuntu
Browse files Browse the repository at this point in the history
suggestion from #2528
  • Loading branch information
theofficialgman committed Jan 15, 2024
1 parent 928e3bb commit 4415aec
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions apps/Better Chromium/install
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,36 @@ else
error "User error: Chromium is not installed! Failed to find either a 'chromium' command or 'chromium-browser' command. If you are sure Chromium is installed, please reach out to Botspot for this to be fixed."
fi

# obtain model
get_model &>/dev/null
if [[ "$model" == *"Raspberry Pi"* ]] && [[ "$__os_id" == Ubuntu ]]; then
# rpi ubuntu use Pi OS packaged chromium
add_external_repo "raspberrypi" "https://archive.raspberrypi.com/debian/raspberrypi.gpg.key" "https://archive.raspberrypi.com/debian" "bookworm" "main" || exit 1
# also disable chromium snap apt package from Ubuntu
echo 'Package: *
Pin: release o=Raspberry Pi Foundation
Pin-Priority: -1
Package: chromium*
Pin: release o=Raspberry Pi Foundation
Pin-Priority: 1000
Package: chromium*
Pin: release o=Ubuntu*
Pin-Priority: -1' | sudo tee /etc/apt/preferences.d/chromium >/dev/null
if package_installed "chromium-browser"; then
# install_packages will not switch an already installed 1:1snap* package to a XXX chromium-browser package since this would constitute a downgrade
# the pin priorities added above will prevent Ubuntu repository chromium-browser packages from even showing or installing in the future but we still need to do the initial downgrade from 1:1snap* to the ppa version of chromium-browser
apt_update
apt_lock_wait
sudo apt --only-upgrade --allow-downgrades install chromium-browser -y | less_apt
else
apt_update
apt_lock_wait
sudo apt install chromium-browser -y | less_apt
fi
fi

#determine where the Chromium customizations folder is.
if [ -d /etc/chromium.d ];then
folder=/etc/chromium.d
Expand Down

0 comments on commit 4415aec

Please sign in to comment.