Ubuntu 10.04 kohandusskript
|
Täienda seda artiklit, kui oskad! |
Kohanduskript paigaldab Ubuntu 10.04 Lucid Lynx'ile opsüsteemis vaikimisi puuduvad multimeediafailide mängimiseks vajalikud koodekid, Java- ja Flash-plugina, Eesti ID-kaardi toe (nii 32- kui 64-bitise Ubuntu jaoks), ning rea programme, nt GIMP, VLC, Thunderbird jt.
Kasutamine
Skript on mõeldud ühekordseks kasutamiseks, kuid seda võib ka korduvalt kasutada, nt nende programmide paigaldamiseks mida te esimesel korral ei valinud, tingimusel et jätate märgistamata need kontrollkastid mida olete varem kasutanud. Skripti viimane versioon võimaldab ka tehtud seadistusi eemaldada. Esialgse versiooni autori (Alin Andrei) selgituse kohaselt töötab skript veatult ainult kõvakettale paigaldatud Ubuntu korral.
Soovitused
Skripti abil saab paigaldada hulga lisasid. Loogiline oleks sisse lülitada Koodekid ja lisad, VLC, MPlayer jne (keegi võiks siin soovitatavaid valikuid täpsustada ja täiendada!!!).
Kasu võib olla Arvo Mäe soovitustest, kuigi need käivad skripti natuke vanema versiooni kohta.
Sammud käivitamiseks
- Kõigepealt tuleks paigaldada süsteemi uuendused. Seisuga 07.05.10 oli neid 45. Kuu aega pärast Ubuntu 10.04 ilmumist on neid arvatavasti üle saja.
- Hankida endale skriptifail ja see kävitada.
Hetkel saab skripti viimase versiooni käivitada, kui kopeerida need käsud terminaliaknasse:
wget http://lepo.it.da.ut.ee/~p6der/ubuntu-lucid-kohandusskript.sh
chmod +x ubuntu-lucid-kohandusskript.sh
sudo ./ubuntu-lucid-kohandusskript.sh
Osad skripti toimetustest võtavad päris kaua aega. Ei maksa tegevust ilmaasjata katkestada isegi siis, kui näib, et parajasti midagi ei toimu.
Täiendajale
Kes skripti täiendab, see vastutab, et 1) see töötab ja 2) viimane versioon on kuskile üles pandud ja on käivitatav ülaloleva kolme käsu abil. Käske ja aadresse tuleb muidugi muuta, kui vaja.
Vaata täpsemalt
Kohandusskript ise
#!/bin/bash
# Script which should help users install / tweak some stuff immediately
# after installing Ubuntu 10.04 Lucid Lynx 32bit and 64bit.
#
# version 0.4.9.4
#
# The script comes with no warranty. The author is not responsible if
# your system breaks.
#
##
## Copyright (C) 2010 Tramm, http://viki.pingviin.org/Kasutaja:Tramm
## Copyright (C) 2010 Alin Andrei, http://www.webupd8.org
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
#####################
#Credits:
#andreineculau.com for original Pidgin icons, Mongi Gazelle for the sharp fonts script.
#based on the idea of: http://czytelnia.ubuntu.pl/index.php/2009/11/03/skrypt-ulatwiajacy-konfiguracje-ubuntu-9-10-karmic-koala/, but Ubuntu Start is a completely re-written script with lots of new features.
#####################
#Options explainations:
#Move window buttons to the right (karmic style) - will move the metacity window buttons to the right side, in the following order: Minimize, Maximize, Close
#Change Update Manager behavior to the one in Jaunty - Ubuntu 9.04 (and newer) introduced a change to the handling of package updates, launching update-manager directly instead of displaying a notification icon in the GNOME panel. Users will still be notified of security updates on a daily basis, but for updates that are not security-related, users will only be prompted once a week. This tweak makes the update-manager not pop-up, but always show the updates in the notification area.
#Remove mounted drive icons from desktop - removes ntfs and usb drives from the desktop; usually when mounting a drive it shows up on the desktop
#Disable the GDM login sound - all the sounds in Ubuntu can be turned off from a GUI except this one. This is the sound produced when the GDM login screen loads.
#Enable the icons in menus and buttons - the icons in menus and buttons were removed in Gnome 2.28 (starting with Ubuntu Karmic). However, up until Lucid, users were able to enable these from the Appearence dialog preferences. This is no longer possible so use this tweak instead.
#Disable the GDM login user list - in Lucid, the users are displayed in the GDM login screen (which IMO is a security concern). This fix will make no user show up in this list, and for logging in you must enter your username and password manually.
#Change Gnome Calendar first day of the week from Sunday to Monday tweak - Gnome Calendar comes with Sunday as the first day of the week if the user has en_US language and there's no GUI way to change this. This tweak fixes this for non-US citizens using en_US Ubuntu (only use for en_US Ubuntu!)
#Remove the ubuntu-docs package (frees up 252MB): removed the ubuntu-docs package to free up 252 MB of disk space.
#Install and configure sharp fonts: info about this feature, here: http://www.webupd8.org/2009/09/ubuntu-debian-script-to-install-sharp.html
#Fix 'apt-get update' delay for Google Chrome repository - when downloading Google Chrome .deb, it automatically adds the Google Chrome repository. This repository has a known issue which cause "sudo apt-get update" to take a very long time to complete. This tweak fixes this issue.
#Add additional repositories (GetDeb, Medibuntu etc.) - Adds the following repositories: Getdeb, Medibuntu, Ubuntu universe and multiverse and Lucid partner.
########
#The second dialog - install packages.
TRUETYPEPATH="/usr/share/fonts/truetype/"
ROOT_UID=0
#uncomment the following line if the script doesn't run with your language
#export LC_CTYPE="en_US.UTF-8"
#running gconf-tool2 with "sudo" fails to set the options for the current user so this tweak makes it possible to run sudo for gconf-tool2 and change the setting for the current user, not the root user
ON_USER=$(echo ~ | awk -F'/' '{ print $1 $2 $3 }' | sed 's/home//g')
export $(grep -v "^#" ~/.dbus/session-bus/`cat /var/lib/dbus/machine-id`-0)
if sudo -u $ON_USER test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
eval `sudo -u $ON_USER dbus-launch --sh-syntax --exit-with-session`
fi
#turn these on for debugging:
#echo $ON_USER
#echo $DBUS_SESSION
#echo $DBUS_SESSION_BUS_ADDRESS
#echo $DBUS_SESSION_BUS_WINDOWID
#echo $DBUS_SESSION_BUS_PID
##start language implementation
WORD1="Viga"
WORD2="Viga: Sa ei kasuta 32 või 64 bitist Ubuntu 10.04 Lucid Lynxi"
WORD3="Viga: Sa ei kasuta Ubuntu 10.04 Lucid Lynxi"
WORD4="Sul peavad olema superkasutaja õigused selle programmi käivitamiseks. Proovi: sudo ./ubuntu-10.04-script"
WORD5="Installeerimine ei tööta. Palun sulgeda"
WORD6="ja proovida uuesti."
WORD7="<b>Viga:</b> Sul puudub internetiühendus aga selekteeritud valik nõuab ligipääsu internetile. Palun seadista oma ühendus ja proovi uuesti."
WORD8="1. Samm: Seadistused, parandused ja tarkvaraallikad"
WORD9="Tähtis: \n\n1. Kui sa ei selekteeri 'Lisa täiendavaid tarkvaraallikaid' valikut, pole võimalik \ninstalleerida teatud pakke 2. Sammus. \n\n2. Mõnede seadete jõustumiseks pead välja ja sisse logima (aga ainult peale \n1. ja 2. Sammu lõpetamist!).\n\n3. Selekteerides \"Lähtesta\" tühistab sinu seatud valiku. Ära vali korraga \nseadet ja lähtestamisvalikut! \n\nValik:"
WORD10="Valitud"
WORD11="Seadistus"
WORD12="Liiguta aknanupud paremale (Karmic'u stiil)"
WORD13=">> Lähtesta: \"Liiguta aknanupud paremale (Karmic'u stiil)\""
WORD14="Muuda Update Manageri käitumine Jaunty sarnaseks"
WORD15=">> Lähtesta: \"Muuda Update Manageri käitumine Jaunty sarnaseks\""
WORD16="Eemalda haagitud draivide ikoonid töölaualt"
WORD17=">> Lähtesta: \"Eemalda haagitud draivide ikoonid töölaualt\""
WORD18="Keela GDM sisselogimisheli"
WORD19=">> Lähtesta: \"Keela GDM sisselogimisheli\""
WORD20="Luba ikoonid menüüdes ja nuppudel"
WORD21=">> Lähtesta: \"Luba ikoonid menüüdes ja nuppudel\""
WORD22="Keela GDM kasutajate nimekiri sisselogimisel"
WORD23=">> Lähtesta \"Keela GDM kasutajate nimekiri sisselogimisel\""
WORD24="Muuda Gnome Kalendri esimene nädalapäev Pühapäevalt Esmaspäevaks"
WORD25=">> Lähtesta: \"Muuda Gnome Kalendri esimene nädalapäev Pühapäevalt Esmaspäevaks\""
WORD26="Eemalda ubuntu-docs pakk (vabastab 252MB)"
WORD27=">> Lähtesta \"Eemalda ubuntu-docs pakk (vabastab 252MB)\""
WORD28="Paigalda ja seadista teravad fondid (kaasaarvatud Firefox)"
WORD29=">> Lähtesta: \"Paigalda ja seadista teravad fondid (kaasaarvatud Firefox)\""
WORD30="Paranda 'apt-get update' viivitus Google tarkvaraallikal"
WORD31=">> Lähtesta: \"Paranda 'apt-get update' viivitus Google tarkvaraallikal\""
WORD32="Haagi NTFS draivid käivitamisel automaatselt"
WORD33=">> Lähtesta: \"Haagi NTFS draivid käivitamisel automaatselt\""
WORD34="Lisa täiendavaid tarkvaraallikaid (GetDeb, Medibuntu jne)"
WORD35="Lokaat"
WORD36="Gnome Kalendri esimene \nnädalapäev on seatud Esmaspäevale. Palun \nsisesta oma riigi lokaat (nt. et_EE, en_GB \njne) - see seadistus nõuab seda. \n\nKui sa ei sisesta oma valikut, siis kasutatakse \"en_GB\" lokaati."
WORD37="Sa nõudsid Teravate Fontide (Sharp Fonts) paigaldamist. See võib võtta aega paar minutit olenevalt sinu internetiühendusest. \n\n Kliki OK, et jätkata!"
WORD38="Palun oodata kuni testitakse põhi Medibuntu ja GetDeb serverit ja peegleid (peaks võtma umbes ~20 sekundit). Kui see on läbi, ilmub uus aken 2. Samm: Pakkide paigaldus. nn Kliki OK, et jätkata!"
WORD39="Valmis! Võime edasi liikuda 2. Sammu."
WORD40="2. Samm: Pakkide paigaldus"
WORD41="Vali paigaldatavad pakid:"
WORD42="Pakk"
WORD43="Kirjeldus"
WORD44="Pildiredaktor"
WORD45="Pidgin (sisaldab algseid smaile)"
WORD46="Mitme protokolliga IM programm"
WORD47="Käivita Windowsi programme Linuxis"
WORD48="MacOS X sarnane dokk Gnome'ile"
WORD49="Avatud lähtekoodiga brauser"
WORD50="Täiendavad teemad"
WORD51="Paigaldab kommuuni- ja Bisigi teemad"
WORD52="Kiirkäivitaja"
WORD53="Quake sarnane terminali emulaator"
WORD54="Multimeediamängija"
WORD55="Multimeediamängija (MPlayeri kasutajaliides)"
WORD56="Emaili programm"
WORD57="Koodekid ja lisad"
WORD58="Koodekid (multimeedia, java, flash), täiendav toetus arhiivitüüpidele, DVD toetus ja fondid"
WORD59="Seadista Ubuntut ja lisa paljusid täiendavad tarkvaraallikaid (PPAd)"
WORD60="Mitut OS-i toetav pilve sünkroneerimisprogramm"
WORD61="BitTorrenti klientprogramm"
WORD62="CCSM ja täiendavad pluginad"
WORD63="CompizConfig Settings Manager ja täiendavad pluginad"
WORD64="VoIP vestlusprogramm"
WORD65="Google brauser"
WORD66="Google Earth laseb sul lennata maakeral ükskõik kuhu"
WORD67="Arendustööriistad"
WORD68="build-essential'ist Subversion'ini, GIT jne"
WORD69="Pakkide allalaadimine ja paigaldamine algab. Palun ära lülita oma arvutit välja enne kui see skript on lõpetanud. \n\nKliki OK, et alustada!"
WORD70="Vali paigaldatav dokk"
WORD71="Vali üks või rohkem paigaldatavat dokki:"
WORD72="Lisa arendusjärgus Docky PPA ja paigalda Docky (2.1.0)"
WORD73="Paigada Cairo dokk (GLX Dock)"
WORD74="Paigalda Avant Window Navigator (AWN)"
WORD75="Valmis! Palun logi välja ja uuesti sisse (mõned valitud seaded nõuavad seda). \n\nVigadest teatamiseks ja ettepanekuteks palun külastada:"
WORD76="Valmis! Kõik valitud paketid on paigaldatud. \n\nVigadest teatamiseks ja ettepanekuteks palun külastada:"
WORD77="Keela IPv6"
WORD78=">> Lähtesta: \"Disable IPv6\""
WORD79=""
WORD_ID1="Paigalda Eesti ID-kaardi tugi"
WORD_ID2=">> Lähtesta: \"$WORD_ID1\""
#debugging
#echo "$WORD1"
#echo "$WORD2"
#echo "$WORD3"
##end language implementation
#check if the user is running Lucid 32 or 64bit
if [ "lucid" = `lsb_release -cs` ]; then
if [ "i686" = `uname -m` ]; then
echo using Ubuntu 10.04 Lucid Lynx - ok
arch=i386
elif [ "x86_64" = `uname -m` ]; then
echo using Ubuntu 10.04 Lucid Lynx - ok
arch=amd64
else
/usr/bin/zenity --warning --title="$WORD1" --text="$WORD2"
echo You are not using Ubuntu 10.04 Lucid Lynx 32bit or 64bit, exiting
exit
fi
else
/usr/bin/zenity --warning --title="$WORD1" --text="$WORD3"
echo You are not using Ubuntu 10.04 Lucid Lynx, exiting
exit
fi
# needs to be run with sudo
if [ "$UID" -ne "$ROOT_UID" ];
then
/usr/bin/zenity --warning --title="$WORD1" --text="$WORD4"
echo "Exiting ... please run the script with sudo (eg: sudo ./ubuntu-10.04-script)"
exit
fi
# check if there are applications running which can interfere with the script
sleep 1
for lock in synaptic update-manager software-center apt-get dpkg aptitude
do
if ps -U root -u root u | grep $lock | grep -v grep > /dev/null;
then
echo "Installation won't work. Please close $lock first then try again.";
/usr/bin/zenity --warning --title="$WORD1" --text="$WORD5 $lock $WORD6"
exit
fi
done
#check if the user has an active internet connection
function testConnection()
{
testconnection=`wget --tries=3 --timeout=15 www.google.com -O /tmp/testinternet &>/dev/null 2>&1`
if [ $? != 0 ]; then
echo "You are not connected to the Internet. Please check your Internet connection and try again."
/usr/bin/zenity --info --text="$WORD7"
else
echo Internet connection - ok
fi
}
#gui 1
choicess=`/usr/bin/zenity --title="$WORD8" --width=500 --height=450 \
--text="$WORD9" \
--list --column="$WORD10" --column="$WORD11" \
--checklist FALSE "$WORD12" FALSE "$WORD13" FALSE "$WORD14" FALSE "$WORD15" FALSE "$WORD16" FALSE "$WORD17" FALSE "$WORD18" FALSE "$WORD19" FALSE "$WORD20" FALSE "$WORD21" FALSE "$WORD22" FALSE "$WORD23" TRUE "$WORD24" FALSE "$WORD25" FALSE "$WORD26" FALSE "$WORD27" FALSE "$WORD28" FALSE "$WORD29" TRUE "$WORD30" FALSE "$WORD31" FALSE "$WORD32" FALSE "$WORD33" TRUE "$WORD_ID1" FALSE "$WORD_ID2" TRUE "$WORD34"`
if [ $? -eq 0 ];
then
IFS="|"
for choicee in $choicess
do
if [ "$choicee" = "$WORD12" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --type string --set /apps/metacity/general/button_layout ":minimize,maximize,close"
elif [ "$choicee" = "$WORD13" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --type string --set /apps/metacity/general/button_layout "close,minimize,maximize:"
elif [ "$choicee" = "$WORD14" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/update-notifier/auto_launch false
elif [ "$choicee" = "$WORD15" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/update-notifier/auto_launch true
elif [ "$choicee" = "$WORD16" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/nautilus/desktop/volumes_visible false
elif [ "$choicee" = "$WORD17" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/nautilus/desktop/volumes_visible true
elif [ "$choicee" = "$WORD18" ];
then
sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
elif [ "$choicee" = "$WORD19" ];
then
sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool true
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool true
elif [ "$choicee" = "$WORD20" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --set /desktop/gnome/interface/buttons_have_icons --type bool true
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --set /desktop/gnome/interface/menus_have_icons --type bool true
elif [ "$choicee" = "$WORD21" ];
then
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --set /desktop/gnome/interface/buttons_have_icons --type bool false
sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool-2 --set /desktop/gnome/interface/menus_have_icons --type bool false
elif [ "$choicee" = "$WORD22" ];
then
sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true
elif [ "$choicee" = "$WORD23" ];
then
sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list false
elif [ "$choicee" = "$WORD24" ];
then
timee=$(cat /etc/default/locale | grep "LC_TIME")
if [ ! $timee ]; then
# Automaatselt kohe Eesti lokaat, mis siin ikka küsida
echo "LC_TIME=\"et_EE.UTF-8\"" | sudo tee -a /etc/default/locale > /dev/null
# A.Mägi soovitus
sed -r -i -e "s/weekday 1/weekday 2/" /usr/share/i18n/locales/et_EE
locale-gen
else
echo "You already have custom values for LC_TIME, skipping this tweak"
fi
elif [ "$choicee" = "$WORD25" ]; # Pole aimugi, kas see jäi tööle
then
sudo rm /etc/default/locale_back > /dev/null 2>&1; sudo cp /etc/default/locale /etc/default/locale_back; cat /etc/default/locale_back | sudo sed -e '/^LC_TIME.*/d' > /etc/default/locale; sudo rm /etc/default/locale_back > /dev/null 2>&1;
elif [ "$choicee" = "$WORD_ID1" ];
then
# https://launchpad.net/~boamaod/+archive/ubuntu-idkaart
# http://viki.pingviin.org/ID-kaardi_automaatne_seadistamine
sudo add-apt-repository ppa:boamaod/ubuntu-idkaart
sudo apt-get update
sudo apt-get install -y --force-yes ubuntu-idkaart-allikad
sudo apt-get install -y --force-yes ubuntu-idkaart-paigaldus
elif [ "$choicee" = "$WORD_ID2" ];
then
sudo apt-get remove -y --force-yes ubuntu-idkaart-allikad
sudo apt-get remove -y --force-yes ubuntu-idkaart-paigaldus
elif [ "$choicee" = "$WORD26" ];
then
sudo apt-get remove -y --force-yes ubuntu-docs
elif [ "$choicee" = "$WORD27" ];
then
sudo apt-get -y --force-yes install ubuntu-docs
elif [ "$choicee" = "$WORD28" ];
then
testConnection
/usr/bin/zenity --info --text="$WORD37"
cd /tmp
echo "Installing Sharpfonts. This may take a few minutes depending on connection speed..."
# download and install the cabextract tool
echo "Installing the cabextract tool..."
sudo apt-get install -y --force-yes cabextract
# Download all needed fonts
wget http://sharpfonts.com/fonts/andale32.exe
wget http://sharpfonts.com/fonts/arial32.exe
wget http://sharpfonts.com/fonts/arialb32.exe
wget http://sharpfonts.com/fonts/comic32.exe
wget http://sharpfonts.com/fonts/courie32.exe
wget http://sharpfonts.com/fonts/georgi32.exe
wget http://sharpfonts.com/fonts/impact32.exe
wget http://sharpfonts.com/fonts/tahoma32.exe
wget http://sharpfonts.com/fonts/times32.exe
wget http://sharpfonts.com/fonts/trebuc32.exe
wget http://sharpfonts.com/fonts/verdan32.exe
wget http://sharpfonts.com/fonts/webdin32.exe
# create the needed directory if it is not existing
if [ ! -d $TRUETYPEPATH ]; then
mkdir -p $TRUETYPEPATH
fi
# Extract all fonts to the truetype directory
cabextract -d /usr/share/fonts/truetype/ andale32.exe arial32.exe arialb32.exe comic32.exe courie32.exe georgi32.exe impact32.exe tahoma32.exe times32.exe trebuc32.exe verdan32.exe webdin32.exe
# Download the xml files and extract the configuration files into /etc/fonts/
wget http://sharpfonts.com/fontconfig.tbz
tar xvjpf fontconfig.tbz -C /etc/fonts/
rm -r /tmp/*.exe > /dev/null 2>&1;
rm /tmp/fontconfig.tbz > /dev/null 2>&1;
#Firefox sharp fonts
touch ~/.fonts.conf
echo "<?xml version=\"1.0\"?><!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">" | tee ~/.fonts.conf
echo "<fontconfig>" | tee -a ~/.fonts.conf
echo "<match target=\"font\" >" | tee -a ~/.fonts.conf
echo "<edit mode=\"assign\" name=\"rgba\" >" | tee -a ~/.fonts.conf
echo "<const>rgb</const>" | tee -a ~/.fonts.conf
echo "</edit>" | tee -a ~/.fonts.conf
echo "</match>" | tee -a ~/.fonts.conf
echo "<match target=\"font\" >" | tee -a ~/.fonts.conf
echo "<edit mode=\"assign\" name=\"hinting\" >" | tee -a ~/.fonts.conf
echo "<bool>true</bool>" | tee -a ~/.fonts.conf
echo "</edit>" | tee -a ~/.fonts.conf
echo "</match>" | tee -a ~/.fonts.conf
echo "<match target=\"font\" >" | tee -a ~/.fonts.conf
echo "<edit mode=\"assign\" name=\"hintstyle\" >" | tee -a ~/.fonts.conf
echo "<const>hintfull</const>" | tee -a ~/.fonts.conf
echo "</edit>" | tee -a ~/.fonts.conf
echo "</match>" | tee -a ~/.fonts.conf
echo "<match target=\"font\" >" | tee -a ~/.fonts.conf
echo "<edit mode=\"assign\" name=\"antialias\" >" | tee -a ~/.fonts.conf
echo "<bool>true</bool>" | tee -a ~/.fonts.conf
echo "</edit>" | tee -a ~/.fonts.conf
echo "</match>" | tee -a ~/.fonts.conf
echo "</fontconfig>" | tee -a ~/.fonts.conf
chown $ON_USER ~/.fonts.conf
echo "Sharp fonts installation finished... Please remember to logout and login again"
elif [ "$choicee" = "$WORD29" ];
then
rm /etc/fonts/alias.conf /etc/fonts/local.conf /etc/fonts/misc.conf /etc/fonts/msfonts-rules.conf ~/.fonts.conf > /dev/null 2>&1;
elif [ "$choicee" = "$WORD30" ];
then
echo "Acquire::http::Pipeline-Depth \"0\";" | sudo tee -a /etc/apt/apt.conf.d/90localsettings > /dev/null
elif [ "$choicee" = "$WORD31" ];
then
sudo rm /etc/apt/apt.conf.d/90localsettings_back > /dev/null 2>&1; sudo cp /etc/apt/apt.conf.d/90localsettings /etc/apt/apt.conf.d/90localsettings_back; cat /etc/apt/apt.conf.d/90localsettings_back | sudo sed -e '/^Acquire::http::Pipeline-Depth.*/d' > /etc/apt/apt.conf.d/90localsettings; sudo rm /etc/apt/apt.conf.d/90localsettings_back > /dev/null 2>&1;
elif [ "$choicee" = "$WORD32" ];
then
sudo apt-get -y --force-yes install ntfs-3g
if [ $(cat /etc/fstab | grep '^[^#].*ntfs-3g' > /tmp/checkntfs-3g.txt; cat /tmp/checkntfs-3g.txt | wc -l) -gt 0 ];
then
echo You already have ntfs-3g enabled
else
NTFSS=$(sudo blkid -c /dev/null -t TYPE=ntfs | cut -d ':' -f 1 > /tmp/checkntfs.txt)
while read curline; do
echo $curline #debugging
dirr=$(echo $curline | cut -c 6- | sed -e 's/\///g')
sudo mkdir /media/$dirr
NTFSLABEL=$(sudo blkid -c /dev/null -t TYPE=ntfs | grep $curline | grep LABEL)
if [ $NTFSLABEL ]; then
NTFSUUID=$(sudo blkid -c /dev/null -t TYPE=ntfs | grep $curline | cut -d '"' -f 4)
else
NTFSUUID=$(sudo blkid -c /dev/null -t TYPE=ntfs | grep $curline | cut -d '"' -f 2)
fi
echo $NTFSUUID #debugging
eval "echo UUID=$NTFSUUID /media/$dirr ntfs-3g users 0 0" | sudo tee -a /etc/fstab > /dev/null
done < /tmp/checkntfs.txt
echo Done!
fi
rm /tmp/checkntfs.txt /tmp/checkntfs-3g.txt > /dev/null 2>&1;
elif [ "$choicee" = "$WORD33" ];
then
sudo rm /etc/fstab_back > /dev/null 2>&1; sudo cp /etc/fstab /etc/fstab_back; cat /etc/fstab_back | sudo sed -e '/^UUID.*ntfs-3g.*/d' > /etc/fstab; sudo rm /etc/fstab_back > /dev/null 2>&1;
elif [ "$choicee" = "$WORD34" ];
then
testConnection
sudo rm /etc/apt/sources.list_backup > /dev/null 2>&1;
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
/usr/bin/zenity --info --text="$WORD38"
testmedibuntu=`wget --tries=1 --timeout=10 http://packages.medibuntu.org/ -O /tmp/testmedibuntumain; cat /tmp/testmedibuntumain | wc -l`
testmedibuntuu=`wget --tries=1 --timeout=10 http://mirrors.ucr.ac.cr/medibuntu/ -O /tmp/testmedibuntuu; cat /tmp/testmedibuntuu | wc -l`
testmedibuntuuu=`wget --tries=1 --timeout=10 http://mirror.oscc.org.my/medibuntu/ -O /tmp/testmedibuntuuu; cat /tmp/testmedibuntuuu | wc -l`
testmedibuntuuuu=`wget --tries=1 --timeout=10 ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ -O /tmp/testmedibuntuuuu; cat /tmp/testmedibuntuuuu | wc -l`
testgetdeb=`wget --tries=1 --timeout=10 http://archive.getdeb.net/getdeb/ -O /tmp/testgetdeb; cat /tmp/testgetdeb | wc -l`
testgetdebb=`wget --tries=1 --timeout=10 http://mirrors.dotsrc.org/getdeb/ -O /tmp/testgetdebb; cat /tmp/testgetdebb | wc -l`
if [ $testmedibuntu -gt 0 ]; then
mediserv="http://packages.medibuntu.org"
medibuntuserver="deb http://packages.medibuntu.org/ lucid free non-free"
medibuntuSOURCEserver="deb-src http://packages.medibuntu.org/ lucid free non-free"
elif [ $testmedibuntuu -gt 0 ]; then
mediserv="http://mirrors.ucr.ac.cr/medibuntu"
medibuntuserver="deb http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free"
medibuntuSOURCEserver="deb-src http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free"
elif [ $testmedibuntuuu -gt 0 ]; then
mediserv="http://mirror.oscc.org.my/medibuntu"
medibuntuserver="deb http://mirror.oscc.org.my/medibuntu/ lucid free non-free"
medibuntuSOURCEserver="deb-src http://mirror.oscc.org.my/medibuntu/ lucid free non-free"
elif [ $testmedibuntuuuu -gt 0 ]; then
mediserv="ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu"
medibuntuserver="deb ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ lucid free non-free"
medibuntuSOURCEserver="deb-src ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ lucid free non-free"
fi
if [ $testgetdeb -gt 0 ]; then
getdebserver="deb http://archive.getdeb.net/ubuntu lucid-getdeb apps"
getdebSOURCEserver="deb-src http://archive.getdeb.net/ubuntu lucid-getdeb apps"
elif [ $testgetdebb -gt 0 ]; then
getdebserver="deb http://mirrors.dotsrc.org/getdeb/ubuntu lucid-getdeb apps"
getdebSOURCEserver="deb-src http://mirrors.dotsrc.org/getdeb/ubuntu lucid-getdeb apps"
fi
rm /tmp/testmedibuntumain /tmp/testmedibuntuu /tmp/testmedibuntuuu /tmp/testmedibuntuuuu /tmp/testgetdeb /tmp/testgetdebb > /dev/null 2>&1;
cat /etc/apt/sources.list_backup | sed -e '/.*ubuntu\.com\/ubuntu.*/d' > /etc/apt/sources.list; sleep 1; cp /etc/apt/sources.list /etc/apt/sources.list_backup2 #delete the ubuntu default repositories so we don't get double repos
sleep 1 | cp /etc/apt/sources.list /etc/apt/sources.list_medibuntu; cat /etc/apt/sources.list_medibuntu | sed -e '/.*medibuntu.*lucid free non-free/d' -e '/.*getdeb.*lucid-getdeb apps/d' > /etc/apt/sources.list; rm /etc/apt/sources.list_medibuntu > /dev/null 2>&1; sleep 1 #delete medibuntu and getdeb repos to make sure we don't get double repos
sleep 1; cp /etc/apt/sources.list /etc/apt/sources.list_empty; cat /etc/apt/sources.list_empty | sed '/^$/d' > /etc/apt/sources.list; sleep 1; rm /etc/apt/sources.list_empty > /dev/null 2>&1; #remove empty lines in sources.list
ARRAY=( 'deb http://archive.ubuntu.com/ubuntu lucid main restricted universe multiverse' 'deb-src http://archive.ubuntu.com/ubuntu lucid main restricted universe multiverse' 'deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse' 'deb-src http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse' 'deb http://archive.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse' 'deb-src http://archive.ubuntu.com/ubuntu lucid-backports main restricted universe multiverse' 'deb http://archive.canonical.com/ubuntu lucid partner' 'deb-src http://archive.canonical.com/ubuntu lucid partner' 'deb http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse' 'deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse' $medibuntuserver $medibuntuSOURCEserver $getdebserver $getdebSOURCEserver )
ELEMENTS=${#ARRAY[@]}
for (( i=0;i<$ELEMENTS;i++));
do
repos=`cat /etc/apt/sources.list | grep "${ARRAY[${i}]}"`
if [ $? -eq 0 ];
then
echo "${ARRAY[${i}]}" already exists, skipping
else
echo "${ARRAY[${i}]}" | sudo tee -a /etc/apt/sources.list > /dev/null # add all the repositories which are not in the sources.list file already
fi
done
testConnection
rm /etc/apt/sources.list.d/medibuntu.list /etc/apt/sources.list.d/dropbox.list /etc/apt/sources.list.d/getdeb.list > /dev/null 2>&1; #delete medibuntu, dropbox and getdeb repos if they were placed in a different location (not sources.list) because we'll add them anyway - fix for not getting double repos
wget -q -O- $mediserv/medibuntu-key.gpg | sudo apt-key add -
#sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 46D7E7CF #getdeb key
sudo apt-get update
fi
done
IFS=""
/usr/bin/zenity --info --text="$WORD39"
else
echo cancel selected
fi
#gui 2
choices=`/usr/bin/zenity --title="$WORD40" --width=520 --height=400 \
--text="$WORD41" \
--list --column="$WORD10" --column="$WORD42" --column="$WORD43" \
--checklist FALSE "GIMP" "$WORD44" FALSE "$WORD45" "$WORD46" FALSE "WINE" "$WORD47" FALSE "Dock bar" "$WORD48" FALSE "Chromium Browser" "$WORD49" FALSE "$WORD50" "$WORD51" FALSE "Gnome-Do" "$WORD52" FALSE "Guake" "$WORD53" FALSE "VLC" "$WORD54" FALSE "MPlayer" "$WORD54" FALSE "SMPlayer" "$WORD55" FALSE "Thunderbird" "$WORD56" FALSE "$WORD57" "$WORD58" FALSE "Ubuntu-Tweak" "$WORD59" FALSE "Dropbox" "$WORD60" FALSE "Deluge" "$WORD61" FALSE "$WORD62" "$WORD63" FALSE "Skype" "$WORD64" FALSE "Google Chrome" "$WORD65" FALSE "Google Earth" "$WORD66" FALSE "$WORD67" "$WORD68"`
if [ $? -eq 0 ]
then
IFS="|"
testConnection
/usr/bin/zenity --info --text="$WORD69"
for choice in $choices
do
if [ "$choice" = "$WORD57" ];
then
sudo echo sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections #autoaccept java license
sudo apt-get install --yes sun-java6-plugin
if [ "i686" = `uname -m` ]; then
sudo apt-get -y --force-yes install gstreamer0.10-ffmpeg gstreamer0.10-pitfdll gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libdvdnav4 libdvdread4 libdvdcss2 libxine1-ffmpeg ffmpeg w32codecs flashplugin-nonfree sun-java6-fonts rar unrar p7zip-full p7zip-rar unace unp ttf-mscorefonts-installer ttf-liberation mencoder
else
sudo apt-get -y --force-yes install gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libdvdnav4 libdvdread4 libdvdcss2 libxine1-ffmpeg ffmpeg w64codecs sun-java6-fonts rar unrar p7zip-full p7zip-rar unace unp ttf-mscorefonts-installer ttf-liberation mencoder
cd /tmp
wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
tar xzf libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
sudo mkdir /usr/lib/flashplugin-nonfree/
sudo mv libflashplayer.so /usr/lib/flashplugin-nonfree/
sudo ln -s /usr/lib/flashplugin-nonfree/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so
rm libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz > /dev/null 2>&1;
fi
elif [ "$choice" = "Dock bar" ];
then
choicesdock=`/usr/bin/zenity --title="$WORD70" --width=450 --height=200 \
--text="$WORD71" \
--list --column="$WORD10" --column="$WORD42" --column="$WORD43" \
--checklist FALSE "Docky" "$WORD72" FALSE "Cairo Dock" "$WORD73" FALSE "Avant Window Navigator" "$WORD74"`
if [ $? -eq 0 ];
then
IFSS="|"
for choicedock in $choicesdock
do
if [ "$choicedock" = "Docky" ];
then
sudo add-apt-repository ppa:docky-core/ppa
sudo apt-get update
sudo apt-get -y --force-yes install docky
elif [ "$choicedock" = "Cairo Dock" ]; then
sudo apt-get -y --force-yes install cairo-dock cairo-dock-plug-ins
sudo apt-get install -f -y
elif [ "$choicedock" = "Avant Window Navigator" ]; then
sudo apt-get -y --force-yes install avant-window-navigator awn-applets-c-extras awn-applets-python-extras python-awn-extras
fi
done
fi
elif [ "$choice" = "Google Chrome" ];
then
cd /tmp
wget http://dl.google.com/linux/direct/google-chrome-beta_current_${arch}.deb
sudo dpkg -i --force-all google-chrome-beta_current_${arch}.deb
sudo apt-get install -f -y
rm google-chrome-beta_current_${arch}.deb > /dev/null 2>&1;
elif [ "$choice" = "Chromium Browser" ];
then
cd /tmp
sudo apt-get -y --force-yes install chromium-browser chromium-browser-l10n
elif [ "$choice" = "Skype" ];
then
cd /tmp
wget http://download.skype.com/linux/skype-ubuntu-intrepid_2.1.0.81-1_${arch}.deb
sudo dpkg -i --force-all skype-ubuntu-intrepid_2.1.0.81-1_${arch}.deb
sudo apt-get install -f -y
rm skype-ubuntu-intrepid_2.1.0.81-1_${arch}.deb > /dev/null 2>&1;
elif [ "$choice" = "$WORD45" ];
then
sudo apt-get -y --force-yes install pidgin
if [ ! -d ~/.purple ]; then
echo Pidgin dir does not exist, create it
mkdir ~/.purple
mkdir ~/.purple/smileys
cd ~/.purple
wget http://launchpad.net/ubuntustart/trunk/0.4.2/+download/prefs.xml
else
echo Pidgin dir exists, return
fi
rm ~/.purple/prefs_backup.xml > /dev/null 2>&1; #in case the user runs the script twice
cd ~/.purple/smileys/
wget http://launchpad.net/ubuntustart/trunk/0.4.2/+download/pidgin-original-1.9.tgz
tar -xvf pidgin-original-1.9.tgz
rm pidgin-original-1.9.tgz > /dev/null 2>&1;
cp ~/.purple/prefs.xml ~/.purple/prefs_backup.xml
cat ~/.purple/prefs_backup.xml | sed -e '/smileys/,/theme/s/Default/Original Smileys 1\.9/g' > ~/.purple/prefs.xml
chown -R $ON_USER ~/.purple/smileys/
chown -R $ON_USER ~/.purple/prefs_backup.xml
chown -R $ON_USER ~/.purple/
elif [ "$choice" = "$WORD50" ];
then
sudo add-apt-repository ppa:bisigi/ppa
sudo apt-get update
sudo apt-get -y --force-yes install bisigi-themes community-themes
elif [ "$choice" = "Google Earth" ];
then
sudo echo googleearth shared/accepted-googleearth-eula select true | sudo /usr/bin/debconf-set-selections #autoaccept google earth license
if [ "i686" = `uname -m` ]; then
sudo apt-get -y --force-yes install googleearth googleearth-data
else
sudo apt-get -y --force-yes install ia32-libs
sudo apt-get -y --force-yes install googleearth googleearth-data
sudo apt-get install -f -y
fi
elif [ "$choice" = "$WORD67" ];
then
sudo apt-get -y --force-yes install build-essential automake make checkinstall dpatch patchutils autotools-dev debhelper quilt fakeroot xutils lintian cmake dh-make libtool autoconf git-core subversion bzr
#also needed: pbuilder for deb packages, but removed to to postfix package installation
elif [ "$choice" = "Dropbox" ];
then
rm /etc/apt/sources.list.d/dropbox.list #delete the dropbox repo if it's added to a separate file so we don't get double repositories
reposs=`cat /etc/apt/sources.list | grep "dropbox"`
if [ $? -eq 0 ];
then
echo Dropbox repository already exists, skipping repository add
sudo apt-get update
sudo apt-get -y --force-yes install nautilus-dropbox
else
echo "deb http://linux.dropbox.com/ubuntu lucid main" | sudo tee -a /etc/apt/sources.list > /dev/null
echo "deb-src http://linux.dropbox.com/ubuntu lucid main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 3565780E #dropbox key
sudo apt-get update
sudo apt-get -y --force-yes install nautilus-dropbox
fi
elif [ "$choice" = "$WORD62" ];
then
sudo apt-get -y --force-yes install compizconfig-settings-manager compiz-fusion-plugins-extra
else
choiceLOW=`echo $choice | tr '[:upper:]' '[:lower:]'`
sudo apt-get -y --force-yes install $choiceLOW
sudo apt-get install -f -y
fi
done
#cleaning up
sudo apt-get clean
sudo apt-get autoclean
#notices
IFS="|"
for choicee in $choicess
do
# echo "$choicee";
if [ "$choicee" = "$WORD24" ] || [ "$choicee" = "$WORD28" ] || [ "$choicee" = "$WORD25" ] || [ "$choicee" = "$WORD29" ] || [ "$choicee" = "$WORD_ID1" ] || [ "$choicee" = "$WORD_ID2" ]; then
killall gnome-panel
/usr/bin/zenity --info --text="$WORD75 http://www.webupd8.org"
rm /tmp/testinternet > /dev/null 2>&1;
IFS=""
exit
fi
done
/usr/bin/zenity --info --text="$WORD76 http://www.webupd8.org"
IFS=""
rm /tmp/testinternet > /dev/null 2>&1;
else
rm /tmp/testinternet > /dev/null 2>&1;
echo cancel selected
exit
fi
#changelog
#0.4.9.4
#added Danish translation
#updated Estonian translation
#0.4.9.3
#google changed the URL for Chrome so I added the new one
#download pidgin smileys from a different location as it seems the server is overloaded
#0.4.9.2
#fixed some bugs in the English and Traditional Chinese translation
#added Urdu language
#0.4.9.1
#added vietnamese language
#0.4.9
#bug-fix release
#0.4.8.9
#fixed double repository issue
#0.4.8.8
#added traditional chinese language
#0.4.8.7
#added swedish language
#0.4.8.6:
#added arabic translation
#0.4.8.5:
#removed pbuilder from development tools due to postfix package dependency which requires the user to interact with the terminal
#added slovenian and romanian translations
#0.4.8.4
#fixed Asturian language not working
#0.4.8.3
#fixed pidgin smileys bug
#0.4.8.2
#added basha indonesia, asturian languages, updated italian, dutch, slovenian, czech
#0.4.8.1
#added brazilian portuguese and catalan languages
#added estonian
#0.4.8
#added Docky, Cairo Dock and AWN in a separate dialog
#made Google Earth installation autoaccept the license so the user doesn't have to interact with the terminal
#multiple language support; current languages: Czech, Spanish, French, German, Slovak, Italian, Polish, Japanese, Dutch, Portuguese (PT), Malaysian, Galician, Korean
#changed the way the current logged in user is detected; this should hopefully fix multiple accounts issues
#0.4.7
#extra themes (community themes and bisigi themes)
#google earth
#0.4.6
#bugs bugs bugs fixed
#added extra compiz plugins to install
#added getdeb mirror
#code optimizations
#0.4.5
#Added reset options for the tweaks
#Changed the way day of the week from Sunday to Monday works - it now asks the user to enter his locale.
#0.4.4
#fixed lots of minor bugs, the script is now more stable
#0.4.3
#replace karmic dropbox repository with lucid
#code cleanup
#0.4.2.2
#removed devtools package from development packages options due to this package requesting user interaction with the terminal
#fix GPG keys import for medibuntu and getdeb
#0.4.2.1
#fixed Pidgin installation not working
#added one more Medibuntu mirror
#clean empty lines in sources.list
#remove 15s sleep for when testing medibuntu mirrors
#v0.4.2
#added Change Gnome Calendar first day of the week from Sunday to Monday tweak.
#check if the user selects an options which requires he logs out and then logs back in and if so, notify him.
#lots of fixes, especially to automatically mount NTFS drives feature which now add drives by UUID instead of name
#clean up when done
#internet connection check
#fix double repositories in some cases
#added 2 medibuntu mirrors in case medibuntu main server is down, will check which one is working and add it to sources.list
#v0.4.1
#added smplayer
#integrated Mongi Gazelle's sharp fonts script: http://www.webupd8.org/2009/09/ubuntu-debian-script-to-install-sharp.html
#also from Mongi Gazelle's script: incorporated the synaptic, apt-get, etc. check and if those processes are running, close the script and ask the user to close them before running the script
#added guake
#included original protocol smileys with Pidgin installation (from http://files.andreineculau.com/projects/pidgin/original-smileys/)
#install deluge
#automatically mount NTFS drives on startup
#v0.4
#added Skype 32bit and 64bit download & install
#sudo check: the script exists if it is not run as sudo
#install compizconfig-settings-manager
#show dialog when going from step 1 to step 2 and show "Done" dialog when all the packages in step 2 have been installed
#fixed 'disable GDM login sound'
#v0.3
#added gnome-do
#Remove drive icons from desktop gconf tweak
#fix Google Chrome repository slowness for "apt-get update"
#some other fixes
#v0.2:
#added autoaccept for the java license when installing the java plugin
#added dropbox repository and installation
#added disable GDM login user list
#added build-essential, subversion, git, etc
