Instantly share code, notes, and snippets.

@scottsweb / Secret
Last active Apr 4, 2017

What would you like to do?
setup Ubuntu with all the trimmings
# Settings
echo "Linux Setup Script"
read -p "Press any key to continue... " -n1 -s
echo -e "\n\n"
if (( $EUID != 0 )); then
echo "Please run as root"
# Common tools
# Allows add-apt-repository (elementary only)
# apt-get install software-properies-common
# Show fancy progress bars with apt
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
# Make sure we have curl
apt-get install -y -qq curl
# Add third party repos
echo Add Third Party Repos
echo -e "------------------------------\n"
add-apt-repository -y ppa:nilarimogard/webupd8 > /dev/null 2>&1 # Albert / Gloobus
add-apt-repository -y ppa:webupd8team/atom > /dev/null 2>&1 # Atom
add-apt-repository -y ppa:embrosyn/cinnamon > /dev/null 2>&1 # Cinnamon
# apt-add-repository -y ppa:hsoft/ppa > /dev/null 2>&1 # dupeGuru
# add-apt-repository -y ppa:alexlarsson/flatpak > /dev/null 2>&1 # Flatpak
# add-apt-repository -y ppa:moka/daily > /dev/null 2>&1 # Moka Icon Theme - issue with this repo
add-apt-repository ppa:peek-developers/stable > /dev/null 2>&1 # Peek
add-apt-repository -y ppa:ricotz/docky > /dev/null 2>&1 # Plank
add-apt-repository -y ppa:nathan-renniewaldock/flux > /dev/null 2>&1 # F.lux
# add-apt-repository -y ppa:rolfbensch/sane-git > /dev/null 2>&1 # Sane / xsane for Scanner
# add-apt-repository -y ppa:libretro/stable > /dev/null 2>&1 # RetroArch
# Heroku
curl -L -sS | apt-key add -
echo "deb ./" | tee /etc/apt/sources.list.d/heroku.list
# Neofetch
curl -L -sS "" -o Release-neofetch.key && sudo apt-key add Release-neofetch.key && rm Release-neofetch.key
echo "deb jessie main" | tee /etc/apt/sources.list.d/neofetch.list
# Syncthing
# curl -L -sS | apt-key add -
# echo "deb syncthing release" | tee /etc/apt/sources.list.d/syncthing.list
# Resilio Sync
curl -L -sS | apt-key add -
echo "deb resilio-sync non-free" | tee /etc/apt/sources.list.d/resilio-sync.list
# Update all the things
echo -e "\n"
echo "Update & Upgrade"
echo -e "------------------------------\n"
apt-get update
apt-get upgrade -y -qq
# Install Icons & Themes
echo -e "\n"
echo Install Icons & Themes
echo -e "------------------------------\n"
# echo Arc Theme
# apt-get install -y -qq arc-theme - needs to be installed from source to work with cinnamon
# echo Moka Icon Theme
# apt-get install moka-icon-theme
# Install Apps
echo -e "\n"
echo Install Apps
echo -e "------------------------------\n"
#echo Albert
#apt-get install -y -qq albert # Albert
echo Arduino
apt-get install -y -qq arduino # Arduino
echo Atom
apt-get install -y -qq atom # Atom
echo Blueberry
apt-get install -y -qq blueberry # Blueberry (bluetooth for ciannmon)
echo Caffeine
apt-get install -y -qq caffeine # Caffeine
echo Cinnamon
apt-get install -y -qq cinnamon # Cinnamon desktop
echo Conky
apt-get install -y -qq conky # Conky
echo Corebird
apt-get install -y -qq corebird # Corebird
echo Dconf
apt install -y -qq dconf-editor # Dconf editor (edit settings)
# echo Docker
# apt-get install -y -qq # Docker - need to be installed manually for latest version and tools
# echo Docker Compose
# apt-get install -y -qq docker-compose # Docker Compose
echo Dropbox
apt-get install -y -qq dropbox # Dropbox
# echo dupeGuru
# apt-get install -y -qq dupeguru-se # dupeGuru
echo Firefox
apt-get install -y -qq firefox # Firefox
echo F.lux
apt-get install -y -qq fluxgui # F.lux
# echo Flatpak
# apt-get install -y -qq flatpak # Flatpak
# echo Gnome Sushi
# sudo apt-get install gnome-sushi # Gnome Sushi (quick look)
echo Gitg
apt-get install -y -qq gitg # Gitg
echo Gloobus
apt-get install -y -qq gloobus-preview gloobus-sushi unoconv gnumeric # Gloobus (quick look)
# echo Gnome Boxes
# apt-get install -y -qq gnome-boxes # Gnome Boxes
# echo Gnome MPV
# apt-get install -y -qq gnome-mpv
echo Handbrake
apt-get install -y -qq handbrake # Handbrake
echo Project Hamster
apt-get install -y -qq hamster-applet hamster-indicator # Project Hamster
echo Hedgewars
apt-get install -y -qq hedgewars # Hedgewars
echo LibreOffice
apt-get install -y -qq libreoffice # LibreOffice
echo Neofetch
apt-get install -y -qq neofetch # Neofetch
# echo MusicBrainz Picard
# apt-get install -y -qq picard # MusicBrainz Picard
echo Poedit
apt-get install -y -qq poedit # Poedit
echo Plank
apt-get install -y -qq plank # Plank
echo OpenVPN Manager
apt-get install -y -qq network-manager-openvpn-gnome # OpenVPN tools
echo Smuxi
apt-get install -y -qq smuxi # Smuxi
echo PlayOnLinux / Wine
# Related links
# apt-get install -y -qq wine-stable # Wine
# apt-get install -y -qq playonlinux # Play On Linux (Wine UI)
# apt-get install -y -qq libp11-kit-gnome-keyring:i386 # Required for Photoshop
echo Resilio Sync
apt-get install -y -qq resilio-sync # Resilio Sync
echo Rhythmbox
apt-get install -y -qq rhythmbox # Rhythmbox
# echo RetroArch
# apt-get install retroarch retroarch-* libretro-* # RetroArch
echo Screenfetch
apt-get install -y -qq screenfetch # Screenfetch
# echo Speedcrunch
# apt-get install -y -qq speedcrunch # Speedcrunch
# echo Syncthing
# apt-get install -y -qq syncthing # Syncthing
echo Steam
apt-get install -y -qq steam # Steam
echo Transmission
apt-get install -y -qq transmission # Transmission
apt-get install -y -qq virtualbox # VirtualBox
# apt-get install -y -qq virt-manager
# echo VLC
# apt-get install -y -qq vlc # VLC
# echo Zeal
# apt-get install -y -qq zeal # Zeal
# adbLink (broken)
# echo -e "\n"
# echo adbLink is about to be downloaded and installed to your home directory
# curl -O -J -L --progress-bar && unzip && rm
# Cerebro
echo -e "\n"
echo Installing Cerebro (testing)
echo -e "------------------------------\n"
curl -O --progress-bar && chmod +x cerebro-0.2.6-x86_64.AppImage
mkdir /opt/cerebro/ && mv cerebro-0.2.6-x86_64.AppImage /opt/cerebro/
# Color Oracle
# echo -e "\n"
# echo Color Oracle is about to be downloaded. Install manually.
# curl -O --progress-bar && unzip && rm
# Chrome
echo -e "\n"
echo Installing Chrome Beta
echo -e "------------------------------\n"
curl -O --progress-bar && apt install ./google-chrome-beta_current_amd64.deb -y -qq && rm google-chrome-beta_current_amd64.deb
# DBeaver
# echo -e "\n"
# echo Installing DBeaver (not required)
# echo -e "------------------------------\n"
# curl -o --progress-bar dbeaver.deb && apt install ./dbeaver.deb -y && rm dbeaver.deb
# Etcher / USB Image formatter (built in on Mint)
echo -e "\n"
echo Installing Etcher
echo -e "------------------------------\n"
curl -O --progress-bar && unzip && rm && chmod +x Etcher-1.0.0-beta.18-linux-x64.AppImage
mkdir /opt/etcher/ && mv Etcher-1.0.0-beta.18-linux-x64.AppImage /opt/etcher/
# Fritzing
# echo -e "\n"
# echo Installing Fritzing
# echo -e "------------------------------\n"
# curl -O -J -L --progress-bar && tar -xjf fritzing-0.9.3b.linux.AMD64.tar.bz2 && rm fritzing-0.9.3b.linux.AMD64.tar.bz2
# Google Music Manager
echo -e "\n"
echo Instaling Google Music Manager
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./google-musicmanager-beta_current_amd64.deb -y -qq && rm google-musicmanager-beta_current_amd64.deb
# Google Web Designer
echo -e "\n"
echo Instaling Google Web Designer
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./google-webdesigner_current_amd64.deb -y -qq && rm google-webdesigner_current_amd64.deb
# Gnome Games
# flatpak remote-add --from gnome-nightly
# flatpak install gnome-games-nightly.flatpakref
# Harmony
echo -e "\n"
echo Installing Harmony
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./harmony-0.4.4-amd64.deb -y -qq && rm harmony-0.4.4-amd64.deb
# HyperTerm
# echo -e "\n"
# echo Installing HyperTerm
# echo -e "------------------------------\n"
# curl -O -J -L --progress-bar && apt install ./hyper-1.0.1.deb -y -qq && rm hyper-1.0.1.deb
# Peek
echo -e "\n"
echo Intalling Peek
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./peek-0.8.0-Linux.deb -y -qq && rm peek-0.8.0-Linux.deb
# Processing
# echo -e "\n"
# echo Intalling Processing
# echo -e "------------------------------\n"
# curl -O -J -L --progress-bar && tar -zxf processing-3.2.3-linux64.tgz && rm processing-3.2.3-linux64.tgz
# Scanner
# apt-get install sane sane-utils libsane-extras
# Simplenote
echo -e "\n"
echo Installing Simplenote
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./simplenote-1.0.7.deb -y -qq && rm simplenote-1.0.7.deb
# Slack
echo -e "\n"
echo Installing Slack
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./slack-desktop-2.3.4-amd64.deb -y -qq && rm slack-desktop-2.3.4-amd64.deb
# Stacer
echo -e "\n"
echo Installing Stacer
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./Stacer_1.0.3_amd64.deb -y -qq && rm Stacer_1.0.3_amd64.deb
# Temps (testing)
# echo -e "\n"
# echo Installing Temps
# echo -e "------------------------------\n"
# curl -O -J -L --progress-bar && unzip && rm
# WordPress
echo -e "\n"
echo Installing WordPress
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./wordpress-com-2-1-0.deb -y -qq && rm wordpress-com-2-1-0.deb
# Zazu
echo -e "\n"
echo Installing Zazu
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./zazu_0.4.0_amd64.deb -y -qq && rm zazu_0.4.0_amd64.deb
# Zoom
echo -e "\n"
echo Installing Zoom
echo -e "------------------------------\n"
curl -O -J -L --progress-bar && apt install ./zoom_amd64.deb -y -qq && rm zoom_amd64.deb
echo -e "\n"
echo Remove Apps
echo -e "------------------------------\n"
echo Geary
apt-get remove -y -qq geary # Geary
echo Hexchat
apt-get remove -y -qq hexchat # Hexchat
echo Pidgin
apt-get remove -y -qq pidgin # Pidgin
# Development
echo -e "\n"
echo Installing Tools
echo -e "------------------------------\n"
apt-get install -y -qq autossh
apt-get install -y -qq build-essential
apt-get install -y -qq composer
apt-get install -y -qq exfat-fuse exfat-utils
apt-get install -y -qq git
apt-get install -y -qq httpie
apt-get install -y -qq jq
apt-get install -y -qq libvirt-clients
apt-get install -y -qq mysql-client
apt-get install -y -qq nano
apt-get install -y -qq python-pip
apt-get install -y -qq php7.0-cli
apt-get install -y -qq php7.0-curl
apt-get install -y -qq php7.0-fpm
apt-get install -y -qq php7.0-mbstring
apt-get install -y -qq php7.0-mcrypt
apt-get install -y -qq php7.0-mysql
apt-get install -y -qq php7.0-sqlite3
apt-get install -y -qq php7.0-xml
apt-get install -y -qq php7.0-zip
apt-get install -y -qq subversion
apt-get install -y -qq ssh-askpass
apt-get install -y -qq ssh-askpass-gnome
apt-get install -y -qq sshfs
apt-get install -y -qq wget
echo Python
pip install howdoi
pip install twisted # ncidmon
pip install notify # ncidmon
pip install flake8 # ncidmon
pip install watchdog # sortphotos
git+ # sortphotos
# Node Development Tools
echo Installing Node (using NVM) and Node Modules
curl -sL --progress-bar | bash
source ~/.profile
nvm install 6.9.5
npm install -g --quiet create-react-app
npm install -g --quiet gulp
npm install -g --quiet particle-cli
npm install -g --quiet vue-cli
# Atom Packages
echo Installing Atom Packages
apm install arduino-upload
apm install atom-material-ui
apm install atom-react-native-autocomplete
apm install autocomplete-wordpress-hooks
apm install color-picker
apm install docblockr
apm install editorconfig
apm install file-icons
apm install git-control
apm install git-projects
apm install language-arduino
apm install language-vue
apm install linter
apm install linter-eslint
apm install linter-phpcs
apm install minimap
apm install multi-cursor
apm install pigments
apm install react
apm install split-diff
# apm install terminal-plus
apm install tool-bar
apm install tool-bar-main
apm install wordpress-api
apm install wp-phptidy
echo Installing WP-CLI
curl -O -J -L --progress-bar
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wp
# Valet
echo Valet
apt-get install -y -qq libnss3-tools jq xsel
# Add ~/.config/composer/vendor/bin to my path in .bash_aliases
composer global require cpriego/valet-linux
valet install
valet park ~/Sites
echo PHPCS
# Add git checkout of
composer global require "squizlabs/php_codesniffer=*"
phpcs --config-set installed_paths ~/Sites/wpcs/
# Add full path to Atom: /home/scott/.config/composer/vendor/bin/phpcs
echo Terminal Colour Scheme
# wget -O xt && chmod +x xt && ./xt && rm xt # Tomorrow Night Terminal
wget -O xt && chmod +x xt && ./xt && rm xt # One Dark
echo -e "\n"
echo Setup Sync
echo -e "------------------------------\n"
# custom options - like alfred, atom, terminal colours, dot scripts, custom icons
# needs to be worked on
echo -e "\n"
echo Fix Mouse
echo -e "------------------------------\n"
apt-get remove xserver-xorg-input-synaptics xserver-xorg-input-evdev
apt-get install xserver-xorg-input-libinput libinput-tools
# Setup gestures
apt-get install xdotool wmctrl
gpasswd -a $USER input # Will need a reboot to work
git clone
cd libinput-gestures
sudo ./libinput-gestures-setup install
# libinput-gestures-setup start
# libinput-gestures-setup autostart
echo -e "\n"
echo Settings
echo -e "------------------------------\n"
# Probably should be run as user
gsettings set org.gnome.gnome-screenshot auto-save-directory "file:///home/scott/" # Change screenshot directory
gsettings set org.gnome.desktop.background show-desktop-icons false # Fix duplicate desktop icons in Cinnamon
echo -e "\n"
echo Clean Up
echo -e "------------------------------\n"
apt autoremove -y -qq
apt autoclean -y -qq
echo -e "\n"
echo Manual Tasks
echo -e "------------------------------\n"
echo - Install adbLink from
echo - Install Windows 10 VM
echo - Install Creative Suite on Windows 10
echo - Enable Firewall - gufw
echo - Install ARC dekstop theme from source
echo - Install Docker and Docker compose
echo -e "\n------------------------------\n"
echo "All done! Phew!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment