Erinevus lehekülje "Ubuntu 10.04 kohandusskript" redaktsioonide vahel

Allikas: Pingviini viki
(Vaikimisi sisselülitatud ainult otseselt eestindamisega seotud asjad)
(Version 0.4.9.3 ja hakkame parandama)
19. rida: 19. rida:
 
#    after installing Ubuntu 10.04 Lucid Lynx 32bit and 64bit.
 
#    after installing Ubuntu 10.04 Lucid Lynx 32bit and 64bit.
 
#
 
#
#                          version 0.4.2.2
+
#                          version 0.4.9.3
 
#
 
#
 
#    The script comes with no warranty. The author is not responsible if
 
#    The script comes with no warranty. The author is not responsible if
26. rida: 26. rida:
 
##   
 
##   
 
##    Copyright (C) 2010 Alin Andrei, http://www.webupd8.org
 
##    Copyright (C) 2010 Alin Andrei, http://www.webupd8.org
##
 
##    Muutnud Tramm 17.05.10 http://viki.pingviin.org/Kasutaja:Tramm
 
##    Muutnud A.Mägi 06.05.10
 
##    Eemaldatud lähtekoodi ja backports varamud ning arendusvahendid,
 
##    lisatud ppa:rvm/smplayer uusima SMplayeri ja MPlayeri jaoks
 
##    lisatud Eesti ID-kaardi tugi (32- ja 64-bit), programmid gThumb ja avant-window-navigator koos lisadega,
 
##    thunderbirdi eesti keele tugi
 
##
 
##    Eesti ID-kaardi tugi Märt Põder.
 
##    Enam pole vaja käsitsi Firefoxile sertifikaate lisada ja turvamoodulit näidata
 
 
##
 
##
 
##    This program is free software: you can redistribute it and/or modify
 
##    This program is free software: you can redistribute it and/or modify
55. rida: 45. rida:
 
#####################
 
#####################
 
#Options explainations:
 
#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
+
#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.
 
#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
 
#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
61. rida: 51. rida:
 
#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.
 
#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.
 
#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. This tweak fixes this for non-US citizens.
+
#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.
 
#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
 
#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.
 
#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.
+
#Add additional repositories (GetDeb, Medibuntu etc.) - Adds the following repositories: Getdeb, Medibuntu, Ubuntu universe and multiverse and Lucid partner.
 
########
 
########
 
#The second dialog - install packages.
 
#The second dialog - install packages.
 +
  
  
73. rida: 64. rida:
 
ROOT_UID=0
 
ROOT_UID=0
  
#check if the user is running lucid 32 or 64bit
+
#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
 +
langselect=`/usr/bin/zenity --title="Please select a language" --width=300 --height=200 \
 +
                            --text="Select:" \
 +
                            --list --column="Selected" --column="Language" \
 +
                            --radiolist TRUE English FALSE Arabic FALSE Asturian FALSE "Bahasa Indonesia" FALSE Catalan FALSE "Simplified Chinese" False "Traditional Chinese" FALSE Czech FALSE Dutch FALSE Estonian FALSE French FALSE Galician FALSE German FALSE Italian FALSE Japanese FALSE Korean FALSE Malaysian FALSE Polish FALSE "Portuguese (BR)" FALSE "Portuguese (PT)" FALSE Romanian FALSE Slovak FALSE Slovenian FALSE Spanish FALSE Swedish FALSE Turkish FALSE Urdu FALSE Vietnamese`
 +
 
 +
 
 +
if [ $? -eq 0 ];
 +
then
 +
        IFS="|"
 +
        for langSselect in $langselect
 +
        do
 +
              if [ "$langSselect" = "English" ];
 +
                    then
 +
                    YOURLANG="languages/en.pot"
 +
            elif [ "$langSselect" = "Arabic" ];
 +
                    then
 +
                    YOURLANG="languages/ar.pot"                   
 +
            elif [ "$langSselect" = "Bahasa Indonesia" ];
 +
                    then
 +
                    YOURLANG="languages/id.pot"
 +
            elif [ "$langSselect" = "Asturian" ];
 +
                    then
 +
                    YOURLANG="languages/ast.pot"                   
 +
            elif [ "$langSselect" = "Czech" ];
 +
                    then
 +
                    YOURLANG="languages/cz.pot"                   
 +
              elif [ "$langSselect" = "Catalan" ];
 +
                    then
 +
                    YOURLANG="languages/cat.pot" 
 +
              elif [ "$langSselect" = "Simplified Chinese" ];
 +
                    then
 +
                    YOURLANG="languages/zh_CN.pot"   
 +
              elif [ "$langSselect" = "Traditional Chinese" ];
 +
                    then
 +
                    YOURLANG="languages/zh_TW.pot"                                                           
 +
              elif [ "$langSselect" = "Dutch" ];
 +
                    then
 +
                    YOURLANG="languages/nl.pot"   
 +
              elif [ "$langSselect" = "Estonian" ];
 +
                    then
 +
                    YOURLANG="languages/et.pot"                                       
 +
              elif [ "$langSselect" = "French" ];
 +
                    then
 +
                    YOURLANG="languages/fr.pot"   
 +
              elif [ "$langSselect" = "Galician" ];
 +
                    then
 +
                    YOURLANG="languages/ga.pot"                       
 +
              elif [ "$langSselect" = "German" ];
 +
                    then
 +
                    YOURLANG="languages/de.pot" 
 +
              elif [ "$langSselect" = "Italian" ];
 +
                    then
 +
                    YOURLANG="languages/it.pot"   
 +
              elif [ "$langSselect" = "Japanese" ];
 +
                    then
 +
                    YOURLANG="languages/jp.pot" 
 +
              elif [ "$langSselect" = "Korean" ];
 +
                    then
 +
                    YOURLANG="languages/ko.pot"                         
 +
              elif [ "$langSselect" = "Malaysian" ];
 +
                    then
 +
                    YOURLANG="languages/ms.pot"                                           
 +
              elif [ "$langSselect" = "Polish" ];
 +
                    then
 +
                    YOURLANG="languages/pl.pot" 
 +
              elif [ "$langSselect" = "Portuguese (BR)" ];
 +
                    then
 +
                    YOURLANG="languages/pt_BR.pot"                     
 +
              elif [ "$langSselect" = "Portuguese (PT)" ];
 +
                    then
 +
                    YOURLANG="languages/pt_PT.pot"                                                           
 +
              elif [ "$langSselect" = "Slovak" ];
 +
                    then
 +
                    YOURLANG="languages/sk.pot"   
 +
              elif [ "$langSselect" = "Slovenian" ];
 +
                    then
 +
                    YOURLANG="languages/sl.pot"                       
 +
              elif [ "$langSselect" = "Romanian" ];
 +
                    then
 +
                    YOURLANG="languages/ro.pot"                                                                           
 +
              elif [ "$langSselect" = "Spanish" ];
 +
                    then
 +
                    YOURLANG="languages/es.pot"
 +
              elif [ "$langSselect" = "Swedish" ];
 +
                    then
 +
                    YOURLANG="languages/sv.pot"                   
 +
              elif [ "$langSselect" = "Turkish" ];
 +
                    then
 +
                    YOURLANG="languages/tr.pot" 
 +
              elif [ "$langSselect" = "Urdu" ];
 +
                    then
 +
                    YOURLANG="languages/ur.pot"                         
 +
              elif [ "$langSselect" = "Vietnamese" ];
 +
                    then
 +
                    YOURLANG="languages/vi.pot"                                         
 +
              fi
 +
        done
 +
        IFS=""
 +
else
 +
        echo cancel selected
 +
        exit
 +
fi
 +
 
 +
LANGFILE=$(cat $YOURLANG)
 +
 
 +
n=1
 +
while read curline; do
 +
export WORD$n="$curline" #> /dev/null 2>&1
 +
let n=n+1
 +
done < $YOURLANG
 +
 
 +
#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 [ "lucid" = `lsb_release -cs` ]; then
 
   if [ "i686" = `uname -m` ]; then
 
   if [ "i686" = `uname -m` ]; then
      echo using Ubuntu 10.04 Lucid Lynx - ok
+
      echo using Ubuntu 10.04 Lucid Lynx - ok
 +
      arch=i386
 
   elif [ "x86_64" = `uname -m` ]; then
 
   elif [ "x86_64" = `uname -m` ]; then
      echo using Ubuntu 10.04 Lucid Lynx - ok
+
      echo using Ubuntu 10.04 Lucid Lynx - ok
 +
      arch=amd64
 
   else
 
   else
       /usr/bin/zenity --warning --title="Error" --text="Error: You are not using Ubuntu 10.04 Lucid Lynx 32bit or 64bit"
+
       /usr/bin/zenity --warning --title="$WORD1" --text="$WORD2"
 
       echo You are not using Ubuntu 10.04 Lucid Lynx 32bit or 64bit, exiting
 
       echo You are not using Ubuntu 10.04 Lucid Lynx 32bit or 64bit, exiting
 
       exit
 
       exit
 
   fi
 
   fi
 
else
 
else
       /usr/bin/zenity --warning --title="Error" --text="Error: You are not using Ubuntu 10.04 Lucid Lynx"
+
       /usr/bin/zenity --warning --title="$WORD1" --text="$WORD3"
 
       echo You are not using Ubuntu 10.04 Lucid Lynx, exiting
 
       echo You are not using Ubuntu 10.04 Lucid Lynx, exiting
 
       exit
 
       exit
93. rida: 221. rida:
 
if [ "$UID" -ne "$ROOT_UID" ];
 
if [ "$UID" -ne "$ROOT_UID" ];
 
   then
 
   then
   /usr/bin/zenity --warning --title="Error" --text="You must have sudo privileges to run this script. Try: sudo ./ubuntu-10.04-script"
+
   /usr/bin/zenity --warning --title="$WORD1" --text="$WORD4"
 
   echo "Exiting ... please run the script with sudo (eg: sudo ./ubuntu-10.04-script)"
 
   echo "Exiting ... please run the script with sudo (eg: sudo ./ubuntu-10.04-script)"
 
   exit
 
   exit
100. rida: 228. rida:
 
# check if there are applications running which can interfere with the script
 
# check if there are applications running which can interfere with the script
 
sleep 1
 
sleep 1
if ps -U root -u root u | grep "synaptic" | grep -v grep > /dev/null;
+
for lock in synaptic update-manager software-center apt-get dpkg aptitude
      then
+
do
      echo "Installation won't work. Please close Synaptic first then try again.";
+
if ps -U root -u root u | grep $lock | grep -v grep > /dev/null;
      /usr/bin/zenity --warning --title="Error" --text="Installation won't work. Close Synaptic first then try again."
+
      exit
+
elif ps -U root -u root u | grep "update-manager" | grep -v grep > /dev/null;
+
      then
+
      echo "Installation won't work. Please close Update Manager first then try again.";
+
      /usr/bin/zenity --warning --title="Error" --text="Installation won't work. Close update-manager first then try again."
+
      exit
+
elif ps -U root -u root u | grep "software-center" | grep -v grep > /dev/null;
+
      then
+
      echo "Installation won't work. Please close Software Center first then try again.";
+
      /usr/bin/zenity --warning --title="Error" --text="Installation won't work. Close update-manager first then try again."
+
      exit
+
elif ps -U root -u root u | grep "apt-get" | grep -v grep > /dev/null;
+
      then echo "Installation won't work. Please wait for apt-get to finish running, or terminate the process, then try again.";
+
      /usr/bin/zenity --warning --title="Error" --text="Installation won't work. Wait for apt-get to finish running, or exit it, then try again."
+
      exit
+
elif ps -U root -u root u | grep "dpkg" | grep -v grep > /dev/null;
+
 
       then  
 
       then  
       echo "Installation won't work. Wait for dpkg to finish running, or exit it, then try again.";
+
       echo "Installation won't work. Please close $lock first then try again.";
       /usr/bin/zenity --warning --title="Error" --text="Installation won't work. Wait for dpkg to finish running, or exit it, then try again."
+
       /usr/bin/zenity --warning --title="$WORD1" --text="$WORD5 $lock $WORD6"
 
       exit
 
       exit
 
fi
 
fi
 +
done
  
 
#check if the user has an active internet connection
 
#check if the user has an active internet connection
 
function testConnection()  
 
function testConnection()  
 
{
 
{
testconnection=`wget www.google.com -O /tmp/testinternet &>/dev/null 2>&1`
+
testconnection=`wget --tries=3 --timeout=15 www.google.com -O /tmp/testinternet &>/dev/null 2>&1`
 
if [ $? != 0 ]; then
 
if [ $? != 0 ]; then
sleep 5
 
 
echo  "You are not connected to the Internet. Please check your Internet connection and try again."
 
echo  "You are not connected to the Internet. Please check your Internet connection and try again."
/usr/bin/zenity --info --text="<b>Error:</b> You are not connected to the Internet but selected an option which requires an Internet Connection. Please fix your Internet connection and try again."
+
/usr/bin/zenity --info --text="$WORD7"
testConnection
+
 
else
 
else
 
echo Internet connection - ok
 
echo Internet connection - ok
140. rida: 250. rida:
 
}
 
}
  
 
 
#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=$(cat /etc/passwd | grep :1000: | cut -d ':' -f 1)
 
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
 
echo $ON_USER
 
echo $DBUS_SESSION
 
echo $DBUS_SESSION_BUS_ADDRESS
 
echo $DBUS_SESSION_BUS_WINDOWID
 
echo $DBUS_SESSION_BUS_PID
 
  
 
#gui 1
 
#gui 1
choicess=`/usr/bin/zenity --title="Step 1: Tweaks, fixes and repositories" --width=500 --height=400 \
+
choicess=`/usr/bin/zenity --title="$WORD8" --width=500 --height=450 \
                           --text="Important: \n\nIf you do not select the 'Add additional repositories' option, you will not be able \nto install some packages in Step 2. \n\nAlso, for some settings take place, you'll have to log out and then log back in \n(but only do this after both Step 1 and Step 2 have been completed!).\n\nSelect:" \
+
                           --text="$WORD9" \
                         --list --column="Selected" --column="Tweak" \
+
                         --list --column="$WORD10" --column="$WORD11" \
                         --checklist FALSE "Move window buttons to the right (Karmic style)" FALSE "Change Update Manager behavior to the one in Jaunty" FALSE "Remove mounted drive icons from desktop" FALSE "Disable the GDM login sound" FALSE "Enable the icons in menus and buttons" FALSE "Disable the GDM login user list" TRUE "Change Gnome Calendar first day of the week from Sunday to Monday" FALSE "Remove the ubuntu-docs package (frees up 252MB)" FALSE "Install and configure sharp fonts" FALSE "Fix 'apt-get update' delay for Google repository" FALSE "Automatically mount NTFS drives on startup" TRUE "Add additional repositories (GetDeb, Medibuntu etc.)"`
+
                         --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" FALSE "$WORD24" FALSE "$WORD25" FALSE "$WORD26" FALSE "$WORD27" FALSE "$WORD28" FALSE "$WORD29" TRUE "$WORD30" FALSE "$WORD31" FALSE "$WORD32" FALSE "$WORD33" TRUE "$WORD34"`
  
  
166. rida: 263. rida:
 
         for choicee in $choicess
 
         for choicee in $choicess
 
         do
 
         do
               if [ "$choicee" = "Move window buttons to the right (Karmic style)" ];
+
               if [ "$choicee" = "$WORD12" ];
 
                     then  
 
                     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"
 
                     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" = "Change Update Manager behavior to the one in Jaunty" ];
+
               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
 
                     then
 
                     sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/update-notifier/auto_launch false
 
                     sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/update-notifier/auto_launch false
               elif [ "$choicee" = "Remove mounted drive icons from desktop" ];
+
              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
 
                     then
 
                     sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/nautilus/desktop/volumes_visible false
 
                     sudo -u $ON_USER "DBUS_SESSION_BUS_ADDRESS="$DBUS_SESSION_BUS_ADDRESS gconftool -s --type bool /apps/nautilus/desktop/volumes_visible false
               elif [ "$choicee" = "Disable the GDM login sound" ];
+
              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
 
                     then
 
                     sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false
 
                     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
 
                     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" = "Enable the icons in menus and buttons" ];
+
              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
 
                     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/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
 
                     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" = "Disable the GDM login user list" ];
+
               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
 
                     then
 
                     sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true
 
                     sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true
               elif [ "$choicee" = "Change Gnome Calendar first day of the week from Sunday to Monday" ];
+
            elif [ "$choicee" = "$WORD23" ];
 +
                    then
 +
                    sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list false
 +
               elif [ "$choicee" = "$WORD24" ];
 
                     then
 
                     then
 
                     timee=$(cat /etc/default/locale | grep "LC_TIME")
 
                     timee=$(cat /etc/default/locale | grep "LC_TIME")
 
                     if [ ! $timee ]; then
 
                     if [ ! $timee ]; then
                     timeee="et_EE.UTF-8"
+
                     timeee=$(/usr/bin/zenity --entry --title="$WORD35" --text="$WORD36")
                    echo LC_TIME=\"$timeee.UTF-8\" | sudo tee -a /etc/default/locale > /dev/null
+
                        if [ $timeee ]; then
sed -r -i -e "s/weekday 1/weekday 2/" /usr/share/i18n/locales/et_EE
+
                            echo LC_TIME=\"$timeee.UTF-8\" | sudo tee -a /etc/default/locale > /dev/null
locale-gen
+
                        else
 +
                            echo LC_TIME=\"en_GB.UTF-8\" | sudo tee -a /etc/default/locale > /dev/null
 +
                        fi   
 
                     else
 
                     else
 
                     echo "You already have custom values for LC_TIME, skipping this tweak"
 
                     echo "You already have custom values for LC_TIME, skipping this tweak"
 
                     fi
 
                     fi
               elif [ "$choicee" = "Remove the ubuntu-docs package (frees up 252MB)" ];
+
               elif [ "$choicee" = "$WORD25" ];
 +
                    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" = "$WORD26" ];
 
                     then
 
                     then
 
                     sudo apt-get remove -y --force-yes ubuntu-docs
 
                     sudo apt-get remove -y --force-yes ubuntu-docs
             
+
               elif [ "$choicee" = "$WORD27" ];
               elif [ "$choicee" = "Install and configure sharp fonts" ];
+
 
                     then
 
                     then
 +
                    sudo apt-get -y --force-yes install ubuntu-docs                   
 +
              elif [ "$choicee" = "$WORD28" ];
 +
                    then
 
                     testConnection
 
                     testConnection
                     /usr/bin/zenity --info --text="You selected to install Sharp Fonts. This may take a few minutes depending on your connection speed. \n\nClick OK to continue!"
+
                     /usr/bin/zenity --info --text="$WORD37"
 
                     cd /tmp
 
                     cd /tmp
 
                     echo "Installing Sharpfonts. This may take a few minutes depending on connection speed..."
 
                     echo "Installing Sharpfonts. This may take a few minutes depending on connection speed..."
232. rida: 356. rida:
 
                     wget http://sharpfonts.com/fontconfig.tbz
 
                     wget http://sharpfonts.com/fontconfig.tbz
 
                     tar xvjpf fontconfig.tbz -C /etc/fonts/
 
                     tar xvjpf fontconfig.tbz -C /etc/fonts/
                     rm -r /tmp/*.exe  
+
                     rm -r /tmp/*.exe > /dev/null 2>&1;
                     rm /tmp/fontconfig.tbz
+
                     rm /tmp/fontconfig.tbz > /dev/null 2>&1;
 
+
                    #Firefox sharp fonts
# A. Mägi lisndus aadressilt http://ubuntu.pingviin.org/1004kohandamine.html
+
                    touch ~/.fonts.conf
sudo apt-get install ttf-mscorefonts-installer
+
                    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"
 
                     echo "Sharp fonts installation finished... Please remember to logout and login again"
               elif [ "$choicee" = "Fix 'apt-get update' delay for Google repository" ];
+
                   
 +
               elif [ "$choicee" = "$WORD29" ];
 
                     then
 
                     then
                     echo "Acquire::http::Pipeline-Depth "0";" | sudo tee -a /etc/apt/apt.conf.d/90localsettings > /dev/null
+
                    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" = "Automatically mount NTFS drives on startup" ];
+
              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
 
                     then
 
                         sudo apt-get -y --force-yes install ntfs-3g
 
                         sudo apt-get -y --force-yes install ntfs-3g
255. rida: 409. rida:
 
      dirr=$(echo $curline | cut -c 6- | sed -e 's/\///g')
 
      dirr=$(echo $curline | cut -c 6- | sed -e 's/\///g')
 
      sudo mkdir /media/$dirr
 
      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)
 
      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
 
      echo $NTFSUUID #debugging
      eval "echo UUID=$NTFSUUID /media/$dirr ntfs-3g users 0  0" | sudo tee -a /etc/fstab > /dev/null
+
      eval "echo UUID=$NTFSUUID /media/$dirr ntfs-3g     users                       0  0" | sudo tee -a /etc/fstab > /dev/null
 
done < /tmp/checkntfs.txt
 
done < /tmp/checkntfs.txt
 
echo Done!
 
echo Done!
 
fi
 
fi
                         rm /tmp/checkntfs.txt /tmp/checkntfs-3g.txt
+
                         rm /tmp/checkntfs.txt /tmp/checkntfs-3g.txt > /dev/null 2>&1;
               elif [ "$choicee" = "Add additional repositories (GetDeb, Medibuntu etc.)" ];
+
               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
 
                   then
 
                   testConnection
 
                   testConnection
                   sudo rm /etc/apt/sources.list_backup
+
                   sudo rm /etc/apt/sources.list_backup > /dev/null 2>&1;
 
                   sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
 
                   sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
                  /usr/bin/zenity --info --text="Please wait while testing main Medibuntu server and mirrons (it should take about ~20 seconds). Once this is over, a new dialog will pop-up with Step 2: package installation. \n\nClick OK to continue!"
+
                          /usr/bin/zenity --info --text="$WORD38"
                  testmedibuntu=`wget --tries=1 --timeout=10 http://packages.medibuntu.org/ -O /tmp/testmedibuntumain; cat /tmp/testmedibuntumain | wc -l`
+
                          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`
+
                          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`
+
                          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`
+
                          testmedibuntuuuu=`wget --tries=1 --timeout=10 ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ -O /tmp/testmedibuntuuuu; cat /tmp/testmedibuntuuuu | wc -l`
                  #sleep 15
+
                          testgetdeb=`wget --tries=1 --timeout=10 http://archive.getdeb.net/getdeb/ -O /tmp/testgetdeb; cat /tmp/testgetdeb | wc -l`
                  if [ $testmedibuntu -gt 0 ]; then
+
                          testgetdebb=`wget --tries=1 --timeout=10 http://mirrors.dotsrc.org/getdeb/ -O /tmp/testgetdebb; cat /tmp/testgetdebb | wc -l`
                        mediserv="http://packages.medibuntu.org"
+
                          if [ $testmedibuntu -gt 0 ]; then
                        medibuntuserver="deb http://packages.medibuntu.org/ lucid free non-free"
+
                                mediserv="http://packages.medibuntu.org"
                        medibuntuSOURCEserver="deb-src http://packages.medibuntu.org/ lucid free non-free"
+
                                medibuntuserver="deb http://packages.medibuntu.org/ lucid free non-free"
                  elif [ $testmedibuntuu -gt 0 ]; then
+
                                medibuntuSOURCEserver="deb-src http://packages.medibuntu.org/ lucid free non-free"
                        mediserv="http://mirrors.ucr.ac.cr/medibuntu"
+
                          elif [ $testmedibuntuu -gt 0 ]; then
                        medibuntuserver="deb http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free"
+
                                mediserv="http://mirrors.ucr.ac.cr/medibuntu"
                        medibuntuSOURCEserver="deb-src http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free"
+
                                medibuntuserver="deb http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free"
                  elif [ $testmedibuntuuu -gt 0 ]; then
+
                                medibuntuSOURCEserver="deb-src http://mirrors.ucr.ac.cr/medibuntu/ lucid free non-free"
                        mediserv="http://mirror.oscc.org.my/medibuntu"
+
                          elif [ $testmedibuntuuu -gt 0 ]; then
                        medibuntuserver="deb http://mirror.oscc.org.my/medibuntu/ lucid free non-free"
+
                                mediserv="http://mirror.oscc.org.my/medibuntu"
                        medibuntuSOURCEserver="deb-src http://mirror.oscc.org.my/medibuntu/ lucid free non-free"
+
                                medibuntuserver="deb http://mirror.oscc.org.my/medibuntu/ lucid free non-free"
                  elif [ $testmedibuntuuuu -gt 0 ]; then
+
                                medibuntuSOURCEserver="deb-src http://mirror.oscc.org.my/medibuntu/ lucid free non-free"
                        mediserv="ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu"
+
                          elif [ $testmedibuntuuuu -gt 0 ]; then
                        medibuntuserver="deb ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ lucid free non-free"
+
                                mediserv="ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu"
                        medibuntuSOURCEserver="deb-src ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ lucid free non-free"
+
                                medibuntuserver="deb ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ lucid free non-free"
                  fi
+
                                medibuntuSOURCEserver="deb-src ftp://ftp.leg.uct.ac.za/pub/linux/medibuntu/ lucid free non-free"
                  rm /tmp/testmedibuntumain /tmp/testmedibuntuu /tmp/testmedibuntuuu /tmp/testmedibuntuuuu
+
                          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 '/.*main.*restricted.*/d' > /etc/apt/sources.list; sleep 1  #delete the ubuntu default repositories so we don't get double repos
+
                   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' > /etc/apt/sources.list; sleep 1  
+
                   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 #remove empty lines in sources.list
+
                   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 http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse' 'deb http://archive.canonical.com/ubuntu lucid partner' 'deb http://security.ubuntu.com/ubuntu lucid-security main restricted universe multiverse' $medibuntuserver 'deb http://archive.getdeb.net/ubuntu lucid-getdeb apps' 'deb http://ppa.launchpad.net/boamaod/ubuntu-idkaart/ubuntu lucid main' )
+
                   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[@]}
 
                   ELEMENTS=${#ARRAY[@]}
  
310. rida: 479. rida:
 
                       done
 
                       done
 
                   testConnection
 
                   testConnection
                   # lisa smplayer varamu, mida varem kindlasti ei olnud (sealt SMPplayeri ja MPlayeri uusimad versioonid)
+
                   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
  # sudo add-apt-repository ppa:nilarimogard/webupd8, ei sisalda enam VLC-pleierit
+
                  wget -q -O- $mediserv/medibuntu-key.gpg | sudo apt-key add -
  sudo add-apt-repository ppa:rvm/smplayer
+
  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-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
                   wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
+
                   sudo apt-key adv --recv-keys --keyserver pgp.mit.edu 46D7E7CF #getdeb key
 
+
 
                   sudo apt-get update
 
                   sudo apt-get update
 
               fi
 
               fi
 
         done
 
         done
 
         IFS=""
 
         IFS=""
         /usr/bin/zenity --info --text="Done! We will now proceed to Step 2."
+
         /usr/bin/zenity --info --text="$WORD39"
 
else
 
else
 
         echo cancel selected
 
         echo cancel selected
327. rida: 493. rida:
  
 
#gui 2
 
#gui 2
choices=`/usr/bin/zenity --title="Step 2: Install packages" --width=520 --height=400 \
+
choices=`/usr/bin/zenity --title="$WORD40" --width=520 --height=400 \
                         --text="Choose packages to install:" \
+
                         --text="$WORD41" \
                         --list --column="Selected" --column="Package" --column="Description" \
+
                         --list --column="$WORD10" --column="$WORD42" --column="$WORD43" \
                         --checklist FALSE "GIMP" "Image Editor" FALSE "Pidgin (including original smileys)" "Multi-protocol instant messaging client" FALSE "WINE" "Run Windows applications in Linux" FALSE "Chromium-browser" "Open source browser" FALSE "Gnome-Do" "Quick launcher" FALSE "Guake" "Quake-like terminal emulator" FALSE "VLC" "Media player" FALSE "SMPlayer" "Media player (MPlayer front-end)" FALSE "Thunderbird" "Email client" TRUE "Codecs and extras" "Codecs (multimedia, java, flash), additional archives support, DVD support and fonts" FALSE "Ubuntu-Tweak" "Tweak Ubuntu and add lots of additional repositories (PPAs)" FALSE "Dropbox" "Cross-platform cloud sync application" FALSE "Deluge" "BitTorrent client" FALSE "CCSM" "CompizConfig Settings Manager" FALSE "Skype" "VoIP chat application" FALSE "Google Chrome" "Google's browser" TRUE "Estonian ID-card support" "Identification and signing" FALSE "Avant-window-navigator" "Dock and Launcher" FALSE "gthumb" "Photo manager"`
+
                         --checklist TRUE "GIMP" "$WORD44" TRUE "$WORD45" "$WORD46" TRUE "WINE" "$WORD47" TRUE "Dock bar" "$WORD48" TRUE "Chromium Browser" "$WORD49" TRUE "$WORD50" "$WORD51" TRUE "Gnome-Do" "$WORD52" TRUE "Guake" "$WORD53" TRUE "VLC" "$WORD54" TRUE "MPlayer" "$WORD54" TRUE "SMPlayer" "$WORD55" TRUE "Thunderbird" "$WORD56" TRUE "$WORD57" "$WORD58" TRUE "Ubuntu-Tweak" "$WORD59" TRUE "Dropbox" "$WORD60" TRUE "Deluge" "$WORD61" TRUE "$WORD62" "$WORD63" TRUE "Skype" "$WORD64" TRUE "Google Chrome" "$WORD65" FALSE "Google Earth" "$WORD66" FALSE "$WORD67" "$WORD68"`
  
 
if [ $? -eq 0 ]
 
if [ $? -eq 0 ]
336. rida: 502. rida:
 
         IFS="|"
 
         IFS="|"
 
         testConnection
 
         testConnection
         /usr/bin/zenity --info --text="The package download and installation will begin. Please do not restart your computer until the script is done. \n\nClick OK to start!"
+
         /usr/bin/zenity --info --text="$WORD69"
 
         for choice in $choices
 
         for choice in $choices
 
         do
 
         do
               if [ "$choice" = "Codecs and extras" ];
+
               if [ "$choice" = "$WORD57" ];
 
                   then
 
                   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
 
                       if [ "i686" = `uname -m` ]; then
                          sudo echo sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections
+
                           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
sudo apt-get install --yes sun-java6-plugin
+
  # eemaldatud ttf-mscorefonts-installer, mis vahel skripti seiskumist põhjustab
+
                           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-liberation
+
 
                       else
 
                       else
                          sudo echo sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections
+
                           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
sudo apt-get install --yes sun-java6-plugin
+
                           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-liberation
+
 
                           cd /tmp
 
                           cd /tmp
 
                           wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
 
                           wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
356. rida: 519. rida:
 
                           sudo mv libflashplayer.so /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
 
                           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
+
                           rm libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz > /dev/null 2>&1;
 
                       fi
 
                       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" ];
 
             elif [ "$choice" = "Google Chrome" ];
 
                   then
 
                   then
 
                         cd /tmp
 
                         cd /tmp
                        if [ "i686" = `uname -m` ]; then
+
                           wget http://dl.google.com/linux/direct/google-chrome-beta_current_${arch}.deb
                           wget http://dl.google.com/linux/direct/google-chrome-unstable_current_i386.deb
+
                           sudo dpkg -i --force-all google-chrome-beta_current_${arch}.deb
                           sudo dpkg -i --force-all google-chrome-unstable_current_i386.deb
+
 
                           sudo apt-get install -f -y
 
                           sudo apt-get install -f -y
                           rm google-chrome-unstable_current_i386.deb
+
                           rm google-chrome-beta_current_${arch}.deb > /dev/null 2>&1;
                         else
+
            elif [ "$choice" = "Chromium Browser" ];
                          wget http://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
+
                  then
                           sudo dpkg -i --force-all google-chrome-unstable_current_amd64.deb
+
                         cd /tmp
                          sudo apt-get install -f -y
+
                           sudo apt-get -y --force-yes install chromium-browser chromium-browser-l10n
                          rm google-chrome-unstable_current_amd64.deb
+
                        fi
+
 
             elif [ "$choice" = "Skype" ];
 
             elif [ "$choice" = "Skype" ];
 
                   then
 
                   then
 
                         cd /tmp
 
                         cd /tmp
                        if [ "i686" = `uname -m` ]; then
+
                           wget http://download.skype.com/linux/skype-ubuntu-intrepid_2.1.0.81-1_${arch}.deb
                           wget http://download.skype.com/linux/skype-ubuntu-intrepid_2.1.0.81-1_i386.deb
+
                           sudo dpkg -i --force-all skype-ubuntu-intrepid_2.1.0.81-1_${arch}.deb
                           sudo dpkg -i --force-all skype-ubuntu-intrepid_2.1.0.81-1_i386.deb
+
 
                           sudo apt-get install -f -y
 
                           sudo apt-get install -f -y
                           rm skype-ubuntu-intrepid_2.1.0.81-1_i386.deb
+
                           rm skype-ubuntu-intrepid_2.1.0.81-1_${arch}.deb > /dev/null 2>&1;
                        else
+
             elif [ "$choice" = "$WORD45" ];
                          wget http://download.skype.com/linux/skype-ubuntu-intrepid_2.1.0.81-1_amd64.deb
+
                          sudo dpkg -i --force-all skype-ubuntu-intrepid_2.1.0.81-1_amd64.deb
+
                          sudo apt-get install -f -y
+
                          rm skype-ubuntu-intrepid_2.1.0.81-1_amd64.deb
+
                        fi
+
             elif [ "$choice" = "Pidgin (including original smileys)" ];
+
 
                   then
 
                   then
 
                         sudo apt-get -y --force-yes install pidgin
 
                         sudo apt-get -y --force-yes install pidgin
                         rm ~/.purple/prefs_backup.xml #in case the user runs the script twice
+
                      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/
 
                         cd ~/.purple/smileys/
                         wget http://files.andreineculau.com/projects/pidgin/original-smileys/pidgin-original-1.9.tgz
+
                         wget http://launchpad.net/ubuntustart/trunk/0.4.2/+download/pidgin-original-1.9.tgz
 
                         tar -xvf pidgin-original-1.9.tgz
 
                         tar -xvf pidgin-original-1.9.tgz
                         rm pidgin-original-1.9.tgz
+
                         rm pidgin-original-1.9.tgz > /dev/null 2>&1;
 
                         cp ~/.purple/prefs.xml ~/.purple/prefs_backup.xml
 
                         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
 
                         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/smileys/
 
                         chown -R $ON_USER ~/.purple/prefs_backup.xml
 
                         chown -R $ON_USER ~/.purple/prefs_backup.xml
           
+
                        chown -R $ON_USER ~/.purple/
elif [ "$choice" = "Estonian ID-card support" ];
+
            elif [ "$choice" = "$WORD50" ];
 
                   then
 
                   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
  
# https://launchpad.net/~boamaod/+archive/ubuntu-idkaart
+
             elif [ "$choice" = "$WORD67" ];
# http://viki.pingviin.org/ID-kaardi_automaatne_seadistamine
+
sudo apt-get install ubuntu-idkaart-allikad                 
+
sudo apt-get install ubuntu-idkaart-paigaldus
+
 
+
             elif [ "$choice" = "Avant-window-navigator" ];
+
                  then
+
# paigalda avant-window-navigator koos lisadega
+
sudo apt-get -y --force-yes install avant-window-navigator awn-applets-c-extras awn-applets-python-extras
+
    elif [ "$choice" = "Thunderbird" ];
+
 
                   then
 
                   then
# paigalda thunderbird koos eesti keele pakiga
+
                        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
sudo apt-get -y --force-yes install thunderbird thunderbird-locale-et
+
                        #also needed: pbuilder for deb packages, but removed to to postfix package installation
 
             elif [ "$choice" = "Dropbox" ];
 
             elif [ "$choice" = "Dropbox" ];
 
                   then
 
                   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"`
 
                         reposs=`cat /etc/apt/sources.list | grep "dropbox"`
 
                         if [ $? -eq 0 ];
 
                         if [ $? -eq 0 ];
426. rida: 617. rida:
 
                               sudo apt-get -y --force-yes install nautilus-dropbox
 
                               sudo apt-get -y --force-yes install nautilus-dropbox
 
                         else
 
                         else
                               echo "deb http://linux.dropbox.com/ubuntu karmic main" | sudo tee -a /etc/apt/sources.list > /dev/null
+
                               echo "deb http://linux.dropbox.com/ubuntu lucid main" | sudo tee -a /etc/apt/sources.list > /dev/null
                               sudo gpg --keyserver pgp.mit.edu --recv-keys 3565780E
+
                               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 update
 
                               sudo apt-get -y --force-yes install nautilus-dropbox
 
                               sudo apt-get -y --force-yes install nautilus-dropbox
 
                         fi
 
                         fi
               elif [ "$choice" = "CCSM" ];
+
               elif [ "$choice" = "$WORD62" ];
 
                   then
 
                   then
                         sudo apt-get -y --force-yes install compizconfig-settings-manager
+
                         sudo apt-get -y --force-yes install compizconfig-settings-manager compiz-fusion-plugins-extra
  
 
               else
 
               else
 
                         choiceLOW=`echo $choice | tr '[:upper:]' '[:lower:]'`
 
                         choiceLOW=`echo $choice | tr '[:upper:]' '[:lower:]'`
 
                         sudo apt-get -y --force-yes install $choiceLOW
 
                         sudo apt-get -y --force-yes install $choiceLOW
 +
                        sudo apt-get install -f -y
 
             fi
 
             fi
 
       done
 
       done
443. rida: 636. rida:
 
       sudo apt-get clean
 
       sudo apt-get clean
 
       sudo apt-get autoclean
 
       sudo apt-get autoclean
 
  # http://ubuntu.pingviin.org/1004kohandamine.html
 
  killall gnome-panel
 
 
#notices
 
#notices
       if [[ "$choicee" = "Change Gnome Calendar first day of the week from Sunday to Monday" || "$choicee" = "Install and configure sharp fonts" ]]; then
+
       if [[ "$choicee" = "$WORD24" || "$choicee" = "$WORD28" || "$choicee" = "$WORD25" || "$choicee" = "$WORD29" ]]; then
       /usr/bin/zenity --info --text="Done! Please log out and then log back in (this is required for some of the tweaks you've selected). \n\nFor bugs and suggestions, please visit: http://www.webupd8.org"
+
       /usr/bin/zenity --info --text="$WORD75 http://www.webupd8.org"
 
       else
 
       else
       /usr/bin/zenity --info --text="Done! All the selected packages have been installed. \n\nFor bugs and suggestions, please visit: http://www.webupd8.org"
+
       /usr/bin/zenity --info --text="$WORD76 http://www.webupd8.org"
 
       IFS=""
 
       IFS=""
 
       fi
 
       fi
       rm /tmp/testinternet
+
       rm /tmp/testinternet > /dev/null 2>&1;
 
else
 
else
       rm /tmp/testinternet
+
       rm /tmp/testinternet > /dev/null 2>&1;
 
       echo cancel selected
 
       echo cancel selected
 
       exit
 
       exit
463. rida: 653. rida:
 
#changelog
 
#changelog
  
#
+
#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
 
#0.4.2.2
510. rida: 769. rida:
 
#added dropbox repository and installation
 
#added dropbox repository and installation
 
#added disable GDM login user list
 
#added disable GDM login user list
#added build-essential, subversion, git, etc
+
#added build-essential, subversion, git, etc</source>
</source>
+

Redaktsioon: 17. mai 2010, kell 10:26

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. Esialgse versiooni autori (Alin Andrei) selgituse kohaselt töötab skript veatult ainult kõvakettale paigaldatud Ubuntu korral.

Sammud

  • 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.
  • Laadida alla skript ja see kävitada.

Vaata täpsemalt

Kohandusskripti kood

#!/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.3
#
#     The script comes with no warranty. The author is not responsible if
#     your system breaks.
#
##   
##    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
langselect=`/usr/bin/zenity --title="Please select a language" --width=300 --height=200 \
                            --text="Select:" \
                            --list --column="Selected" --column="Language" \
                            --radiolist TRUE English FALSE Arabic FALSE Asturian FALSE "Bahasa Indonesia" FALSE Catalan FALSE "Simplified Chinese" False "Traditional Chinese" FALSE Czech FALSE Dutch FALSE Estonian FALSE French FALSE Galician FALSE German FALSE Italian FALSE Japanese FALSE Korean FALSE Malaysian FALSE Polish FALSE "Portuguese (BR)" FALSE "Portuguese (PT)" FALSE Romanian FALSE Slovak FALSE Slovenian FALSE Spanish FALSE Swedish FALSE Turkish FALSE Urdu FALSE Vietnamese`
 
 
if [ $? -eq 0 ];
then
        IFS="|"
        for langSselect in $langselect
        do
               if [ "$langSselect" = "English" ];
                     then 
                     YOURLANG="languages/en.pot"
             elif [ "$langSselect" = "Arabic" ];
                     then
                     YOURLANG="languages/ar.pot"                     
             elif [ "$langSselect" = "Bahasa Indonesia" ];
                     then
                     YOURLANG="languages/id.pot"
             elif [ "$langSselect" = "Asturian" ];
                     then
                     YOURLANG="languages/ast.pot"                     
             elif [ "$langSselect" = "Czech" ];
                     then
                     YOURLANG="languages/cz.pot"                     
              elif [ "$langSselect" = "Catalan" ];
                     then
                     YOURLANG="languages/cat.pot"  
              elif [ "$langSselect" = "Simplified Chinese" ];
                     then
                     YOURLANG="languages/zh_CN.pot"     
              elif [ "$langSselect" = "Traditional Chinese" ];
                     then
                     YOURLANG="languages/zh_TW.pot"                                                             
               elif [ "$langSselect" = "Dutch" ];
                     then
                     YOURLANG="languages/nl.pot"     
               elif [ "$langSselect" = "Estonian" ];
                     then
                     YOURLANG="languages/et.pot"                                         
               elif [ "$langSselect" = "French" ];
                     then
                     YOURLANG="languages/fr.pot"    
               elif [ "$langSselect" = "Galician" ];
                     then
                     YOURLANG="languages/ga.pot"                         
               elif [ "$langSselect" = "German" ];
                     then
                     YOURLANG="languages/de.pot"   
               elif [ "$langSselect" = "Italian" ];
                     then
                     YOURLANG="languages/it.pot"    
              elif [ "$langSselect" = "Japanese" ];
                     then
                     YOURLANG="languages/jp.pot"   
              elif [ "$langSselect" = "Korean" ];
                     then
                     YOURLANG="languages/ko.pot"                           
              elif [ "$langSselect" = "Malaysian" ];
                     then
                     YOURLANG="languages/ms.pot"                                             
               elif [ "$langSselect" = "Polish" ];
                     then
                     YOURLANG="languages/pl.pot"   
              elif [ "$langSselect" = "Portuguese (BR)" ];
                     then
                     YOURLANG="languages/pt_BR.pot"                       
               elif [ "$langSselect" = "Portuguese (PT)" ];
                     then
                     YOURLANG="languages/pt_PT.pot"                                                             
               elif [ "$langSselect" = "Slovak" ];
                     then
                     YOURLANG="languages/sk.pot"    
               elif [ "$langSselect" = "Slovenian" ];
                     then
                     YOURLANG="languages/sl.pot"                        
              elif [ "$langSselect" = "Romanian" ];
                     then
                     YOURLANG="languages/ro.pot"                                                                            
               elif [ "$langSselect" = "Spanish" ];
                     then
                     YOURLANG="languages/es.pot"
               elif [ "$langSselect" = "Swedish" ];
                     then
                     YOURLANG="languages/sv.pot"                     
               elif [ "$langSselect" = "Turkish" ];
                     then
                     YOURLANG="languages/tr.pot"   
               elif [ "$langSselect" = "Urdu" ];
                     then
                     YOURLANG="languages/ur.pot"                          
               elif [ "$langSselect" = "Vietnamese" ];
                     then
                     YOURLANG="languages/vi.pot"                                          
               fi
        done
        IFS=""
else
        echo cancel selected
        exit
fi
 
LANGFILE=$(cat $YOURLANG)
 
n=1
while read curline; do
export WORD$n="$curline" #> /dev/null 2>&1
let n=n+1
done < $YOURLANG
 
#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" FALSE "$WORD24" FALSE "$WORD25" FALSE "$WORD26" FALSE "$WORD27" FALSE "$WORD28" FALSE "$WORD29" TRUE "$WORD30" FALSE "$WORD31" FALSE "$WORD32" FALSE "$WORD33" 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
                     timeee=$(/usr/bin/zenity --entry --title="$WORD35" --text="$WORD36")
                        if [ $timeee ]; then
                            echo LC_TIME=\"$timeee.UTF-8\" | sudo tee -a /etc/default/locale > /dev/null
                        else
                            echo LC_TIME=\"en_GB.UTF-8\" | sudo tee -a /etc/default/locale > /dev/null
                        fi    
                     else
                     echo "You already have custom values for LC_TIME, skipping this tweak"
                     fi
              elif [ "$choicee" = "$WORD25" ];
                     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" = "$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 TRUE "GIMP" "$WORD44" TRUE "$WORD45" "$WORD46" TRUE "WINE" "$WORD47"  TRUE "Dock bar" "$WORD48" TRUE "Chromium Browser" "$WORD49" TRUE "$WORD50" "$WORD51" TRUE "Gnome-Do" "$WORD52" TRUE "Guake" "$WORD53" TRUE "VLC" "$WORD54" TRUE "MPlayer" "$WORD54" TRUE "SMPlayer" "$WORD55" TRUE "Thunderbird" "$WORD56" TRUE "$WORD57" "$WORD58" TRUE "Ubuntu-Tweak" "$WORD59" TRUE "Dropbox" "$WORD60" TRUE "Deluge" "$WORD61" TRUE "$WORD62" "$WORD63" TRUE "Skype" "$WORD64" TRUE "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
       if [[ "$choicee" = "$WORD24" || "$choicee" = "$WORD28" || "$choicee" = "$WORD25" || "$choicee" = "$WORD29" ]]; then
       /usr/bin/zenity --info --text="$WORD75 http://www.webupd8.org"
       else
       /usr/bin/zenity --info --text="$WORD76 http://www.webupd8.org"
       IFS=""
       fi
       rm /tmp/testinternet > /dev/null 2>&1;
else
       rm /tmp/testinternet > /dev/null 2>&1;
       echo cancel selected
       exit
fi
 
 
#changelog
 
#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