-
-
Save countbuggula/e1007e3bf3ddacc385fd4b130a8cfbc8 to your computer and use it in GitHub Desktop.
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 | |
set -o pipefail | |
set -s | |
##### | |
# This script will take a fresh Mint install and make it suitable for getting stuff done. | |
# It may not work against another Ubuntu Installation type. | |
# Run it with: bash <(wget -qO- https://gist.githubusercontent.com/countbuggula/e1007e3bf3ddacc385fd4b130a8cfbc8/raw/2d4f4ec7586704d6ca4a262200920e2dbd422549/setup-mint.bash) | |
##### | |
trap exit SIGINT SIGTERM | |
##### remove sudo reauthentication timeout | |
sudo sed -i.bak -e '$a\' -e 'Defaults timestamp_timeout=-1' -e '/Defaults timestamp_timeout=.*/d' /etc/sudoers | |
##### set better ssh defaults | |
sudo sed -i.bak -e '$a\' -e 'StrictHostKeyChecking=no' -e '/StrictHostKeyChecking=.*/d' /etc/ssh/ssh_config | |
sudo sed -i.bak -e '$a\' -e 'UserKnownHostsFile=\/dev\/null' -e '/UserKnownHostsFile=.*/d' /etc/ssh/ssh_config | |
sudo sed -i.bak -e '$a\' -e 'GlobalKnownHostsFile=\/dev\/null' -e '/GlobalKnownHostsFile=.*/d' /etc/ssh/ssh_config | |
sudo sed -i.bak -e '$a\' -e 'Compression=yes' -e '/Compression=.*/d' /etc/ssh/ssh_config | |
sudo sed -i.bak -e '$a\' -e 'CompressionLevel=1' -e '/CompressionLevel=.*/d' /etc/ssh/ssh_config | |
##### remove unwanted apps | |
sudo apt-get -y purge \ | |
hexchat \ | |
libreoffice-core \ | |
libreoffice-common \ | |
transmission-common \ | |
rhythmbox \ | |
xreader \ | |
xreader-common \ | |
xviewer-plugins \ | |
vlc \ | |
# prepare for upgrade | |
sudo apt-get update | |
sudo apt-get -y install gconf-defaults-service | |
# add base repositories | |
sudo rm -f /etc/apt/sources.list.d/official-package-repositories.list | |
sudo tee /etc/apt/sources.list.d/official-package-repositories.list << EOF | |
deb http://mirrors.evowise.com/linuxmint/packages sylvia main upstream import backport | |
deb http://mirrordenver.fdcservers.net/ubuntu artful main restricted universe multiverse | |
deb http://mirrordenver.fdcservers.net/ubuntu artful-updates main restricted universe multiverse | |
deb http://mirrordenver.fdcservers.net/ubuntu artful-backports main restricted universe multiverse | |
deb http://security.ubuntu.com/ubuntu/ artful-security main restricted universe multiverse | |
deb http://archive.canonical.com/ubuntu/ artful partner | |
EOF | |
##### update to artful | |
sudo apt-get update | |
sudo aptitude -y safe-upgrade | |
sudo aptitude -y full-upgrade | |
##### add extra repos | |
sudo add-apt-repository -y ppa:libreoffice/ppa # latest version | |
sudo add-apt-repository -y ppa:ubuntu-mozilla-security/ppa # latest firefox | |
sudo add-apt-repository -y ppa:paulo-miguel-dias/pkppa # latest stable mesa graphics | |
sudo add-apt-repository -y ppa:webupd8team/java # oracle java | |
sudo add-apt-repository -y ppa:me-davidsansome/clementine | |
sudo add-apt-repository -y ppa:webupd8team/atom | |
sudo add-apt-repository -y ppa:webupd8team/nemo | |
sudo add-apt-repository -y ppa:mscore-ubuntu/mscore-stable | |
sudo add-apt-repository -y ppa:musicbrainz-developers/stable | |
sudo add-apt-repository -y ppa:openshot.developers/ppa | |
# google chrome | |
sudo tee /etc/apt/sources.list.d/google-chrome.list <<< "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | |
wget -qO- https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
# misc apps and games | |
sudo tee /etc/apt/sources.list.d/getdeb.list <<< "deb http://mirrors.dotsrc.org/getdeb/ubuntu xenial-getdeb apps games" | |
wget -qO- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - | |
# signal | |
wget -qO- https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add - | |
sudo tee /etc/apt/sources.list.d/signal-xenial.list <<< "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | |
# automated installation | |
sudo debconf-set-selections <<< 'oracle-java9-installer shared/accepted-oracle-license-v1-1 select true' | |
sudo debconf-set-selections <<< 'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true' | |
##### upgrade system | |
sudo apt-get update | |
sudo apt-get -y dist-upgrade | |
##### install useful apps | |
sudo apt-get install \ | |
adobe-flashplugin \ | |
aptitude \ | |
aria2 \ | |
atom\ | |
atop \ | |
audacity \ | |
autossh \ | |
build-essential \ | |
calibre \ | |
cabextract \ | |
chromium-codecs-ffmpeg-extra \ | |
clementine \ | |
davfs2 \ | |
dos2unix \ | |
exfat-utils \ | |
ffmpeg \ | |
filezilla \ | |
flatpak \ | |
gdebi \ | |
git-core \ | |
gnucash \ | |
gparted \ | |
gvfs \ | |
gvfs-bin \ | |
google-chrome-stable \ | |
handbrake \ | |
hunspell-en-us \ | |
htop \ | |
inkscape \ | |
iotop \ | |
libavcodec-extra \ | |
libhal1-flash \ | |
libmspack0 \ | |
libreoffice-core \ | |
libreoffice-common \ | |
libreoffice-base \ | |
libreoffice-base-core \ | |
libreoffice-base-drivers \ | |
libreoffice-calc \ | |
libreoffice-gnome \ | |
libreoffice-gtk3 \ | |
libreoffice-help-en-us \ | |
libreoffice-impress \ | |
libreoffice-math \ | |
libreoffice-pdfimport \ | |
libreoffice-writer \ | |
lsb \ | |
lxc2 \ | |
mtr \ | |
mumble \ | |
musescore \ | |
nemo-audio-tab \ | |
nemo-compare \ | |
nemo-emblems \ | |
nemo-filename-repairer \ | |
nemo-image-converter \ | |
nemo-media-columns \ | |
nemo-pastebin \ | |
nemo-rabbitvcs \ | |
nemo-share \ | |
network-manager-openvpn \ | |
network-manager-vpnc \ | |
nload \ | |
nmap \ | |
openshot \ | |
oracle-java9-installer \ | |
oracle-java9-set-default \ | |
oxideqt-codecs-extra \ | |
oxygen-cursor-theme-extra \ | |
p7zip-rar \ | |
pavucontrol \ | |
picard \ | |
pidgin-extprefs \ | |
pidgin-libnotify \ | |
pidgin-plugin-pack \ | |
pinta \ | |
playonlinux \ | |
powertop \ | |
pv \ | |
pycharm \ | |
pylint \ | |
pylint3 \ | |
python3-hunspell \ | |
qbittorrent \ | |
remmina \ | |
remmina-plugin-{nx,rdp,vnc} \ | |
scribus \ | |
shellcheck \ | |
shutter \ | |
signal-desktop \ | |
speedcrunch \ | |
sshfs \ | |
sshpass \ | |
steam \ | |
tlp \ | |
tlp-rdw \ | |
udftools \ | |
umbrello \ | |
unrar \ | |
unshield \ | |
spectacle \ | |
vlc \ | |
xscreensaver-data-extra \ | |
zfsutils-linux \ | |
# $(# detect platform and install kernel+modules | |
# if systemd-detect-virt --vm | grep -i vmware >/dev/null ; then | |
# echo linux-{cloud-tools,headers,image,tools}-virtual-hwe-16.04-edge open-vm-tools-desktop | |
# elif systemd-detect-virt --vm | grep -i oracle >/dev/null ; then | |
# echo linux-{cloud-tools,headers,image,tools}-virtual-hwe-16.04-edge virtualbox-guest-{x11,utils,dkms} | |
# elif systemd-detect-virt --vm | grep -iP 'kvm|qemu' >/dev/null ; then | |
# echo linux-{cloud-tools,headers,image,tools}-virtual-hwe-16.04-edge qemu-guest-agent | |
# elif systemd-detect-virt --vm --quiet ; then | |
# echo linux-{cloud-tools,headers,image,tools}-virtual-hwe-16.04-edge | |
# elif grep -i intel /proc/cpuinfo >/dev/null ; then | |
# echo linux-{cloud-tools,headers,image,tools}-generic-hwe-16.04-edge intel-microcode | |
# elif grep -i amd /proc/cpuinfo >/dev/null ; then | |
# echo linux-{cloud-tools,headers,image,tools}-generic-hwe-16.04-edge amd64-microcode | |
# else | |
# echo linux-{cloud-tools,headers,image,tools}-generic-hwe-16.04-edge | |
# fi) | |
#sudo apt-get -fyo Dpkg::Options::="--force-overwrite" install | |
sudo apt-get -y dist-upgrade | |
##### add some packages that have no readily available repositories | |
sudo mkdir -vp /tmp/extra-debs | |
cd /tmp/extra-debs | |
sudo wget "https://go.microsoft.com/fwlink/?LinkID=760868" -O vs-code-amd64.deb | |
sudo wget -c \ | |
https://go.skype.com/skypeforlinux-64.deb \ | |
http://dbeaver.jkiss.org/files/dbeaver-ce_latest_amd64.deb \ | |
https://downloads.slack-edge.com/linux_releases/slack-desktop-2.8.2-amd64.deb \ | |
https://github.com/magkopian/keepassxc-debian/releases/download/2.2.2-1/keepassxc_2.2.2-1_amd64_16.04_xenial.deb \ | |
# install them and fix their broken dependencies | |
sudo gdebi *.deb | |
sudo rm -v *.deb | |
sudo apt -y autoremove | |
sudo apt -y autoclean | |
sudo apt -y clean | |
##### fix umbrello shortcut | |
sudo ln -sv /usr/bin/umbrello5 /usr/bin/umbrello || true | |
mkdir -vp ~/.local/share/applications | |
# add the official adobe flash plugin for firefox | |
# sudo wget https://fpdownload.macromedia.com/pub/labs/flashruntimes/flashplayer/linux64/libflashplayer.so -O /usr/lib/mozilla/plugins/flashplugin-alternative.so | |
# add the official pepper flash player for chromium | |
# sudo mkdir -vp /usr/lib/adobe-flashplugin | |
# wget -O- https://fpdownload.macromedia.com/pub/labs/flashruntimes/flashplayer/linux64/flash_player_ppapi_linux.x86_64.tar.gz | sudo tar -xzvC /usr/lib/adobe-flashplugin/ libpepflashplayer.so | |
# add official android fastboot and adb | |
sudo wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip -O /tmp/android-platform-tools.zip | |
sudo unzip -q /tmp/android-platform-tools.zip -d /opt/android/ | |
sudo find /opt/android -mindepth 2 -maxdepth 2 -executable -type f -exec ln -sv {} /usr/bin/ \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment