#!/bin/sh
#
# Install a series of packages in Ubuntu 8.10 64 bit
# You will need to run this script as root with 755 permission
# This script has been tested with Intrepid Ibex 64 bit ONLY, I cannot guarantee it will work with other distros
#
# Authored by Bob Nelson  admin@stchman.com
#
# All of the apt-get installs will use the -y switch to assume yes to all prompts.
# All dependencies will be installed as well

script_name="intrepid64_script.sh"

# Script must run as root 
if [ $USER != "root" ]; then
	echo "You need to run this script as root."
	echo "Use 'sudo ./$script_name' then enter your password when prompted."
	exit 1
fi

# Update the package manager
sudo apt-get update

# Install nautilus-open-terminal - open a  terminal in a specific folder in nautilus 
sudo apt-get -y install nautilus-open-terminal

# Install build-essential - C/C++ headers
sudo apt-get -y install build-essential

# Install alien - convert packages to another package, i.e. .rpm to .deb
sudo apt-get -y install alien 

# Install gtkorphan - clean up unused orphaned packages
sudo apt-get -y install gtkorphan

# Install hex editors
sudo apt-get -y install ghex

# Install Gnome hearts
sudo apt-get -y install gnome-hearts

# Install gstreamer plugins for audio/video playback, mp3, mpeg2, mpeg4, etc.
sudo apt-get -y install gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse

# Install VLC media player and the mozilla plugin
sudo apt-get -y install vlc mozilla-plugin-vlc

# Install WINE, WINE is now in the hardy repositories
# install wine and cabextract packages
sudo apt-get -y install wine cabextract

# Add Medibuntu to your software sources
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

# Add the Medibuntu gpg key
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

# Update the software list
sudo apt-get update

# install the CSS decryption key from Medibuntu
sudo apt-get -y install libdvdcss2

# Since Acrobat Reader was removed from the repositories since Edgy we will get it from Medibuntu
# Install Acrobat Reader 8
sudo apt-get -y install acroread acroread-plugins

# Install K3B CD/DVD burning program and the extracodecs plugin
sudo apt-get -y install k3b libk3b2-extracodecs

# Install K9Copy for ripping encrypted DVDs
sudo apt-get -y install k9copy

# Install ntfs-config and ntfs-3g, this allows reading and writing to NTFS partitions
# ntfs-3g is installed by default in Hardy
sudo apt-get -y install ntfs-config

# Install Gnome Partition Manager
sudo apt-get -y install gparted

# Install Graphical FTP program Filezilla
sudo apt-get -y install filezilla

# Install the Microsoft core fonts (i.e. Arial, Times New Roman, etc.)
sudo apt-get -y install msttcorefonts

# Install open Java JDK, JRE, and browser plugin
sudo apt-get -y install openjdk-6-jdk icedtea6-plugin

# Install the rar and unrar plugin to allow Archive Manager handle .rar files
sudo apt-get -y install rar unrar

# Install 7zip plugin to allow Archive Manager to handle .7z compression
sudo apt-get -y install p7zip p7zip-full

# Install MP3 and OGG ID3 tag editor
sudo apt-get -y install tagtool

# Install bittorrent client Ktorrent
sudo apt-get -y install ktorrent

# Install Adobe Flash 10, this will enable flash playback in your web browser
# This is the 32 bit plugin using nspluginwrapper.
# Note, there is a Flash 10 plugin available for native 64 bit.
# Get the plugin here: http://labs.adobe.com/downloads/flashplayer10.html
# unzip the archive to your ~/.mozilla/plugins folder
# Do not install the flsahplugin-nonfree if you use Flash 10 64 bit
sudo apt-get -y install flashplugin-nonfree

# Install Gwenview Image viewer
sudo apt-get -y install gwenview

# Install glipper clipboard manager
sudo apt-get -y install glipper

# Install Bluefish Programmers/HTML editor
sudo apt-get -y install bluefish

# Install Kompozer WYSIWYG HTML editor
sudo apt-get -y install kompozer

# Install Sysinfo system notification
sudo apt-get -y install sysinfo

# Install mail notification
sudo apt-get -y install mail-notification

# Install Thunderbird 2 Email client
sudo apt-get -y install mozilla-thunderbird

# Install Splash Screen editor
sudo apt-get -y install gnome-splashscreen-manager

# Install StartUpManager GUI package
sudo apt-get -y install startupmanager

# Install Audacious media player
sudo apt-get -y install audacious

# Install the Openoffice.org 2.4 Java plugin, this allows OO 2.4 to use Java
sudo apt-get -y install openoffice.org-java-common

# Install KDE tools kcontrol and khelpcenter for KDE 3.5
sudo apt-get -y install kcontrol khelpcenter

# Since Compiz is installed by default install a settings manager
sudo apt-get -y install compizconfig-settings-manager

# Install Geany
sudo apt-get -y install geany

###################################################
# Install the Tahoma fonts to the msttcorefonts folder
# Since Tahoma does not come with msttcorefont, we will install them manually
# Change to the users home folder
cd ~

# get the tahoma.zip file from www.stchman.com
wget http://www.stchman.com/tools/MS_fonts/tahoma.zip

# extract the .zip achive to the msttcorefonts folder
sudo unzip -d /usr/share/fonts/truetype/msttcorefonts ~/tahoma.zip

# update the font cache
sudo fc-cache -f -v

# remove the .zip file as it is no longer needed
rm -r -f ~/tahoma.zip
###################################################

####################################################
# Add regular expression capability to Gedit
# Change to users home folder
cd ~

# Get the regex plugin from www.stchman.com
wget http://www.stchman.com/tools/regexsearch_gedit_plugin.tar.gz

# Unpack the archive into the /usr/lib/gedit-2/plugins folder
sudo tar -C /usr/lib/gedit-2/plugins -xvzf ~/regexsearch_gedit_plugin.tar.gz

# Remove the archive from the home folder as it is no longer needed
rm -f ~/regexsearch_gedit_plugin.tar.gz
#####################################################

#####################################################
# Install the Lucida fonts since we won't be installing sun-java6-fonts
# Change to users home directory
cd ~

# get the tahoma.zip file from www.stchman.com
wget http://www.stchman.com/tools/LucidaFonts.tar.gz

# Make a lucida-ttf directory
sudo mkdir /usr/share/fonts/truetype/lucida-ttf

# extract the .tar.gz achive to the the lucida-ttf folder
sudo tar -C /usr/share/fonts/truetype/lucida-ttf -zxvf ~/LucidaFonts.tar.gz

# update the font cache
sudo fc-cache -f -v

# remove the .zip file as it is no longer needed
rm -r -f ~/LucidaFonts.tar.gz
###################################################

