Skip to content

Instantly share code, notes, and snippets.

@thelegendofbrian
Last active August 8, 2017 09:02
Show Gist options
  • Save thelegendofbrian/f4847a69aa4a245ea603fa348bf03744 to your computer and use it in GitHub Desktop.
Save thelegendofbrian/f4847a69aa4a245ea603fa348bf03744 to your computer and use it in GitHub Desktop.
Prepare Ubuntu Budgie 17.04 the way I like
#!/bin/bash
# Check if running as root
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Download other files needed for setting up later
wget -O install-custom-icon-theme.sh https://gist.github.com/thelegendofbrian/bd4703849198f6b59fb68d961fd4d759/raw/f69c335d468af970b0a26a7eabe9c7cf34b484d7/install-custom-icon-theme.sh
wget -O prepare-budgie_no-sudo.sh https://gist.github.com/thelegendofbrian/51c957230a6d8f282bf3d9feb47b71a4/raw/8c81538573ac46d1ead8924553d35d50af7d66e9/
chmod 755 install-custom-icon-theme.sh prepare-budgie_no-sudo.sh
# Add ppa's
add-apt-repository -y ppa:webupd8team/java
add-apt-repository -y ppa:linuxgndu/sqlitebrowser
# Update
apt-get update
apt-get -y upgrade
# Try to bypass the Java 8 License Agreement
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
# Install
apt install -y gnome-tweak-tool wine-stable shutter oracle-java8-installer git ant maven filezilla sqlitebrowser mysql-workbench gimp screen
# Prevent the [Gtk-Message: Failed to load module "canberra-gtk-module"] error
apt-get -y install libcanberra-gtk*
# Make sure Java 8 is the default JDK
apt-get -y install oracle-java8-set-default
# Remove the dock
apt-get -y remove plank
rm /etc/xdg/autostart/budgie-plank.desktop
# Remove GNOME games
apt-get -y remove gnome-mines gnome-mahjongg gnome-sudoku
# Remove other unneeded software
apt-get -y remove aisleriot chromium-browser chromium-browser-l10n geary libreoffice-* xterm
# Remove extra desktop directories
rm /usr/share/desktop-directories/ActionGames.directory /usr/share/desktop-directories/BoardGames.directory /usr/share/desktop-directories/LogicGames.directory /usr/share/desktop-directories/AdventureGames.directory /usr/share/desktop-directories/CardGames.directory /usr/share/desktop-directories/GnomeScience.directory /usr/share/desktop-directories/ArcadeGames.directory /usr/share/desktop-directories/SimulationGames.directory /usr/share/desktop-directories/SportsGames.directory /usr/share/desktop-directories/BlocksGames.directory /usr/share/desktop-directories/Education.directory /usr/share/desktop-directories/KidsGames.directory /usr/share/desktop-directories/RolePlayingGames.directory /usr/share/desktop-directories/StrategyGames.directory
# Install custom icon theme
./install-custom-icon-theme.sh
# Change GTK themes - MUST BE RUN WITHOUT SUDO IN DIFFERENT SCRIPT
# gsettings set org.gnome.desktop.interface gtk-theme "Arc-Dark"
# gsettings set org.gnome.desktop.interface icon-theme "User-Defined"
###################
# Configure panel
# Set screen lock delay to 1 hour
# Settings > Displays > Night Light
###################
# Make temporary download directory and go to it
sudo mkdir /tmp/initial-setup
cd /tmp/initial-setup
# Install Chrome
sudo wget -O chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i chrome.deb
sudo apt-get -y install -f
# Install Discord
sudo wget -O discord-ptb.deb "https://discordapp.com/api/download/ptb?platform=linux&format=deb"
sudo dpkg -i discord-ptb.deb
# Install Eclipse
sudo wget -O eclipse.tar.gz http://mirror.csclub.uwaterloo.ca/eclipse/technology/epp/downloads/release/neon/3/eclipse-java-neon-3-linux-gtk-x86_64.tar.gz
sudo mv eclipse.tar.gz /opt/
cd /opt/
sudo tar xvzf eclipse.tar.gz
sudo rm eclipse.tar.gz
cat << EOF | sudo tee /usr/share/applications/eclipse.desktop
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
EOF
cd /usr/local/bin
sudo ln -s /opt/eclipse/eclipse
cd /tmp/initial-setup
###############
# Install EGit and SonarLint
###############
wget -O atom.deb https://atom.io/download/deb
dpkg -i atom.deb
apt-get -fy install
#####################
# Install JavaFX Scene Builder 2.0
#####################
# Install SonarQube - sonar-scanner
sudo wget -O sonar-scanner.zip https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.0.1.733-linux.zip
sudo mv sonar-scanner.zip /opt/
cd /opt
sudo unzip sonar-scanner.zip
sudo mv sonar-scanner-3.0.1.733-linux sonar-scanner
sudo rm sonar-scanner.zip
cd /usr/local/bin
sudo ln -s /opt/sonar-scanner/bin/sonar-scanner
echo "sonar.host.url=http://minepop.ddns.net:9000/" | sudo tee -a /opt/sonar-scanner/conf/sonar-scanner.properties
cd /tmp/initial-setup
# Install Steam
sudo wget -O steam.deb https://steamcdn-a.akamaihd.net/client/installer/steam.deb
sudo dpkg -i steam.deb
sudo apt-get -fy install
# Initialize some Steam files so we can remove the bad ones
echo "Creating Steam screen"
sudo screen -dmS Steam -L steam-log.txt sudo -u brian /usr/bin/steam
echo "Displaying EULA and reading Steam startup logs"
while !(grep -q "libGL error: failed to load driver: swrast" steam-log.txt)
do
sleep 5
done
echo "Killing Steam screen"
sudo screen -X -S Steam kill
sudo rm steam-log.txt
rm ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
rm ~/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6
# Remove Steam desktop icon
rm ~/Desktop/steam.desktop
# Install Minecraft
sudo mkdir /usr/games/minecraft
cd /usr/games/minecraft
sudo wget -O minecraft.jar http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
sudo unzip -j minecraft.jar "favicon.png"
sudo mv favicon.png icon.png
cat << EOF | sudo tee /usr/share/applications/minecraft.desktop
[Desktop Entry]
Name=Minecraft
Comment=Minecraft by Mojang
Type=Application
Exec=java -jar /usr/games/minecraft/minecraft.jar
Icon=/usr/games/minecraft/icon.png
Categories=Game;
EOF
cd /tmp/initial-setup
# Install FTB Laucher
sudo mkdir /usr/games/ftb_launcher
cd /usr/games/ftb_launcher
sudo wget -O ftb_launcher.jar http://ftb.cursecdn.com/FTB2/launcher/FTB_Launcher.jar
sudo unzip -j ftb_launcher.jar "image/logo_ftb.png"
sudo mv logo_ftb.png icon.png
cat << EOF | sudo tee /usr/share/applications/ftb.desktop
[Desktop Entry]
Name=FTB Launcher
Comment=Feed the Beast Minecraft Launcher
Type=Application
Exec=java -jar /usr/games/ftb_launcher/ftb_launcher.jar
Icon=/usr/games/ftb_launcher/icon.png
Categories=Game;
EOF
cd /tmp/initial-setup
# Install Technic Launcher
sudo mkdir /usr/games/technic_launcher
cd /usr/games/technic_launcher
sudo wget -O technic_launcher.jar http://launcher.technicpack.net/launcher4/349/TechnicLauncher.jar
sudo unzip -j technic_launcher.jar "net/technicpack/launcher/resources/icon.png"
cat << EOF | sudo tee /usr/share/applications/technic.desktop
[Desktop Entry]
Name=Technic Launcher
Comment=Technic Minecraft Launcher
Type=Application
Exec=java -jar /usr/games/technic_launcher/technic_launcher.jar
Icon=/usr/games/technic_launcher/icon.png
Categories=Game;
EOF
cd /tmp/initial-setup
# Install RS3
sudo wget http://launchpadlibrarian.net/161405671/libglew1.10_1.10.0-3_amd64.deb
sudo dpkg -i libglew1.10_1.10.0-3_amd64.deb
sudo wget http://ftp.us.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.50-2+deb8u3_amd64.deb
dpkg -i libpng12-0_1.2.50-2+deb8u3_amd64.deb
sudo -s -- << EOF
wget -O - https://content.runescape.com/downloads/ubuntu/runescape.gpg.key | apt-key add -
mkdir -p /etc/apt/sources.list.d
echo "deb https://content.runescape.com/downloads/ubuntu trusty non-free" > /etc/apt/sources.list.d/runescape.list
apt-get update
apt-get install -y --allow-unauthenticated runescape-launcher
EOF
# Install OSBuddy
sudo wget http://cdn.rsbuddy.com/osbuddy_1.2_all.deb
sudo dpkg -i osbuddy_1.2_all.deb
sudo apt-get -fy install
# Install RSCPlus
sudo mkdir /usr/games/rscplus
cd /usr/games/rscplus
sudo wget https://github.com/OrN/rscplus/releases/download/Latest/rscplus.jar
sudo unzip -j rscplus.jar "assets/icon.png"
chown -R brian /usr/games/rscplus/
cat << EOF | sudo tee /usr/share/applications/rscplus.desktop
[Desktop Entry]
Name=RSC+
Comment=An enhanced RuneScape Classic client
Type=Application
Exec=java -jar /usr/games/rscplus/rscplus.jar
Icon=/usr/games/rscplus/icon.png
Categories=Game;
EOF
cd /tmp/initial-setup
# Install RS Timer
sudo mkdir /usr/games/rs_timer
cd /usr/games/rs_timer
sudo wget -O rs_timer.jar https://github.com/Talkarcabbage/rs-timer/releases/download/v0.14.22/RS-Timer-0.14.22.jar
sudo wget -O icon.png https://www.dropbox.com/s/th13a1fsf5kj4st/Cabbage.png?dl=1
cat << EOF | sudo tee /usr/games/rs_timer/start.sh
#!/bin/bash
mkdir ~/.rstimer
cd ~/.rstimer
java -jar /usr/games/rs_timer/rs_timer.jar
EOF
chmod 755 /usr/games/rs_timer/start.sh
cat << EOF | sudo tee /usr/share/applications/rs_timer.desktop
[Desktop Entry]
Name=RS Timer
Comment=A lightweight timer to keep track of RuneScape repeatables
Type=Application
Exec=/usr/games/rs_timer/start.sh
Icon=/usr/games/rs_timer/icon.png
Categories=Game;
EOF
cd /tmp/initial-setup
# Install p7z
sudo wget -O p7z_16.02.tar.bz2 https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_x86_linux_bin.tar.bz2/download
sudo tar -vxjf p7z_16.02.tar.bz2
sudo ./p7zip_16.02/install.sh
# Make sure Terminix is the default terminal
update-alternatives --set x-terminal-emulator /usr/bin/terminix.wrapper
# Tidy up
apt-get autoremove
rm install-custom-icon-theme.sh
echo ""
echo "##########################IMPORTANT##########################"
echo "The next step is to run the following command without sudo:"
echo "./prepare-budgie_no-sudo.sh"
echo "#############################################################"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment