#!/bin/bash # # / Changes in this version # * Added scan for fastest mirror # * Virtualbox now uses version in repos for Oneiric and later # * Support for new Mint versions ended # * Removed Maverick # * Switched from mplayer to smplayer # * Synapse replaces Gnome Do on Natty and later # * Added Caffeine # * Added Precise # * Fixed really, really old typo (thanks killermist!) # * Removed Firefox PPA for Lucid, updates now pushed out through official repos # * Switch Precise lightweight gnome to gnome-session-fallback # * Temporarily disabled backports and updates repos while I chase a bug # # # Define some colors using terminal save colors WHITE="\033[1;37m" GREEN="\033[1;32m" CYAN="\033[1;36m" GRAY="\033[1;37m" BLUE="\033[1;34m" BBLUE="\033[1;34m" # Set the color scheme trap 'reset' 0 echo -en "\E[40;$32m" clear # Now for the code. Don't worry about any of this stuff. It's just nonsense. ;) echo echo -en $WHITE echo Perfectminimal echo SCRIPT VERSION 1.3 echo -en $CYAN "By Andy Duffell (www.andyduffell.com)" echo -en $WHITE echo echo # Detect version of Ubuntu if grep "DISTRIB_RELEASE=10.04" /etc/lsb-release > /dev/null 2>&1 then OSVER="lucid" elif grep "DISTRIB_RELEASE=11.04" /etc/lsb-release > /dev/null 2>&1 then OSVER="natty" elif grep "DISTRIB_RELEASE=11.10" /etc/lsb-release > /dev/null 2>&1 then OSVER="oneiric" elif grep "DISTRIB_RELEASE=12.04" /etc/lsb-release > /dev/null 2>&1 then OSVER="precise" elif grep "DISTRIB_CODENAME=Isadora" /etc/lsb-release > /dev/null 2>&1 then OSVER="lucid" elif grep "DISTRIB_CODENAME=Katya" /etc/lsb-release > /dev/null 2>&1 then OSVER="natty" else echo "Sorry, you are not running a version of Ubuntu that is supported by this script." echo sleep 5 exit 1 fi # set default bit to 32 BIT="32" if [[ `uname -m` == 'amd64' || `uname -m` == 'x86_64' ]] ; then BIT="64" fi echo "Detected version:" "$OSVER", "$BIT" "-bit" echo echo "This script requires super-user access to continue." echo 'Checking for super-user access...' echo # Temporarily set sudo timeout to 360 mins echo "Defaults passwd_timeout=360" | sudo tee -a /etc/sudoers > /dev/null echo -en $WHITE "Access Granted." $GRAY echo -en $GREEN "\nSome of the software this script can install comes from sources outside\nthe official Ubuntu repositories." read -p "Do you want to include software from these sources? (Y/n) " if [ "$REPLY" = "n" -o "$REPLY" = "N" ]; then NOREPOS="1" echo -en "\nOnly software from the official Ubuntu repos will be used." else NOREPOS="0" fi echo echo #Detect internet connection echo -en "\nTesting for an internet connection..." ping -c 1 -w 5 google.com &>/dev/null if [ $? -ne 0 ] ; then #Uh-oh, no interwebs. Would a proxy help? echo -en "\nNo internet connection detected, do you want to enable a proxy? (Y/n) " if [ "$REPLY" != "n" -a "$REPLY" != "N" ] ; then echo -en "\nEnter the address of your proxy: " read PROXY echo -e "Acquire::http::Proxy \"http://" "$PROXY" "\";" >> /etc/apt/apt.conf else echo "\nYou won't be able to continue without an internet connection\nPlease re-run this script when you've connected to the series of tubes." sleep 5 exit fi else echo -en "\nConnection ok!" fi #Shall we begin? echo -en $WHITE "\nNow, I'll ask you some questions, and then get right to work." echo # Ask all the questions... # Pick your DE... echo -en $GREEN echo "Do you want to install a desktop environment?" echo "1. Lightweight desktop" echo "2. Full desktop" echo "3. Keep current desktop " read -p "" echo -en $WHITE if [ "$REPLY" = "1" ] ; then echo echo "Pick your desktop:" echo "1. XFCE core " echo "2. LXDE core" if [ "$OSVER" = "lucid" ] ; then echo "3. KDE minimal" elif [ "$OSVER" = "natty" -o "$OSVER" = "oneiric" ] ; then echo "3. Unity 2D" else echo "3. Gnome fallback session" fi if [ "$OSVER" = "lucid" -o "$OSVER" = "natty" ] ; then echo "4. Gnome core" else echo "4. KDE Low Fat Settings" fi read -p "" if [ "$REPLY" = "1" ] ; then PICKDE="6" elif [ "$REPLY" = "2" ] ; then PICKDE="8" elif [ "$REPLY" = "3" -a "$OSVER" = "lucid" ] ; then PICKDE="4" elif [ "$REPLY" = "3" -a "$OSVER" = "natty" -o "$OSVER" = "oneiric" ] ; then PICKDE="10" elif [ "$REPLY" = "3" -a "$OSVER" != "lucid" -a "$OSVER" != "natty" -a "$OSVER" != "oneiric" ] ; then PICKDE="11" elif [ "$REPLY" = "4" -a "$OSVER" = "lucid" -o "$OSVER" = "natty" ] ; then PICKDE="2" elif [ "$REPLY" = "4" then PICKDE="12" else PICKDE="0" fi elif [ "$REPLY" = "2" ] ; then echo echo "Pick your desktop:" echo "1. Ubuntu" echo "2. Kubuntu" echo "3. Xubuntu" echo "4. Lubuntu" echo "5. Mythbuntu " if [ "$OSVER" = "lucid" ] ; then echo "6. Ubuntu Netbook Edition " elif [ "$OSVER" = "oneiric" ] ; then echo "6. Gnome Shell " fi read -p "" if [ "$REPLY" = "1" ] ; then PICKDE="1" elif [ "$REPLY" = "2" ] ; then PICKDE="3" elif [ "$REPLY" = "3" ] ; then PICKDE="5" elif [ "$REPLY" = "4" ] ; then PICKDE="7" elif [ "$REPLY" = "5" ] ; then PICKDE="9" elif [ "$REPLY" = "6" -a "$OSVER" = "lucid"] ; then PICKDE="10" elif [ "$REPLY" = "6" ] ; then PICKDE="11" else "PICKDE" = "0" fi else PICKDE="0" echo "No DE will be installed" fi echo # Now that we've picked a DE, make sure we set this correctly. Also detect currently install KDE. if [ "$PICKDE" = "3" -o "$PICKDE" = "4" -o "$PICKDE" = "12" ] ; then ENVIRONMENT="kde" elif grep "DISTRIB_ID=Kubuntu" /etc/lsb-release > /dev/null 2>&1 then ENVIRONMENT="kde" else ENVIRONMENT="notkde" fi # Install extra packages to make the minimal installs more useful if [ "$PICKDE" = "0" -o "$PICKDE" = "2" -o "$PICKDE" = "4" -o "$PICKDE" = "6" -o "$PICKDE" = "8" ] ; then echo echo -en $GREEN echo -e "\nGraphical package management tools allow you to search for,\ninstall, update and remove applications and hardware drivers\nthrough a user-friendly interface" echo read -p "Would you like to install graphical package management tools? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then APTGUIS="1" else APTGUIS="0" fi echo echo echo -en $GREEN read -p "Would you like to install printing support? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then CUPS="1" else CUPS="0" fi echo echo echo -en $GREEN read -p "Would you like to install Bluetooth support? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then BLUETOOTH="1" else BLUETOOTH="0" fi echo echo if [ "$PICKDE" = 2 ] ; then echo -en $GREEN read -p "Would you like to install the Ubuntu One file synchronisation service? (y/N)" echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then UBUNTUONE="1" else UBUNTUONE="0" fi echo echo fi # Office suites echo -en $GREEN read -p " Would you like to install an office suite? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo "Which would you like?" if [ "$OSVER" = "lucid" ] ; then echo "1. Open Office" else echo "1. Libre Office" fi echo "2. Abiword word processor & Gnumeric spreadsheets" echo "3. Zoho Office (web based) " read OFFICE else OFFICE="0" fi echo # Email echo -en $GREEN read -p " Would you like to install an email client? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo "Which would you like?" if [ "$ENVIRONMENT" = "kde" ] ; then echo "1. Kmail" else echo "1. Evolution" fi echo "2. Thunderbird" echo "3. Webmail integration " read EMAIL echo -en $GREEN read -p "Do you want spam filters for your email? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then SPAM="1" else SPAM="0" fi else EMAIL="0" fi echo # Media players echo -en $GREEN read -p " Would you like to install a media player? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo "Which would you like?" echo "1. Smplayer" echo "2. VLC" if [ "$ENVIRONMENT" = "kde" ] ; then echo "3. Amarok " else echo "3. Banshee" if [ "$PICKDE" = "6" -a "$OSVER" != "lucid" ] ; then echo "4. Parole" else echo "4. Totem" fi fi echo "5. Rhythmbox " read PLAYER else PLAYER="0" fi echo # IM clients echo -en $GREEN read -p " Would you like to install an instant messaging client? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo "Which would you like?" echo "1. Pidgin" echo "2. Emesene" if [ "$ENVIRONMENT" = "kde" ] ; then echo "3. Kopete " else echo "3. Empathy" fi read IM else IM="0" fi fi echo if [ "$NOREPOS" != "1" ] ; then echo -en $GREEN read -p " Would you like to install support for all types of multimedia?(y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo echo -en $BLUE"=== $WHITEIMPORTANT$BLUE ==="$WHITE echo echo -e "Installing restricted multimedia codecs might violate\npatent and/or other laws. Please make sure you have\nthe right to use these codecs." echo echo -en $GREEN read -p "Install multimedia codecs? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then MULTIMEDIA="1" else MULTIMEDIA="0" fi echo echo -en $GREEN read -p "Does your computer have a DVD player? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then DVD="1" else DVD="0" fi echo echo fi fi echo -en $GREEN read -p "Would you like to install browsers and other internet apps? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then # Let's install some browsers... echo -en $GREEN read -p "Would you like to install a web browser? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo -en $WHITE echo "Which would you like?" echo "1. Firefox " echo "2. Chromium (open source version of Chrome) " if [ "$NOREPOS" != "1" ] ; then echo "3. Chrome " echo "4. Opera " fi read BROWSER else "BROWSER" = "0" echo -en $GREEN fi echo echo -en $GREEN read -p "Do you want to install Flash? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then FLASH="1" else FLASH="0" fi echo if [ "$NOREPOS" != "1" ] ; then echo -en $GREEN read -p "Should I install Skype for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then SKYPE="1" else SKYPE="0" fi echo fi echo -en $GREEN read -p "Should I install Miro Internet TV for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then MIRO="1" else MIRO="0" fi echo echo echo fi if [ "$NOREPOS" != "1" ] ; then echo -en $GREEN # Install virtualbox from repos on Oneiric or later if [ "$OSVER" != "lucid" -a "$OSVER" != "natty" ] ; then echo -en $WHITE read -p " Would you like to install Virtualbox? (y/N) " if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then VIRTBOX="3" else VIRTBOX="0" fi # Offer choice of OSE from repos or direct from Oracle for Lucid, Natty else echo -en $WHITE read -p " Would you like to install Virtualbox? (y/N) " if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo echo "Do you want to install:" echo "1. Full version" echo "2. Open Source Edition (lacks support for USB and remote desktop) " echo -en $WHITE read VIRTBOX echo echo else VIRTBOX="0" fi fi # ------- fi echo if [ "$NOREPOS" != "1" ] ; then echo -en $GREEN read -p "Would you like to install media centre software? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo echo "Do you want to install:" echo "1. XBMC" echo "2. Moovida" echo -en $WHITE read MEDIACENTRE echo else MEDIACENTRE="0" fi fi echo echo -en $GREEN read -p "Would you like to enhance the overall look of your system? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then echo echo -e "I can install a huge number of fonts which you can use in\nyour word processor, or even in programs like GIMP." echo -en $GREEN read -p "Would you like these new fonts? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then FONTS="1" else "FONTS" = "0" fi echo echo echo -e "Compiz Config Settings Manager (CCSM) lets you\ncontrol the advanced features of Compiz-Fusion." echo -en $GREEN read -p "Should I install this for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then CCSM="1" else "CCSM" = "0" fi echo if [ "$OSVER" = "lucid" -o "$OSVER" = "natty" ] ; then echo echo -e "Emerald Window Decorator is a nice window decorator\nIt requires Compiz-Fusion." echo -en $GREEN read -p "Should I install emerald for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then EWD="1" else "EWD" = "0" fi echo fi if [ "$ENVIRONMENT" = "notkde" ]; then if [ "$OSVER" = "lucid" ] ; then echo echo -e "GNOME Do is an intelligent\napplication and file launcher tool." echo -en $GREEN read -p "Should I install GNOME Do for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then GNOMEDO="1" else "GNOMEDO" = "0" fi else echo echo -e "Synapse is an intelligent\napplication and file launcher tool." echo -en $GREEN read -p "Should I install Synapse for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then SYNAPSE="1" else "SYNAPSE" = "0" fi fi fi echo echo echo -e "Caffeine is an intelligent sleep inhibit applet with easy customisation" echo -en $GREEN read -p "Should I install Caffeine for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then CAFFEINE="1" fi echo echo -e "Avant Window Navigator is a very nice\nMac OS-style dockbar for Linux" echo -en $GREEN read -p "Should I install avant-window-navigator for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then AWN="1" fi echo echo # ------- fi echo echo -en $GREEN read -p "Would you like to improve Ubuntu functionality? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then # ------- echo echo -e "Would you like to intelligently pre-load commonly used\napplications into memory so they load faster?\nNote: It can take up to a week for this to take effect." echo -en $GREEN read -p "Should I setup preload for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then PRELOAD="1" fi echo echo -e "Wine is an application that allows you to run some\nWindows programs directly in Linux (.exe files)." echo -en $GREEN read -p "Should I install this for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then WINE="1" fi echo if [ "$NOREPOS" != "1" ] ; then if [ "$ENVIRONMENT" = "notkde" ]; then echo echo -e "Ubuntu Tweak allows you to tweak the user experience by\nsimplifying the modification of advanced system settings." echo -en $GREEN read -p "Should I install ubuntu-tweak for you? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then UBUNTUTWEAK="1" fi fi echo fi echo -e "I can make it so you can use 7z, ZIP, Zip64, CAB, RAR, ARJ,\nGZIP, BZIP2, TAR, CPIO, RPM, ISO and DEB archives in file-roller." echo -en $GREEN read -p "Do you want me to do this? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then COMPRESSION="1" fi echo echo # ------- fi echo "This script does not come with or even imply any kind of warranty." echo "If your system breaks, you take full responsibility." echo -en $CYAN echo read -p "I am about to modify your system. Are you sure this is okay? (y/N) " echo -en $WHITE if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then GO="1" #deprecated, but still here else echo Exiting. echo sleep 5 exit 1 fi echo # End of questions # Add required repos cd ~ if [ ! -e ".perfectminimal/sources35" ] ; # Check if file exists. then echo "This is apparently the first time you have run this script." echo echo "Backing up your APT sources.list file to /etc/apt/sources.list.backup" sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup echo "Done." echo echo "Creating your APT entries now." mkdir ~/.perfectminimal echo "" >> ~/.perfectminimal/sources35 echo "# Added by perfectminimal - www.andyduffell.com" >> ~/.perfectminimal/sources35 echo "" >> ~/.perfectminimal/sources35 fi # Avoid duplicates by using grep if grep 'main restricted universe multiverse'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else echo "deb http://archive.ubuntu.com/ubuntu/ "$OSVER" main restricted universe multiverse" >> ~/.perfectminimal/sources35 fi # Add fastest mirror if grep 'deb mirror://mirrors.ubuntu.com/mirrors.txt'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else sed -i 1i"deb mirror://mirrors.ubuntu.com/mirrors.txt "$OSVER" main restricted universe multiverse " /etc/apt/sources.list fi # Add Backports # if grep $OSVER'-backports'$ /etc/apt/sources.list > /dev/null; then # echo "Omitting duplicate..." # else # echo "deb http://archive.ubuntu.com/ubuntu/ "$OSVER"-backports main restricted universe multiverse" >> ~/.perfectminimal/sources35 # fi # Add Updates # if grep $OSVER'-updates'$ /etc/apt/sources.list > /dev/null; then # echo "Omitting duplicate..." # else # echo "deb http://archive.ubuntu.com/ubuntu/ "$OSVER"-updates main restricted universe multiverse" >> ~/.perfectminimal/sources35 # fi # Add Restricted if grep 'main restricted'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else echo "deb http://archive.ubuntu.com/ubuntu/ "$OSVER" main restricted" >> ~/.perfectminimal/sources35 fi # Add Medibuntu if [ "$MULTIMEDIA" = "1" -o "$PLAYER" = "1" ] ; then # if [ -e "/etc/apt/sources.list.d/medibuntu.list" ] ; then # Check if file exists. if grep 'deb http://packages.medibuntu.org/ '$OSVER' free non-free' /etc/apt/sources.list.d/medibuntu.list > /dev/null; then echo "Keep existing /etc/apt/sources.list.d/medibuntu.list file from the same distro..." else echo "Removing existing /etc/apt/sources.list.d/medibuntu.list file from a different distro..." sudo rm /etc/apt/sources.list.d/medibuntu.list dpkg -s medibuntu-keyring | grep "Status: install ok installed" > /dev/null 2>&1 if [ $? = 0 ]; then echo "Removing existing medibuntu-keyring..." sudo apt-get --force-yes -y -m remove medibuntu-keyring fi fi fi if [ -e "/etc/apt/sources.list.d/medibuntu.list" ] ; then # Check if file still exists. echo "Omitting duplicate..." else #echo "# deb http://packages.medibuntu.org/ "$OSVER" free non-free" >> ./perfectminimal/sources35 echo Retrieving Medibuntu Repository and GPG Signature... #// Medibuntu sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list \ --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update echo Done. echo -e "Medibuntu repository (http://medibuntu.org)" >> ~/.perfectminimal/logfile echo fi fi # Add Skype repo if [ "$SKYPE" = "1" ] ; then if grep 'deb http://download.skype.com/linux/repos/debian/'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else echo "deb http://download.skype.com/linux/repos/debian/ stable non-free" >> ~/.perfectminimal/sources35 echo Retrieving authentication key... gpg --keyserver pgp.mit.edu --recv-keys 0xd66b746e && gpg --export --armor 0xd66b746e | sudo apt-key add - sudo apt-get -q update echo Done. echo -e "Skype repository (http://www.skype.com)" >> ~/.perfectminimal/logfile echo fi fi # Add Google repo if [ "$BROWSER" = "3" ] ; then if grep 'deb http://dl.google.com/linux/deb/'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else echo Retrieving authentication key... sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo apt-get -q update echo "deb http://dl.google.com/linux/deb/ stable non-free main" >> ~/.perfectminimal/sources35 echo Done. echo -e "Google Linux repository (http://www.google.com/linuxrepositories)" >> ~/.perfectminimal/logfile echo fi fi # Add Opera repo if [ "$BROWSER" = "4" ] ; then if grep 'deb http://deb.opera.com/opera/' /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else echo "Retrieving authentication key..." sudo wget -O - http://deb.opera.com/archive.key | sudo apt-key add - sudo apt-get -q update sudo apt-get -y -m install debian-archive-keyring echo "deb http://deb.opera.com/opera/ stable non-free" >> ~/.perfectminimal/sources35 echo Done. echo -e "Opera repository (http://deb.opera.com)" >> ~/.perfectminimal/logfile echo fi fi # Ubuntu-Tweak (Optional Repository) if [ "$UBUNTUTWEAK" = "1" ] ; then if grep 'deb http://ppa.launchpad.net/tualatrix/ppa/ubuntu '$OSVER' main'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else sudo add-apt-repository ppa:tualatrix echo "Ubuntu Tweak stable PPA (https:/launchpad.net/~tualatrix/+archive/ppa)" >> ~/.perfectminimal/logfile fi fi # Caffeine PPA (Optional Repository) if [ "$CAFFEINE" = "1" ] ; then if grep 'deb http://ppa.launchpad.net/caffeine-developers/ppa/ubuntu '$OSVER' main'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else sudo add-apt-repository ppa:caffeine-developers/ppa echo "Caffeine PPA (https:/launchpad.net/~caffeine-developers/+archive/ppa)" >> ~/.perfectminimal/logfile fi fi # VirtualBox (Optional Repository for Lucid, Natty) if [ "$VIRTBOX" = "1" ] ; then if grep 'deb http://download.virtualbox.org/virtualbox/debian '$OSVER' non-free'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else echo "# VirtualBox" >> ~/.perfectminimal/sources35 echo "deb http://download.virtualbox.org/virtualbox/debian "$OSVER" non-free" >> ~/.perfectminimal/sources35 echo "" >> ~/.perfectminimal/sources35 echo Retrieving GPG Signature... wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add - echo Done. echo "Virtualbox repository (http:/www.virtualbox.org/wiki/Linux_Downloads)" >> ~/.perfectminimal/logfile echo fi fi # Firefox Stable PPA no linger required for Lucid after Feb 17 2012 # if [ "$BROWSER" = "1" -a "$OSVER" = "lucid" ] ; then # if grep 'deb http://ppa.launchpad.net/mozillateam/firefox-stable/ubuntu '$OSVER' main'$ /etc/apt/#sources.list > /dev/null; then # echo "Omitting duplicate..." # else # sudo add-apt-repository ppa:mozillateam/firefox-stable # echo "Firefox stable PPA (https:/launchpad.net/~mozillateam/+archive/firefox-stable)" >> #~/.perfectminimal/logfile # fi # #fi # XBMC PPA if [ "$MEDIACENTRE" = "1" ] ; then if grep 'deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu '$OSVER' main'$ /etc/apt/sources.list > /dev/null; then echo "Omitting duplicate..." else sudo add-apt-repository ppa:team-xbmc/ppa echo Done. echo "XBMC stable PPA (https:/launchpad.net/~team-xbmc/+archive/ppa)" >> ~/.perfectminimal/logfile fi fi # Send new lines to sources.list cat ~/.perfectminimal/sources35 | sudo tee -a /etc/apt/sources.list rm ~/.perfectminimal/sources35 echo Done. echo echo "Cleaning up and updating apt..." # sudo apt-get update sudo apt-get autoclean echo "Done." echo #Run the installers echo "The following packages were installed on " >> ~/.perfectminimal/logfile date >> ~/.perfectminimal/logfile # Standard Ubuntu if [ "$PICKDE" = "1" ]; then echo "Installing ubuntu-desktop..." sudo apt-get -y -m install ubuntu-desktop echo -e "ubuntu-desktop" >> ~/.perfectminimal/logfile echo Done. echo fi # Gnome core only if [ "$PICKDE" = "2" ]; then echo "Installing gnome-core..." sudo apt-get -y -m install xorg gnome-core gksu gnome-themes network-manager-gnome echo -e "xorg\ngnome-core\gnome-themes\nnetwork-manager-gnome" >> ~/.perfectminimal/logfile if [ "$OSVER" = "lucid" -o "$OSVER" = natty ]; then #Old versions use gdm sudo apt-get -y -m install gdm echo -e "gdm" >> ~/.perfectminimal/logfile else sudo apt-get -y -m install lightdm #But more recent ones use lightdm fi if [ "$OSVER" = "lucid" ]; then #Old versions can use the Ubuntu applet sudo apt-get -y -m install indicator-applet-session echo -e "indicator-applet-session" >> ~/.perfectminimal/logfile else sudo apt-get -y -m install indicator-session #But more recent ones use the Gnome one to avoid installing Gwibber echo -e "indicator-session" >> ~/.perfectminimal/logfile fi echo "Done." echo fi # Standard Kubuntu if [ "$PICKDE" = "3" ]; then echo "Installing kubuntu-desktop..." sudo apt-get -y -m install kubuntu-desktop echo -e "kubuntu-desktop" >> ~/.perfectminimal/logfile echo Done. echo fi # Kubuntu Low Fat if [ "$PICKDE" = "12" ]; then echo "Installing kubuntu-desktop..." sudo apt-get -y -m install kubuntu-desktop kubuntu-low-fat-settings echo -e "kubuntu-desktop\nkubuntu-low-fat-settings" >> ~/.perfectminimal/logfile echo Done. echo fi # KDE core if [ "$PICKDE" = "4" ]; then echo "Installing kde-minimal..." sudo apt-get -y -m install xorg kde-minimal kdesudo network-manager-kde echo -e "xorg\nkde-minimal\nnetwork-manager-kde" >> ~/.perfectminimal/logfile echo Done. echo fi # Standard Xubuntu if [ "$PICKDE" = "5" ]; then echo "Installing xubuntu-desktop..." sudo apt-get -y -m install xubuntu-desktop echo -e "xubuntu-desktop" >> ~/.perfectminimal/logfile echo Done. echo fi # XFCE core if [ "$PICKDE" = "6" ]; then echo "Installing XFCE4..." sudo apt-get -y -m install xfce4 network-manager gksu if [ "$OSVER" = "lucid" -o "$OSVER" = natty ] ; then # Old versions use GDM sudo apt-get -y -m install gdm echo -e "gdm" >> ~/.perfectminimal/logfile else sudo apt-get -y -m install lightdm # But newer ones get LightDM echo -e "lightdm" >> ~/.perfectminimal/logfile fi echo -e "xfce4\nnetwork-manager" >> ~/.perfectminimal/logfile echo Done. echo fi # Standard Lubuntu if [ "$PICKDE" = "7" ]; then echo "Installing lubuntu-desktop..." sudo apt-get -y -m install lubuntu-desktop echo -e "lubuntu-desktop" >> ~/.perfectminimal/logfile echo Done. echo fi # LXDE core if [ "$PICKDE" = "8" ]; then if [ "$OSVER" != "lucid" ]; then echo "Installing lubuntu-core" sudo apt-get -y -m install lubuntu-core lxdm echo -e "lubuntu-core\nlxdm" >> ~/.perfectminimal/logfile else #Old package for Lucid echo "Installing LXDE..." sudo apt-get -y -m install xorg lxsession lxde echo -e "xorg\nlxsession\nlxde" >> ~/.perfectminimal/logfile fi echo Done. echo fi # Mythbuntu if [ "$PICKDE" = "9" ]; then echo "Installing Mythbuntu..." sudo apt-get -y -m install mythbuntu-desktop echo -e "mythbuntu-desktop" >> ~/.perfectminimal/logfile echo Done. echo fi # Netbook or Unity 2D if [ "$PICKDE" = "10" ]; then if [ "$OSVER" = "lucid" ]; then echo "Installing Ubuntu Netbook Edition..." sudo apt-get -y -m install ubuntu-netbook echo -e "ubuntu-netbook" >> ~/.perfectminimal/logfile else echo "Installing Unity 2D..." sudo apt-get -y -m install unity-2d xorg gnome-terminal python-aptdaemon.gtkwidgets network-manager-gnome echo -e "unity-2d\nxorg\ngnome-terminal\npython-aptdaemon.gtkwidgets\nnetwork-manager-gnome" >> ~/.perfectminimal/logfile if [ "$OSVER" = natty ]; then #Old versions use gdm sudo apt-get -y -m install gdm echo -e "gdm" >> ~/.perfectminimal/logfile else sudo apt-get -y -m install lightdm #But more recent ones use lightdm fi fi echo Done. echo fi # Gnome Session Fallback if [ "$PICKDE" = "11" ] ; then echo "Installing gnome-session-fallback" sudo apt-get -y -m install gnome-session-fallback xorg gnome-terminal network-manager-gnome lightdm echo -e "gnome-session-fallback\nxorg\ngnome-terminal\nnetwork-manager-gnome\nlightdm" >> ~/.perfectminimal/logfile echo "Done." echo fi # Gnome Shell if [ "$PICKDE" = "12" ] ; then echo "Installing Gnome Shell..." sudo apt-get -y -m install gnome-shell xorg gdm gnome-session echo -e "gnome-shell\nxorg\ngdm\ngnome-session" >> ~/.perfectminimal/logfile echo "Done." echo fi # Graphical package management if [ "$APTGUIS" = "1" -a "$ENVIRONMENT" = "kde" ]; then echo "Installing KDE package management tools" sudo apt-get -y -m install kpackagekit gdebi-kde update-manager-kde jockey-kde dkms software-properties-kde echo -e "kpackagekit\ngdebi-kde\nupdate-manager-kde\njockey-kde\ndkms\nsoftware-properties-kde" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$APTGUIS" = "1" -a "$ENVIRONMENT" = "notkde" ]; then echo "Installing Gnome package management tools" sudo apt-get -y -m install gdebi update-manager jockey-gtk dkms software-properties-gtk echo -e "gdebi\nupdate-manager\njockey-gtk\ndkms\nsoftware-properties-gtk" >> ~/.perfectminimal/logfile echo Done. echo fi # CUPS if [ "$CUPS" = "1" ]; then echo Installing printer support sudo apt-get -y -m install cups echo -e "cups" >> ~/.perfectminimal/logfile echo Done. echo fi # Bluetooth if [ "$BLUETOOTH" = "1" ]; then echo Installing Bluetooth support if [ "$ENVIRONMENT" = "kde" ]; then if [ "$OSVER" = "lucid" ]; then sudo apt-get -y -m install kbluetooth bluez echo -e "kbluetooth\nbluez" >> ~/.perfectminimal/logfile else sudo apt-get -y -m install bluedevil bluez-alsa bluez-cups pulseaudio-module-bluetooth echo -e "bluedevil\nbluez-alsa\nbluez-cups\npulseaudio-module-bluetooth" >> ~/.perfectminimal/logfile fi else sudo apt-get -y -m install gnome-bluetooth pulseaudio-module-bluetooth bluez-alsa bluez-gstreamer echo -e "gnome-bluetooth\npulseaudio-module-bluetooth\nbluez-alsa\nbluez-gstreamer" >> ~/.perfectminimal/logfile fi echo Done. echo fi # Office suites if [ "$OFFICE" = "1" ] ; then # Install Open Office on Lucid if [ "$OSVER" = "lucid" ] ; then echo "Installing Open Office" sudo apt-get -y -m install openoffice.org openoffice.org-calc openoffice.org-impress openoffice.org-writer echo -e "openoffice.org\nopenoffice.org-calc\nopenoffice.org-impress\nopenoffice.org-writer" >> ~/.perfectminimal/logfile if [ "$ENVIRONMENT" = "kde" ]; then sudo apt-get -y -m install openoffice.org-kde openoffice.org-style-oxygen kde-thumbnailer-openoffice echo -e "openoffice.org-kde\nopenoffice.org-style-oxygen\nkde-thumbnailer-openoffice" >> ~/.perfectminimal/logfile else sudo apt-get -y -m install openoffice.org-gnome openoffice.org-math echo -e "openoffice.org-gnome\nopenoffice.org-math" >> ~/.perfectminimal/logfile fi # Install Libre Office on Natty and later else echo "Installing Libre Office" sudo apt-get -y -m install libreoffice-calc libreoffice-impress libreoffice-writer echo -e "libreoffice-calc\nlibreoffice-impress\nlibreoffice-writer" >> ~/.perfectminimal/logfile if [ "$ENVIRONMENT" = "kde" ]; then sudo apt-get -y -m install libreoffice-kde libreoffice-style-oxygen echo -e "libreoffice-kde\nlibreoffice-style-oxygen" >> ~/.perfectminimal/logfile else sudo apt-get -y -m install libreoffice-gnome libreoffice-help-en-us libreoffice-math libreoffice-style-human echo -e "libreoffice-gnome\nlibreoffice-help-en-us\nlibreoffice-math\nlibreoffice-style-human" >> ~/.perfectminimal/logfile fi fi echo "Done." echo fi if [ "$OFFICE" = "2" ] ; then echo "Installing lightweight office apps" sudo apt-get -y -m install abiword abiword-plugin-grammar abiword-plugin-mathview gnumeric echo -e "abiword\nabiword-plugin-grammar\nabiword-plugin-mathview\ngnumeric" >> ~/.perfectminimal/logfile echo "Done." echo fi if [ "$OFFICE" = "3" ] ; then echo "Installing Zoho Office" sudo apt-get -y -m install webservice-office-zoho echo -e "webservice-office-zoho" >> ~/.perfectminimal/logfile echo "Done." echo fi # Email if [ "$EMAIL" = "1" ] ; then if [ "$ENVIRONMENT" = "kde" ] ; then echo "Installing Kmail" sudo apt-get -y -m install kmail echo -e "kmail" >> ~/.perfectminimal/logfile else echo "Installing Evolution" sudo apt-get -y -m install evolution echo -e "evolution" >> ~/.perfectminimal/logfile fi echo "Done." echo fi if [ "$EMAIL" = "2" ] ; then echo "Installing Thunderbird" sudo apt-get -y -m install thunderbird echo -e "thunderbird" >> ~/.perfectminimal/logfile echo "Done." echo fi if [ "$EMAIL" = "3" ] ; then echo "Installing Webmail integration" sudo apt-get -y -m install desktop-webmail echo -e "desktop-webmail" >> ~/.perfectminimal/logfile echo "Done." echo "You can pick from Gmail, Hotmail, Zoho, or Yahoo." echo fi # Media players if [ "$PLAYER" = "1" ] ; then echo "Installing Smplayer" sudo apt-get -y -m install smplayer echo -e "smplayer" >> ~/.perfectminimal/logfile echo "Done." echo fi if [ "$PLAYER" = "2" ] ; then echo "Installing VLC" sudo apt-get -y -m install vlc echo -e "vlc" >> ~/.perfectminimal/logfile if [ "$BROWSER" = "1" ] ; then sudo apt-get -y -m install mozilla-plugin-vlc echo -e "mozilla-plugin-vlc" >> ~/.perfectminimal/logfile fi echo "Done." echo fi if [ "$PLAYER" = "3" ] ; then if [ "$ENVIRONMENT" = "kde" ] ; then echo "Installing Amarok" sudo apt-get -y -m install amarok echo -e "amarok" >> ~/.perfectminimal/logfile else echo "Installing Banshee" sudo apt-get -y -m install banshee banshee-extension-ubuntuonemusicstore echo -e "banshee\nbanshee-extension-ubuntuonemusicstore" >> ~/.perfectminimal/logfile if [ "$AWN" = "1"] ; then sudo apt-get -y -m install banshee-extension-awn echo -e "banshee-extension-awn" >> ~/.perfectminimal/logfile fi if [ "$OSVER" != "lucid" ] ; then sudo apt-get -y -m install banshee-extension-zeitgeistdataprovider echo -e "banshee-extension-zeitgeistdataprovider" >> ~/.perfectminimal/logfile fi fi echo "Done." echo fi if [ "$PLAYER" = "4" ] ; then if [ "$PICKDE" = "6" -a "$OSVER" != "lucid" ] ; then echo "Installing Parole" sudo apt-get -y -m install parole browser-plugin-parole echo -e "parole" >> ~/.perfectminimal/logfile else echo "Installing Totem" sudo apt-get -y -m install totem echo -e "totem" >> ~/.perfectminimal/logfile if [ "$BROWSER" = "1" ] ; then sudo apt-get -y -m install totem-mozilla echo -e "totem-mozilla" >> ~/.perfectminimal/logfile fi fi echo "Done." echo fi if [ "$PLAYER" = "5" ] ; then echo "Installing Rhythmbox" sudo apt-get -y -m install rhythmbox rhythmbox-plugins rhythmbox-ubuntuone-music-store echo -e "rhythmbox\nrhythmbox-plugins\nrhythmbox-ubuntuone-music-store" >> ~/.perfectminimal/logfile echo "Done." echo fi # IM clients if [ "$IM" = "1" ] ; then echo "Installing Pidgin" sudo apt-get install -y -m pidgin echo -e "pidgin" >> ~/.perfectminimal/logfile fi if [ "$IM" = "2" ] ; then echo "Installing Emesene" sudo apt-get install -y -m emesene echo -e "emesene" >> ~/.perfectminimal/logfile fi if [ "$IM" = "3" ] ; then if [ "$ENVIRONMENT" = "kde" ] ; then echo "Installing Kopete" sudo apt-get install -y -m kopete echo -e "kopete" >> ~/.perfectminimal/logfile else echo "Installing Empathy" sudo apt-get install -y -m empathy echo -e "empathy" >> ~/.perfectminimal/logfile fi fi # Ubuntu One if [ "$UBUNTUONE" = "1" ]; then echo Installing Ubuntu One sudo apt-get -y -m install ubuntuone-client-gnome echo -e "ubuntuone-client-gnome" >> ~/.perfectminimal/logfile if [ "$OSVER" != "lucid" ] ; then sudo apt-get -y -m install ubuntuone-control-panel echo -e "ubuntuone-control-panel" >> ~/.perfectminimal/logfile fi echo Done. echo fi if [ "$FLASH" = "1" ]; then echo Closing your browser windows... killall -9 firefox killall -9 google-chrome-stable killall -9 chromium-browser killall -9 opera echo Removing your old Flash plugin... sudo apt-get --force-yes -y -m --purge remove flashplugin-nonfree adobe-flashplugin flashplugin-installer echo Installing Flash plugin installer... sudo apt-get --force-yes -y -m install flashplugin-installer echo -e "flashplugin-installer" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$MULTIMEDIA" = "1" ]; then echo Installing multimedia codecs... sudo apt-get --force-yes -y -m install libdvdread4 libxine1-ffmpeg non-free-codecs # Meta-package from Medibuntu sudo /usr/share/doc/libdvdread4/install-css.sh echo -e "libdvdread4\nlibxine1-ffmpeg\nnon-free-codecs" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$FONTS" = "1" ]; then echo Installing roughly a billion fonts... sudo apt-get -y -m install msttcorefonts echo -e "msttcorefonts" >> ~/.perfectminimal/logfile echo echo "NOTE: That should be the last EULA you'll have to deal with." echo "You can go get a coffee now while I finish up." echo "It's going to take a while." echo echo "Continuing with font installations..." sudo apt-get -y -m install ttf-gentium ttf-dustin ttf-georgewilliams ttf-sjfonts sun-java6-fonts ttf-larabie-deco ttf-larabie-straight ttf-larabie-uncommon ttf-linux-libertine ttf-mgopen ttf-sil-charis ttf-sil-doulos ttf-ubuntu-title gsfonts-x11 ttf-fifthhorseman-dkg-handwriting ttf-alee ttf-alee ttf-ancient-fonts ttf-arhangai ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gkai00mp ttf-arphic-ukai ttf-atarismall ttf-baekmuk ttf-bengali-fonts ttf-beteckna ttf-bpg-georgian-fonts ttf-breip ttf-devanagari-fonts ttf-dzongkha ttf-ecolier-court ttf-essays1743 ttf-f500 ttf-farsiweb ttf-freefarsi ttf-gfs-artemisia ttf-gfs-bodoni-classic ttf-gfs-complutum ttf-gfs-didot-classic ttf-gfs-gazis ttf-gfs-neohellenic ttf-gfs-solomos ttf-gfs-theokritos ttf-gujarati-fonts ttf-inconsolata ttf-indic-fonts ttf-isabella ttf-junicode ttf-kacst ttf-kannada-fonts ttf-khmeros ttf-kiloji ttf-kochi-gothic-naga10 ttf-kochi-mincho-naga10 ttf-konatu ttf-liberation ttf-manchufont ttf-marvosym ttf-mikachan ttf-mona ttf-mph-2b-damase ttf-nafees ttf-ocr-a ttf-oflb-euterpe ttf-oriya-fonts ttf-paktype ttf-punjabi-fonts ttf-radisnoir ttf-sazanami-gothic ttf-sazanami-mincho ttf-sil-abyssinica ttf-sil-andika ttf-sil-ezra ttf-sil-padauk ttf-sil-scheherazade ttf-sil-yi ttf-staypuft ttf-summersby ttf-tamil-fonts ttf-tmuni ttf-tuffy ttf-unfonts ttf-unfonts-extra ttf-uralic ttf-vlgothic ttf-wqy-zenhei ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac echo -e " ttf-gentium ttf-dustin ttf-georgewilliams ttf-sjfonts sun-java6-fonts ttf-larabie-deco ttf-larabie-straight ttf-larabie-uncommon ttf-linux-libertine ttf-mgopen ttf-sil-charis ttf-sil-doulos ttf-ubuntu-title gsfonts-x11 ttf-fifthhorseman-dkg-handwriting ttf-alee ttf-alee ttf-ancient-fonts ttf-arhangai ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gkai00mp ttf-arphic-ukai ttf-atarismall ttf-baekmuk ttf-bengali-fonts ttf-beteckna ttf-bpg-georgian-fonts ttf-breip ttf-devanagari-fonts ttf-dzongkha ttf-ecolier-court ttf-essays1743 ttf-f500 ttf-farsiweb ttf-freefarsi ttf-gfs-artemisia ttf-gfs-bodoni-classic ttf-gfs-complutum ttf-gfs-didot-classic ttf-gfs-gazis ttf-gfs-neohellenic ttf-gfs-solomos ttf-gfs-theokritos ttf-gujarati-fonts ttf-inconsolata ttf-indic-fonts ttf-isabella ttf-junicode ttf-kacst ttf-kannada-fonts ttf-khmeros ttf-kiloji ttf-kochi-gothic-naga10 ttf-kochi-mincho-naga10 ttf-konatu ttf-liberation ttf-manchufont ttf-marvosym ttf-mikachan ttf-mona ttf-mph-2b-damase ttf-nafees ttf-ocr-a ttf-oflb-euterpe ttf-oriya-fonts ttf-paktype ttf-punjabi-fonts ttf-radisnoir ttf-sazanami-gothic ttf-sazanami-mincho ttf-sil-abyssinica ttf-sil-andika ttf-sil-ezra ttf-sil-padauk ttf-sil-scheherazade ttf-sil-yi ttf-staypuft ttf-summersby ttf-tamil-fonts ttf-tmuni ttf-tuffy ttf-unfonts ttf-unfonts-extra ttf-uralic ttf-vlgothic ttf-wqy-zenhei ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac" >> ~/perfectminimal/logfile echo Done. echo fi if [ "$DVD" = "1" ]; then echo Installing DVD decoders and support files... sudo apt-get -y -m install libdvdread4 ffmpeg "w"$BIT"codecs" sudo /usr/share/doc/libdvdread4/install-css.sh echo -e "libdvdread4\nffmpeg\nw"$BIT"codecs" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$PRELOAD" = "1" ]; then echo Installing preload... sudo apt-get -y -m install preload echo -e "preload" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$AWN" = "1" ]; then echo Installing avant-window-navigator... sudo apt-get --force-yes -y -m install avant-window-navigator echo -e "avant-window-navigator" >> ~/.perfectminimal/logfile if [ "$OSVER" = "lucid" ] ; then sudo apt-get -y -m install awn-applets-c-extras awn-applets-python-extras echo -e "awn-applets-c-extras\nawn-applets-python-extras" >> ~/.perfectminimal/logfile fi if [ "$ENVIRONMENT" = "kde" ] ; then sudo apt-get install -y -m kde-window-manager echo -e "kde-window-manager" >> ~/.perfectminimal/logfile else sudo apt-get install -y -m compiz echo -e "compiz" >> ~/.perfectminimal/logfile fi echo Done. echo fi if [ "$MIRO" = "1" ]; then echo Installing Miro Internet TV... sudo apt-get --force-yes -y -m install miro echo -e "miro" >> ~/.perfectminimal/logfile echo Done. echo fi # Virtualbox from Oracle for Lucid, Natty if [ "$VIRTBOX" = "1" ]; then echo Installing VirtualBox 4... sudo apt-get --force-yes -y -m install virtualbox-4.1 dkms echo -e "virtualbox-4.1\ndkms" >> ~/.perfectminimal/logfile echo Done. echo fi # Virtualbox from repos for Lucid, Natty if [ "$VIRTBOX" = "2" ]; then echo Installing VirtualBox Open Source Edition... sudo apt-get --force-yes -y -m install virtualbox-ose dkms virtualbox-guest-additions echo -e "virtualbox-ose\ndkms\nvirtualbox-guest-additions" >> ~/.perfectminimal/logfile echo Done. echo fi # Virtualbox from repos for Oneiric and later if [ "$VIRTBOX" = "3" ]; then echo Installing VirtualBox... sudo apt-get --force-yes -y -m install virtualbox dkms echo -e "virtualbox\ndkms" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$COMPRESSION" = "1" ]; then echo "Installing support for multiple archive types in file-roller..." sudo apt-get -y -m install lzma unrar rar p7zip p7zip-full p7zip-rar echo -e "lzma\nunrar\nrar\np7zip\np7zip-full\np7zip-rar" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$WINE" = "1" ]; then echo Installing wine... sudo apt-get -y -m install wine echo -e "wine" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$SKYPE" = "1" ]; then echo Installing Skype... sudo apt-get -y -m install skype echo -e "skype" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$SPAM" = "1" ]; then echo Installing spam filters... sudo apt-get -y -m install spamassassin spamc echo -e "spamassassin\nspamc" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$BROWSER" = "1" ]; then echo "Installing Firefox..." sudo apt-get -y -m install firefox echo -e "firefox" >> ~/.perfectminimal/logfile echo Done. echo echo fi if [ "$BROWSER" = "3" ]; then echo "Installing Google Chrome" sudo apt-get -y -m install google-chrome-stable echo -e "google-chrome-stable" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$BROWSER" = "4" ]; then echo "Installing Opera" sudo apt-get -y -m install opera echo -e "opera" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$BROWSER" = "2" ]; then echo "Installing Chromium" sudo apt-get -y -m install chromium-browser echo -e "chromium-browser" >> ~/.perfectminimal/logfile echo Done. echo fi # CCSM allows you to customize your special effects and all settings in Compiz. if [ "$CCSM" = "1" ]; then echo 'Installing CCSM advanced visual effects for Compiz Fusion...' sudo apt-get -y -m install compizconfig-settings-manager fusion-icon echo -e "compizconfig-settings-manager\nfusion-icon" >> ~/.perfectminimal/logfile echo Done. echo fi # Emerald Window Decorator allows you to customize your windows in Compiz. if [ "$EWD" = "1" ]; then echo "Installing Emerald Window Decorator for Compiz Fusion..." sudo apt-get -y -m install emerald echo -e "emerald" >> ~/.perfectminimal/logfile echo Done. echo fi # GNOME Do is an intelligent application and file launcher tool. if [ "$GNOMEDO" = "1" ]; then echo "Installing GNOME Do application and file launcher..." sudo apt-get -y -m install gnome-do echo -e "gnome-do" >> ~/.perfectminimal/logfile echo Done. echo fi # Synapse replaces Gnome Do on newer versions if [ "$SYNAPSE" = "1" ]; then echo "Installing Synapse application and file launcher..." sudo apt-get -y -m install synapse echo -e "synapse" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$UBUNTUTWEAK" = "1" ]; then echo Installing ubuntu-tweak... sudo apt-get -y -m install ubuntu-tweak echo -e "ubuntu-tweak" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$CAFFEINE" = "1" ]; then echo Installing caffeine... sudo apt-get -y -m install caffeine echo -e "caffeine" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$MEDIACENTRE" = "1" ]; then echo Installing XBMC... sudo apt-get -y -m install xbmc xbmc-standalone echo -e "xbmc\nxbmc-standalone" >> ~/.perfectminimal/logfile echo Done. echo fi if [ "$MEDIACENTRE" = "2" ]; then echo Installing Moovida... sudo apt-get -y -m install moovida echo -e "moovida" >> ~/.perfectminimal/logfile echo Done. echo fi # Check logs? echo "--------------------------------" >> ~/.perfectminimal/logfile echo echo echo "All done. Enjoy your new system!" read -p "Do you want to view the list of packages you just installed? (y/N) " if [ "$REPLY" = "Y" -o "$REPLY" = "y" ] ; then cat ~/.perfectminimal/logfile echo -en $GREEN echo -e "The log file containing this list is at ~/.perfectminimal/logfile" echo -en $WHITE fi # Update system echo -en $GREEN echo # if [ "$OSVER" != "lucid" ]; then # echo -e "This script has added the Updates and Backports repositories\nThis means that there may now be updates available for packages that were already installed before you ran it." # read -p "Do you want to update those packages? (Y/n) " # if [ "$REPLY" != "N" -a "$REPLY" != "n" ] ; # then sudo apt-get install -y -m aptitude # echo -e "aptitude" >> ~/.perfectminimal/logfile # sudo aptitude safe-upgrade # fi #fi echo echo echo -en $WHITE # Submit stats? # echo # echo "Data on what packages people install with this script would be awesome." # read -p "Do you want to help by anonymously submitting your log file to the script maintainer? (y/N) " # if [ "$REPLY" = "y" -o "$REPLY" = "Y" ] ; then # sudo apt-get install -y -m curl # curl -T ~/.perfectminimal/logfile http://www.andyduffell.com/perfectminimal_logs/ # else # send dummy notice # fi # Test to see if we're running from a startup script, and if so disable it if [ -f /etc/init.d/perfectminimal ] then sudo chmod -x /etc/init.d/perfectminimal fi ## Setting sudo timeout back to default sudo sed -i -e "s/Defaults passwd_timeout=360//g" /etc/sudoers # Start graphical session? echo read -p "Do you want to start your desktop environment now? (Y/n) " if [ "$REPLY" != "n" -a "$REPLY" != "N" ] ; then if [ "$PICKDE" = "3" -o "$PICKDE" = "4" -o "$PICKDE" = "12" ] ; then sudo service kdm start elif [ "$PICKDE" = "7" -o "$PICKDE" = "8" ] ; then sudo service lxdm start ## ubuntu-desktop on Lucid and Natty uses GDM elif [ "$OSVER" = "lucid" -o "$OSVER" = "natty" -a "$PICKDE" = "1" ] ; then sudo service gdm start else sudo service lightdm start fi else echo "Returning you to the command line..." fi fi sleep 3