Skip to content

Instantly share code, notes, and snippets.

@scottsweb
Last active October 25, 2023 13:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottsweb/91eb7f3f1701bd497335470d13def90c to your computer and use it in GitHub Desktop.
Save scottsweb/91eb7f3f1701bd497335470d13def90c to your computer and use it in GitHub Desktop.
setup Ubuntu with all the trimmings
#!/bin/bash
# Settings
USER=scott
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"
exit
fi
# https://gist.github.com/Ferdev/81d49b69fc248ab098077a39d508e9ff
# https://espanso.org/
# https://puri.sm/posts/hand-drawn-2d-animation-with-pureos-and-librem-laptops/
# https://github.com/Diolinux/PhotoGIMP
# font manager / font base?
# https://github.com/safing/portmaster
# https://www.pinta-project.com/
# https://krita.org/
# Drawing
# ulauncher
# scrcpy
# https://usebottles.com/
# Raspberry Pi imager
# https://flathub.org/apps/details/com.github.neithern.g4music (needs jellyfin support)
# https://flathub.org/apps/com.raggesilver.BlackBox
# https://www.zrythm.org/en/index.html
# https://github.com/SeaDve/Kooha
# https://podman-desktop.io/
# https://github.com/polybar/polybar
# Junction
# Decoder
# UltiMaker Cura (3d printer)
# Processing
# Webfont kit generator
# Metronome
# MQTT X
# App Icon Preview
# Pika backup
# Deja Dup Backups
# Zeal
# VLC
# Handbrake
# Arduino
# LibreOffice
# Hedgewars
# Gnome Boxes
# Fritzing
# https://github.com/cerebroapp/cerebro
# https://hyper.is/
# Video Trimmer
# MusicBrainz Picard
# dupeGuru
# Show fancy progress bars with apt
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
# Add third party repos
echo Add Third Party Repos
echo -e "------------------------------\n"
# apt-add-repository -y ppa:hsoft/ppa > /dev/null 2>&1 # dupeGuru
# Syncthing
# curl -L -sS https://syncthing.net/release-key.txt | apt-key add -
# echo "deb https://apt.syncthing.net/ syncthing release" | tee /etc/apt/sources.list.d/syncthing.list
# Resilio Sync
curl -L -sS https://linux-packages.resilio.com/resilio-sync/key.asc | apt-key add -
echo "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | tee /etc/apt/sources.list.d/resilio-sync.list
# apt-get install -y -qq syncthing # Syncthing
# Etcher / USB Image formatter (built in on Mint)
echo -e "\n"
echo Installing Etcher
echo -e "------------------------------\n"
curl -O --progress-bar https://resin-production-downloads.s3.amazonaws.com/etcher/1.0.0-beta.18/Etcher-1.0.0-beta.18-linux-x64.zip && unzip Etcher-1.0.0-beta.18-linux-x64.zip && rm Etcher-1.0.0-beta.18-linux-x64.zip && 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/
# Google Web Designer
echo -e "\n"
echo Instaling Google Web Designer
echo -e "------------------------------\n"
curl -O -J -L --progress-bar https://dl.google.com/linux/direct/google-webdesigner_current_amd64.deb && apt install ./google-webdesigner_current_amd64.deb -y -qq && rm google-webdesigner_current_amd64.deb
# Processing
# echo -e "\n"
# echo Intalling Processing
# echo -e "------------------------------\n"
# curl -O -J -L --progress-bar http://download.processing.org/processing-3.2.3-linux64.tgz && tar -zxf processing-3.2.3-linux64.tgz && rm processing-3.2.3-linux64.tgz
# Slack
echo -e "\n"
echo Installing Slack
echo -e "------------------------------\n"
curl -O -J -L --progress-bar https://downloads.slack-edge.com/linux_releases/slack-desktop-2.3.4-amd64.deb && 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 https://github.com/oguzhaninan/Stacer/releases/download/v1.0.3/Stacer_1.0.3_amd64.deb && apt install ./Stacer_1.0.3_amd64.deb -y -qq && rm Stacer_1.0.3_amd64.deb
# Zoom
echo -e "\n"
echo Installing Zoom
echo -e "------------------------------\n"
curl -O -J -L --progress-bar https://zoom.us/client/latest/zoom_amd64.deb && apt install ./zoom_amd64.deb -y -qq && rm zoom_amd64.deb
# 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 watchdog # sortphotos
git+http://github.com/andrewning/sortphotos#egg=sortphotos # sortphotos
# Node Development Tools
echo Installing Node (using NVM) and Node Modules
curl -sL --progress-bar https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | 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
# WP-CLI
echo Installing WP-CLI
curl -O -J -L --progress-bar https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
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
# NEEDS TO BE INSTALLED AS USER NOT ROOT? - http://stackoverflow.com/questions/20504662/how-to-get-home-directory-of-different-user-in-bash-script
# Add ~/.config/composer/vendor/bin to my path in .bash_aliases
composer global require cpriego/valet-linux
composer global require beyondcode/expose
valet install
valet park ~/Sites
echo PHPCS
# Add git checkout of https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards#installation
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 http://git.io/v3DRs && chmod +x xt && ./xt && rm xt # Tomorrow Night Terminal
wget -O xt http://git.io/vs7Ut && chmod +x xt && ./xt && rm xt # One Dark
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 https://github.com/bulletmark/libinput-gestures
apt-get install xdotool wmctrl
gpasswd -a $USER input # Will need a reboot to work
git clone http://github.com/bulletmark/libinput-gestures
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 Manual Tasks
echo -e "------------------------------\n"
echo - Install adbLink from jocala.com
echo "All done! Phew!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment