Skip to content

Instantly share code, notes, and snippets.

@Garbee
Created April 22, 2017 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Garbee/35269701ff121cdcf37cfdff0b78cf26 to your computer and use it in GitHub Desktop.
Save Garbee/35269701ff121cdcf37cfdff0b78cf26 to your computer and use it in GitHub Desktop.
#!/bin/bash
read -s -p 'Enter Password for sudo: ' sudoPW
echo ''
softwareInstaller=apt
if lspci | grep VGA | grep -q NVIDIA; then
echo 'Installing NVIDIA driver'
echo $sudoPW | sudo -S sudo add-apt-repository -ys ppa:graphics-drivers/ppa > /dev/null 2>&1
echo $sudoPW | sudo -S sudo $softwareInstaller update -qq
echo $sudoPW | sudo -S sudo $softwareInstaller install -qq -y nvidia-378
cat <<EOT >> /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
EOT
echo $sudoPW | sudo -S sh -c "echo 'options nouveau modeset=0' >> /etc/modprobe.d/nouveau-kms.conf"
echo 'Updating initramfs'
sudo update-initramfs -u
# Install steam
cd /tmp
echo 'Downloading steam installer'
# This won't work outside of a personal install script. Just download steam from the site and install.
curl --progress-bar -o steam.deb http://repo.steampowered.com/steam/archive/precise/steam_latest.deb
echo 'Installing Steam client'
echo $sudoPW | sudo -S gdebi -n /tmp/steam.deb > /dev/null 2>&1
echo 'Fixing install'
echo $sudoPW | sudo -S $softwareInstaller -f -qq -y install
echo 'Installing Steam deps'
echo $sudoPW | sudo -S $softwareInstaller -qq -y install \
libgl1-mesa-dri:i386 \
libgl1-mesa-glx:i386 \
libc6:i386
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment