Skip to content

Instantly share code, notes, and snippets.

@thimslugga
Forked from RudraSwat/gamebuntu.sh
Last active December 23, 2021 21:05
Show Gist options
  • Save thimslugga/d837a65fca325b6ba710bfa292681906 to your computer and use it in GitHub Desktop.
Save thimslugga/d837a65fca325b6ba710bfa292681906 to your computer and use it in GitHub Desktop.
A simple script to transform an Ubuntu install into a complete game-ready (!) setup.
#!/bin/bash
# Gamebuntu, a simple script to transform an Ubuntu install into a complete game-ready (!) setup
set -e
cd "$(mktemp -d -t gamebuntu-XXXXXXXXXXXX)"
# start info
cat <<EOF
________ ___. __
/ _____/ _____ _____ ____ \_ |__ __ __ ____ _/ |_ __ __
/ \ ___ \__ \ / \ _/ __ \ | __ \ | | \ / \\ __\| | \
\ \_\ \ / __ \_| Y Y \\ ___/ | \_\ \| | /| | \| | | | /
\______ /(____ /|__|_| / \___ >|___ /|____/ |___| /|__| |____/
\/ \/ \/ \/ \/ \/
This script will set up a basic (modern) game-ready Ubuntu environment for you.
EOF
# add universe and multiverse
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release software-properties-common
sudo apt-get install -y snapd
sudo snap set system experimental.refresh-app-awareness=true
sudo snap set system refresh.retain=2
sudo snap set system refresh.timer=00:00~24:00/1
# mesa PPA (remove once an official PPA is available)
sudo add-apt-repository -y ppa:kisak/kisak-mesa
sudo apt-get update && sudo apt-get dist-upgrade
# install xanmod kernel
#echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list
#wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key --keyring /etc/apt/trusted.gpg.d/xanmod-kernel.gpg add -
#sudo apt-get update && sudo apt-get install linux-xanmod
# enable support for i386 packages
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dri:i386 mesa-vulkan-drivers mesa-vulkan-drivers:i386
sudo apt-get install -y ubuntu-restricted-extras libavcodec-extra
sudo apt-get install -y ttf-mscorefonts-installer
# install wine and lutris
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo add-apt-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo add-apt-repository -y ppa:lutris-team/lutris
sudo apt-get install -y --install-recommends winehq-staging winetricks -y
sudo apt-get install -y libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 \
libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386
sudo apt-get install -y lutris
# install steam
sudo apt-get install -y steam
# install discord snap
sudo snap install discord
# install other packages
sudo apt-get install -y python3 python3-venv
sudo apt-get install -y mesa-utils vulkan-tools libegl1:i386
# install noisetorch
curl -s https://api.github.com/repos/lawl/NoiseTorch/releases/latest \
| grep '/NoiseTorch_x64.tgz' \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
tar -C "$HOME" -xzf NoiseTorch_x64.tgz && gtk-update-icon-cache
sudo setcap 'CAP_SYS_RESOURCE=+ep' ~/.local/bin/noisetorch
# install pulseeffects and OBS
sudo apt-get install -y pulseeffects pavucontrol
#sudo snap install obs-studio
# install Kodi from PPA
#sudo add-apt-repository -y ppa:team-xbmc/ppa
#sudo apt-get install -y kodi
# install flatpak
sudo apt-get install -y gnome-software-plugin-flatpak flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak update
flatpak install flatseal
flatpak install flathub com.usebottles.bottles
# Build and install steamos-compositor-plus
git clone https://github.com/ChimeraOS/steamos-compositor-plus
cd steamos-compositor-plus && sudo apt build-dep -y .
sudo apt-get install -y devscripts
debuild -us -uc -b && cd .. && sudo apt install ../*.deb
# TODO: Complete Steam full-screen session
# GNOME-specific tweaks
sudo apt-get install -y gnome-tweaks
gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize || true
mkdir -p $HOME/.steam/root/compatibilitytools.d
# info at the end
echo
echo "If you'll be using Steam, it's recommended that you enable Proton to run Windows games in Wine."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment