add standard-desktop-setup.sh

This commit is contained in:
Brennen Raimer
2026-03-18 15:58:01 -04:00
parent 6fcb72974f
commit dcb93ce7b1
2 changed files with 97 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
# ubuntu-setup-scripts
# Ubuntu Setup Scripts
Easy shell scripts to run for common setups
Easy shell scripts to run for common setups. Download the script and run it like this:
```bash
# assuming your are using standard-desktop-setup.sh
chmod a+x ./standard-desktop-setup.sh
./standard-desktop-setup.sh
```

89
standard-desktop-setup.sh Normal file
View File

@@ -0,0 +1,89 @@
#!/bin/bash
FIREFOX="org.mozilla.firefox"
EDGE="com.microsoft.Edge"
CHROME="com.google.Chrome"
BRAVE="com.brave.Browser"
LIBREOFFICE="org.libreoffice.LibreOffice"
ONLYOFFICE="org.onlyoffice.desktopeditors"
PINTA="com.github.PintaProject.Pinta"
GIMP="org.gimp.GIMP"
VLC="org.videolan.VLC"
FLATSEAL="com.github.tchx84.Flatseal"
FLATPAKS="$VLC $GIMP $PINTA $FLATSEAL"
UBUNTU=$(dpkg -l | grep -E -o "\w+buntu(-mate|cinnamon|-budgie)?-desktop")
if [[ $UBUNTU == *"buntu-desktop" ]];
then
UBUNTU=$(echo $UBUNTU | cut -d"-" -f 1)
else
UBUNTU="ubuntu"
fi
APT_PKGS="flatpak $UBUNTU-restricted-extras"
if [[ $UBUNTU == "kubuntu" ]]
then
APT_PKGS="$APT_PKGS plasma-discover-backend-flatpak kde-config-flatpak"
else
APT_PKGS="$APT_PKGS gnome-software-plugin-flatpak"
fi
office_suite=0
while [[ $office_suite -ne 1 && $office_suite -ne 2 ]]; do
echo
read -n 1 -p "Which office suite do you want to install?
1. OnlyOffice (Recommended)
2. LibreOffice
Enter 1 or 2 > " office_suite
echo
done
if [ $office_suite -eq 2 ]
then
FLATPAKS="$FLATPAKS $LIBREOFFICE"
else
FLATPAKS="$FLATPAKS $ONLYOFFICE"
fi
browser=0
while [[ $browser -lt 1 || $browser -gt 4 ]]; do
echo
read -n 1 -p "\\n
Which browser do you want to install?\\n
\\n
1. Mozilla Firefox\\n
2. Google Chrome\\n
3. Microsoft Edge\\n
4. Brave\\n
\\n
Enter 1, 2, 3 or 4 > " browser
echo
done
if [ $browser -eq 2 ]
then
FLATPAKS="$FLATPAKS $CHROME"
elif [ $browser -eq 3 ]
then
FLATPAKS="$FLATPAKS $EDGE"
elif [ $browser -eq 4 ]
then
FLATPAKS="$FLATPAKS $BRAVE"
else
FLATPAKS="$FLATPAKS $FIREFOX"
fi
sudo apt-get update
sudo apt-get -y purge "firefox*" "libreoffice*" "gimp*" "vlc*"
sudo apt-get -y autoremove
sudo apt-get -y full-upgrade
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections
sudo snap remove --purge --terminate firefox
sudo apt-get -y install $APT_PKGS
yes | sudo apt-mark minimize-manual
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo flatpak -y install $FLATPAKS