Skip to content

Instantly share code, notes, and snippets.

@Sunderland93
Last active May 21, 2022 22:36
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 Sunderland93/3d4519838a831eedb692cbad2ca94d64 to your computer and use it in GitHub Desktop.
Save Sunderland93/3d4519838a831eedb692cbad2ca94d64 to your computer and use it in GitHub Desktop.
Script for turn Debian in to a gaming desktop
#!/bin/bash
set -e
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'
#Check sudo
if [ "$EUID" -eq 0 ]
then echo -e "${RED}Don't run this script via sudo!${NC}"
exit 1
fi
#Install wget
echo -e "${GREEN}Installing wget${NC}"
sudo apt install -y wget
function install_xanmod() {
echo -e "${GREEN}Installing Linux Xanmod kernel${NC}"
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 update && sudo apt install linux-xanmod -y
}
function fresh_drivers() {
echo -e "${GREEN}Enable Advanced Hardware Support repo from MX Linux${NC}"
echo 'deb http://mxrepo.com/mx/repo bullseye ahs' | sudo tee /etc/apt/sources.list.d/ahs.list
cd /tmp
wget -q http://mxrepo.com/mx/repo/pool/main/m/mx21-archive-keyring/mx21-archive-keyring_2021.2.19_all.deb
sudo dpkg -i mx21-archive-keyring_2021.2.19_all.deb
sudo apt update && sudo apt full-upgrade -y
}
function install_soft() {
echo -e "${GREEN}Installing base gaming software${NC}"
sudo apt update
sudo apt install -y steam steam-devices lutris minigalaxy gamemode
}
function install_soft_flatpak() {
echo -e "${GREEN}Installing additional gaming software${NC}"
sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y com.obsproject.Studio
flatpak install -y com.heroicgameslauncher.hgl
flatpak install -y org.libretro.RetroArch
flatpak install -y com.discordapp.Discord
flatpak install -y com.usebottles.bottles
flatpak install -y com.github.tchx84.Flatseal
}
function enable_repos() {
echo -e "${GREEN}Activate 32-bit support and Non-Free repo${NC}"
sudo dpkg --add-architecture i386
sudo sed -i 's/main/main\ contrib\ non-free/g' /etc/apt/sources.list
sudo apt update
}
function install_additional_drivers() {
echo -e "${GREEN}Installing additional drivers${NC}"
sudo apt install -y firmware-linux-nonfree firmware-misc-nonfree firmware-realtek firmware-atheros
}
echo -e "${GREEN}This script will help to turn your Debian in to a gaming desktop${NC}\n"
PS3='Please enter your choice: '
options=("Install all" "Xanmod kernel" "Fresh graphics drivers" "Software only (exept Flatpak)" "Software only (with Flatpak)" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Install all")
enable_repos
install_xanmod
fresh_drivers
install_additional_drivers
install_soft
install_soft_flatpak
break
;;
"Xanmod kernel")
install_xanmod
install_additional_drivers
break
;;
"Fresh graphics drivers")
fresh_drivers
break
;;
"Software only (exept Flatpak)")
enable_repos
install_soft
break
;;
"Software only (with Flatpak)")
enable_repos
install_soft
install_soft_flatpak
break
;;
"Quit")
break
;;
*) echo -e "${RED}invalid option $REPLY";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment