Last active
July 12, 2023 06:02
-
-
Save jvarn/e82c58a020ef9645ce5491466fd19e54 to your computer and use it in GitHub Desktop.
Ubuntu post-install script (installs my usual packages and apps)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update && sudo apt upgrade -y | |
### APT | |
function install_apt_packages { | |
apt_packages="" | |
read -e -p "Install Gnome Tweaks? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}gnome-tweaks " | |
read -e -p "Install Net Tools? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}net-tools " | |
read -e -p "Install Open SSH Server? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}openssh-server " | |
read -e -p "Install GIT? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}git " | |
read -e -p "Install Composer? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}composer " | |
read -e -p "Install Curl? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}curl " | |
read -e -p "Install Network Manager (nmcli)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}network-manager " | |
read -e -p "Install Dconf Editor? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}dconf-editor " | |
read -e -p "Install Curtail? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}curtail " | |
read -e -p "Install Dialect? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}dialect " | |
read -e -p "Install Health? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}health " | |
read -e -p "Install Newsflash? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}newsflash " | |
read -e -p "Install Podcasts? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}podcasts " | |
read -e -p "Install Shortwave? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}shortwave " | |
read -e -p "Install Solanum? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}solanum " | |
read -e -p "Install Cockpit? (n) " choice | |
[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages}cockpit cockpit-machines cockpit-networkmanager" | |
#read -e -p "Install ? (n) " choice | |
#[[ "$choice" == [Yy]* ]] && apt_packages="${apt_packages} " | |
sudo apt install ${apt_packages} -y | |
} | |
install_apt_packages | |
### LIBREWOLF | |
function install_librewolf_package { | |
echo "Keypass doesn't work with Flatpak version of Librewolf." | |
echo "Installing deb version." | |
sudo apt install -y wget gnupg lsb-release apt-transport-https ca-certificates | |
distro=$(if echo " una bookworm vanessa focal jammy bullseye vera uma " | grep -q " $(lsb_release -sc) "; then echo $(lsb_release -sc); else echo focal; fi) | |
wget -O- https://deb.librewolf.net/keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/librewolf.gpg | |
sudo tee /etc/apt/sources.list.d/librewolf.sources << EOF > /dev/null | |
Types: deb | |
URIs: https://deb.librewolf.net | |
Suites: $distro | |
Components: main | |
Architectures: amd64 | |
Signed-By: /usr/share/keyrings/librewolf.gpg | |
EOF | |
sudo apt install librewolf -y | |
mkdir ~/.librewolf/native-messaging-hosts | |
echo "Install KeepassXC official plugin." | |
echo "Enable browser sync (Firefox) and then set custom native messaging hosts to:" | |
echo "~/.librewolf/native-messaging-hosts/" | |
} | |
### FLATPAK | |
function install_flatpak { | |
sudo apt install flatpak gnome-software-plugin-flatpak -y | |
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
flatpak_packages="" | |
read -e -p "Install KeepassXC? (n) " choicekeepass | |
[[ "$choicekeepass" == [Yy]* ]] && flatpak_packages="${flatpak_packages}org.keepassxc.KeepassXC " | |
read -e -p "Install LibreWolf browser? (n) " choice | |
[[ "$choice" == [Yy]* ]] && [[ "$choicekeepass" == [Yy]* ]] && install_librewolf_package || [[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}io.gitlab.librewolf-community " | |
read -e -p "Install BlueBubbles? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}app.bluebubbles.BlueBubbles " | |
read -e -p "Install Extension Manager? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}com.mattjakeman.ExtensionManager " | |
read -e -p "Install NextCloud Desktop? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}com.nextcloud.desktopclient.nextcloud " | |
read -e -p "Install Proton VPN? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}com.protonvpn.www " | |
read -e -p "Install Blanket (white noise)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}com.rafaelmardojai.Blanket " | |
read -e -p "Install Spotify? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}com.spotify.Client " | |
read -e -p "Install WhatsApp Desktop? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages} io.github.mimbrero.WhatsAppDesktop" | |
read -e -p "Install GitHub Desktop? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}io.github.shiftey.Desktop " | |
read -e -p "Install Boxes (virtual machines)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}org.gnome.Boxes " | |
read -e -p "Install Inkscape (vector graphics)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}org.inkscape.Inkscape " | |
read -e -p "Install LibreOffice? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}org.libreoffice.LibreOffice " | |
read -e -p "Install Remmina (Remote Desktop Client)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}org.remmina.Remmina " | |
read -e -p "Install VideoLanClient (VLC)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}org.videolan.VLC " | |
read -e -p "Install Plex Desktop? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}tv.plex.PlexDesktop " | |
read -e -p "Install Transmission bittorrent app? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}com.transmissionbt.Transmission " | |
read -e -p "Install Transmission bittorrent remote? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}io.freetubeapp.FreeTube org.equeim.Tremotesf " | |
read -e -p "Install Bavarder (AI)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}io.github.Bavarder.Bavarder " | |
read -e -p "Install Upscaler (AI)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}io.gitlab.theevilskeleton.Upscaler " | |
read -e -p "Install Imaginer (AI)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}page.codeberg.Imaginer.Imaginer " | |
read -e -p "Install Footage (video converter and trimmer)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}io.gitlab.adhami3310.Footage " | |
read -e -p "Install TubeFeeder (YouTube and PeerTube subscription)? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}de.schmidhuberj.tubefeeder " | |
read -e -p "Install Decoder? (n) " choice | |
[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages}com.belmoussaoui.Decoder " | |
#read -e -p "Install ? (n) " choice | |
#[[ "$choice" == [Yy]* ]] && flatpak_packages="${flatpak_packages} " | |
flatpak install ${flatpak_packages} | |
} | |
read -e -p "Install Flatpak? (n) " choice | |
[[ "$choice" == [Yy]* ]] && install_flatpak || echo "Not installing Flatpak" | |
### SNAP | |
read -e -p "Remove Firefox Snap? " choice | |
[[ "$choice" == [Yy]* ]] && sudo snap remove firefox || echo "Not removing Firefox Snap" | |
sudo snap refresh | |
### RADEON | |
# https://www.amd.com/en/support/linux-drivers | |
function install_radeon_drivers { | |
wget http://repo.radeon.com/amdgpu-install/23.10.2/ubuntu/jammy/amdgpu-install_5.5.50502-1_all.deb | |
sudo dpkg -i amdgpu-install_5.5.50502-1_all.deb | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install mesa-utils -y | |
## Testing: | |
# sudo lshw -c video | |
# sudo dmesg | grep -i amdgpu | |
# lsmod | grep | amd | |
# glxinfo -B | |
} | |
read -e -p "Install Radeon drivers (amdgpu)? " choice | |
[[ "$choice" == [Yy]* ]] && install_radeon_drivers || echo "Not installing Radeon drivers" | |
### ZeroTier | |
function install_zerotier { | |
sudo snap install zerotier # curl -s https://install.zerotier.com | bash | |
read -e -p "Please enter network ID " networkid | |
[[ "$networkid" == "" ]] && "No network ID specified" && exit 1 | |
sudo snap run zerotier join "$networkid" # zerotier-cli join "$networkid" | |
echo "Now you need to authenticate the device in Zerotier settings." | |
read -p "Press any key to open browser." | |
xdg-open "https://my.zerotier.com/network/$networkid" | |
} | |
read -e -p "Install Zerotier? " choice | |
[[ "$choice" == [Yy]* ]] && install_zerotier || echo "Not installing Zerotier" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment