Skip to content

Instantly share code, notes, and snippets.

@alanstevens
Created December 19, 2011 22:29
Show Gist options
  • Save alanstevens/1499222 to your computer and use it in GitHub Desktop.
Save alanstevens/1499222 to your computer and use it in GitHub Desktop.
A script to install/uninstall my default packages on a fresh Linux Mint system.
#! /usr/bin/env bash
#
# execute this script with:
# curl https://raw.github.com/gist/1499222/install-packages.sh | sudo bash -s <username> <public_key_url>
# curl https://raw.github.com/gist/1499222/install-packages.sh | sudo bash -s 'alan' 'https://dl.dropbox.com/s/qfo16yktbn23q9j/id_rsa.pub?dl=1'
#
user_name=$1
public_key=$2
#
# write the user's public key to their authorized keys file
#
mkdir -p /home/$user_name/.ssh
curl $public_key > /home/$user_name/.ssh/authorized_keys
#
# set ownership and permissions on authorized_keys
#
chown -R $user_name:$user_name /home/$user_name/.ssh
chmod -R 0751 /home/$user_name/.ssh
#
# add user to sudoers list with no password required (account has no password)
#
grep $user_name /etc/sudoers
if [ $? -ne 0 ];then
(cat /etc/sudoers;echo "$user_name ALL=(ALL) NOPASSWD: ALL") >> ~/tmp_sudoers
chmod 0440 ~/tmp_sudoers
visudo -q -c -s -f ~/tmp_sudoers
if [ $? -ne 0 ];then
echo -e "\nERROR: There is a problem with the sudoers configuration.\n Please review ~/tmp_sudoers.\n"
fi
mv -f ~/tmp_sudoers /etc/sudoers
fi
locale-gen en_US.UTF-8
/usr/sbin/update-locale LANG=en_US.UTF-8
apt-add-repository 'deb http://toolbelt.herokuapp.com/ubuntu ./'
wget http://toolbelt.herokuapp.com/apt/release.key | apt-key add -
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
aptitude update
aptitude safe-upgrade --yes
aptitude full-upgrade --yes
aptitude -y install ttf-mscorefonts-installer
# RVM Dependencies
aptitude -y install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
aptitude -y install heroku-toolbelt
aptitude -y install unace rar unrar p7zip zip unzip sharutils uudeview mpack lha arj cabextract file-roller
aptitude -y install shutter
aptitude -y install glipper
aptitude -y install bum
aptitude -y install gufw
aptitude -y install google-chrome-stable
aptitude -y install ubuntu-tweak-0
aptitude -y install gnome-dsudo
aptitude -y install dropbox
aptitude -y install filezilla filezilla-common
aptitude -y install screenlets
aptitude -y install bleachbit
aptitude -y install conky-all
aptitude -y install gtk-recordmydesktop
aptitude -y install startupmanager
aptitude -y install mc
aptitude -y install gnome-commander
aptitude -y install bluefish
aptitude -y install dia
aptitude -y install computer-janitor-gtk
aptitude -y install agave
aptitude -y install terminator
aptitude -y install screen
aptitude -y install guake
aptitude -y install sqlitebrowser
aptitude -y install gitg
aptitude -y install giggle
aptitude -y install mongodb
mkdir -p /data/db
chmod -R a+rw /data/db
# aptitude -y install ntfs-3g
# aptitude -y install ntfs-config
# aptitude -y install wine1.3
# aptitude -y install playonlinux
# aptitude -y install wine
# aptitude -y install mesa-utilso
# aptitude -y install okular
# aptitude -y install avant-window-navigator
# aptitude -y install docky
# aptitude -y install monodevelop
aptitude -y remove thunderbird
aptitude -y remove firefox
aptitude -y remove vlc
aptitude -y remove pidgin
aptitude -y remove banshee
aptitude -y remove xchat
aptitude -y remove transmission-gtk
aptitude -y remove brasero
aptitude -y remove gnome-mplayer
aptitude -y remove simple-scan
aptitude -y remove totem
aptitude -y safe-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment