#!/bin/bash
#######################################################################
#
# Dieses Script soll die ersten Schritte mit Ubuntu 11.04 Natty 32-Bit und 64-Bit erleichtern,
# so dass man sein System an seine Wuensche anpassen und ggf. optimieren kann.
#
# The script comes with no warranty. The author is not responsible if
# your system breaks.
#
#
# 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 .
#
# Title : ubuntu-11.04-tweak
# Author : Lars Moelleken (suckup.de)
# Date : 2011-05-20
# Requires : dialog, mktemp (sudo aptitude install dialog mktemp)
#
# based on the script of: Copyright (C) 2010 Alin Andrei, http://www.webupd8.org - ubuntu-11.04-script
#
#######################################################################
# einige Variablen werden festgelegt
VERSION="0.5"
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
TRUETYPEPATH="/usr/share/fonts/truetype/"
SOURCES="/etc/apt/sources.list"
SOURCESD="/etc/apt/sources.list.d"
BACKUP="/etc/apt/backup"
BACKUP_OLD="/etc/apt/backup_old"
export OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
export CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
export OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E ${LINUXPKG} |grep -vE ${METALINUXPKG}|grep -v ${CURKERNEL})
export USER=$(whoami)
export ON_USER=$(echo ~ | awk -F'/' '{ print $1 $2 $3 }' | sed 's/home//g')
export TMPFILE=$(mktemp -t)
export ARCHITECTURE=$(uname -m)
export HOST=$(hostname)
export UBUNTU=$(lsb_release -cs)
export PATH="/usr/bin:/usr/sbin:/bin:/sbin"
# check: ist "aptitude / dialog / mktemp" installiert?
if [ \! -f `whereis aptitude | cut -f 2 -d ' '` ] ; then
# wenn nicht, wird dies installiert
sudo apt-get install aptitude
fi
if [ \! -f `whereis dialog | cut -f 2 -d ' '` ] ; then
# wenn nicht, wird dies installiert
sudo aptitude install dialog
fi
if [ \! -f `whereis mktemp | cut -f 2 -d ' '` ] ; then
# wenn nicht, wird dies installiert
sudo aptitude install mktemp
fi
# chooseDialog: Einstellungen fuer "dialog" werden mit dieser Funktion festgelegt
#
function chooseDialog {
DIALOGAPP=`which dialog 2> /dev/null` || DIALOGAPP=`which whiptail 2> /dev/null`
}
# setDialogDimensions: Funktion um die Groesse von "dialog" zu bestimmen
#
# Das Skript sieht nur hier am Anfang etwas eigenartig aus, im weiterem Verlauf, lassen sich...
# ... verstaendlichere Beispiele fuer Funktionen etc. finden. ;-)
#
function setDialogDimensions {
test -x /usr/bin/tty && CONSOLE=`/usr/bin/tty`
test -z "${CONSOLE}" && CONSOLE=/dev/console
# Konsolen groesse bestimmen (Zeilen - Spalten)
SIZE=$(stty size < ${CONSOLE})
SCREEN_W=${SIZE#*\ }
SCREEN_H=${SIZE%%\ *}
if [ "${SCREEN_W}" -gt 0 ]; then
let "MAX_W = ${SCREEN_W} - 2"
fi
if [ "${SCREEN_H}" -gt 0 ]; then
let "MAX_H = ${SCREEN_H} - 2"
fi
TEXT_W=`echo "${1}" | wc -L`
TEXT_H=`echo "${1}" | wc -l`
let "DIALOG_H = $TEXT_H + 8"
let "THRESH = 2 * ${DIALOG_H}"
let "DIALOG_W = ${TEXT_W} + 8"
if [ ${DIALOG_W} -lt ${THRESH} ]; then
let "DIALOG_W = 2 * ${DIALOG_W}"
fi
if [ "${DIALOG_W}" -lt 20 ]; then
let "DIALOG_W = 20"
fi
if [ "${DIALOG_H}" -lt 10 ]; then
let "DIALOG_H = 10"
fi
if [ "${DIALOG_W}" -gt "${MAX_W}" ]; then
let "DIALOG_W = ${MAX_W}"
fi
if [ "${DIALOG_H}" -gt "${MAX_H}" ]; then
let "DIALOG_H = ${MAX_H}"
fi
}
# check: ob Ubuntu natty installiert ist
if [ "natty" = ${UBUNTU} ]; then
# check: ob Ubuntu in 32 oder 64-Bit installiert ist
chooseDialog
TITLE="Ubuntu 11.04"
MESSAGE="\nUbuntu 11.04 Natty - OK"
setDialogDimensions "${MESSAGE}"
dialog --title " `echo -e "${TITLE}"`" --infobox "`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
if [ "i686" = ${ARCHITECTURE} ]; then
ARCH=i386
elif [ "x86_64" = ${ARCHITECTURE} ]; then
ARCH=amd64
# ansonsten wird das Skript beenedet (!= 32 bzw. 64-Bit System)
else
chooseDialog
TITLE="ERROR: Du nutzt nicht Ubuntu 11.04"
MESSAGE="\nDu nutzt nicht Ubuntu 11.04 Natty 32 oder 64-Bit"
setDialogDimensions "${MESSAGE}"
dialog --title "`echo -e "${TITLE}"`" --msgbox "`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
fi
# ansonsten wird das Skript beendet (!= natty)
else
chooseDialog
TITLE="ERROR: Du nutzt nicht Ubuntu 11.04"
MESSAGE="\nDu nutzt nicht Ubuntu 11.04 Natty 32 oder 64-Bit"
setDialogDimensions "${MESSAGE}"
dialog --title "`echo -e "${TITLE}"`" --infobox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
# wenn gewuenscht, wird das Update auf Version 11.04 installiert
chooseDialog
# FEHLER - Auswahl LTS oder NORMAL
TITLE="Ubuntu 11.04 Natty"
MESSAGE="Ubuntu Update 11.04 Natty auf $HOST installieren? "
setDialogDimensions "${MESSAGE}"
dialog --title "`echo -e "${TITLE}"`" --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
apt-get update && aptitude upgrade
aptitude install update-manager-core
sudo sed -i "s/Prompt.*/Prompt=normal/g" /etc/update-manager/release-upgrades
do-release-upgrade
exit
else
exit
fi
fi
# check: ob du die passenden Rechte hast (!= root)
if [ ${USER} != "root" ]; then
chooseDialog
TITLE="ERROR: Du bist nicht root"
MESSAGE="\nDu bist nicht root, du bist '${USER}'!\n\n (versuche es mal mit \"sudo bash $0\")"
setDialogDimensions "${MESSAGE}"
dialog --colors --title "`echo -e "${TITLE}"`" --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
exit
fi
# check: ob Updates anstehen
COUNT=`apt-get -s upgrade | grep -c "Inst"`
chooseDialog
TITLE="[${HOST}] - Update Hinweis"
MESSAGE="SYSTEMMELDUNG:\nAuf ${HOST} sind ${COUNT} neue Updates vorhanden!"
setDialogDimensions "${MESSAGE}"
# wenn Updates ansteht, wird eine Meldung uber dessen Anzahl angezeigt
if [ ${COUNT} -gt 0 ]; then
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
fi
# Ein Backup der aktuellen sources.list wird erstellt...
# ... wenn das Verzeichnis bereits angelegt ist.
if [ -d ${BACKUP} ] ; then
# fuer alle Dateien, im Backup-Verzeichnis
for I in `ls ${BACKUP}` ; do
# wenn diese nicht bereits auf .bz2 enden
if [ ${I} != "*.bz2" ]; then
# werden die Dateien komprimiert...
# ... mit "bunzip2" kann man diese wieder dekomprimieren.
bzip2 -z -f -q ${BACKUP}/${I}
fi
done
else
# ansonsten wird erst-einmal das Backup-Verzeichnis angelegt
mkdir ${BACKUP}
chooseDialog
TITLE="Backup-Verzeichnis"
MESSAGE="Backup-Verzeichnis wurde angelegt - ${BACKUP}"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
fi
# wenn bereits Dateien in dem Verzeichnis liegen, dann...
if [ -d ${BACKUP} ] ; then
# nach 30 Tagen werden die Backups gelöscht
find ${BACKUP} -iregex '.*\.\(bz2\)' -mtime +7 -exec mv {} ${BACKUP_OLD} \;
# nach 7 Tagen werden die Dateien nach /etc/apt/backup_old verschoben
find ${BACKUP_OLD} -iregex '.*\.\(bz2\)' -mtime +30 -exec rm {} \;
else
# ansonsten wird erst-einmal das Backup_old-Verzeichnis angelegt
mkdir ${BACKUP_OLD}
chooseDialog
TITLE="Backup-Verzeichnis"
MESSAGE="Backup_old-Verzeichnis wurde angelegt - ${BACKUP_OLD}"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
fi
# und die sources.list mit dem aktuellen Datum gespeichert
BAK=sources.old.$(date "+%y%m%d-%H%M")
cp -p ${SOURCES} ${BACKUP}/${BAK}
chooseDialog
TITLE="Backup-sources.list"
MESSAGE="Backup deiner sources.list wurde angelegt - ${BACKUP}/${BAK}"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
# check: ob ein Paket-Manager bereits laeuft
sleep 1
for LOCK in synaptic update-manager software-center apt-get dpkg aptitude ; do
# wenn ein Update-Manager bereits laeft, dann wird das Skript beendet
if ps -U root -u root u | grep ${LOCK} | grep -v grep > /dev/null; then
chooseDialog
TITLE="ERROR: ${LOCK} laeuft bereits"
MESSAGE="SYSTEMMELDUNG:\nDas Skript wird nicht laufen, wenn du ${LOCK} nicht vorher beendest!"
setDialogDimensions "${MESSAGE}"
dialog --title " ERROR: ${LOCK} laeuft bereits " --msgbox "\n`echo -e "${MESSAGE}"`" 10 50
exit
fi
done
# gconf-tool mit den passenden User-Rechten starten
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
# testConnection: check-funktion - ob eine Internet-Verbindung besteht
#
function testConnection() {
# Verbindung nach www.google.de wird 3-mal versucht aufzubauen
TESTCONNECTION=`wget --tries=3 --timeout=10 www.google.de -O ${TMPFILE} &>/dev/null 2>&1`
# wenn keine Verbindung hergestellt werden konnte, dann wird eine entsprechende Meldung angezeigt
if [ ${?} != 0 ]; then
chooseDialog
TITLE="INFO: Internet-Verbindung - Problem"
MESSAGE="\nEs besteht ggf. momentan keine Internet-Verbindung (www.google.de konnte nicht erreicht werden), es koennen einige Funktionen des Skriptes daher nicht genutzt werden."
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
export INTERNET="nein"
else
# ansonsten ist alles OK
chooseDialog
TITLE="INFO: Internet-Verbindung - OK"
MESSAGE="\nEs besteht eine Internet-Verbindung."
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --infobox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
export INTERNET="ja"
fi
}
# launchpad_add: In dieser Funktion, kann man mehrere Dinge auswaehlen, die ausgewaehlen Punkte, werden in ein Array
# ... geschrieben und einen nach dem anderen Punkt abgearbeitet.
#
function launchpad_add() {
chooseDialog
# check-funktion wird aufgerufen
testConnection
TITLE="Extra-Repositories"
MESSAGE="Extra-Repositories: fuer Ubuntu 11.04"
setDialogDimensions "${MESSAGE}"
dialog --backtitle " ${TITLE} " \
--checklist "\n`echo -e "${MESSAGE}"`" 120 80 60 \
01 "Medibuntu - Ubuntu Extras (non-free)" off\
02 "Avant - Window Navigator" off\
03 "Nautilus Elementary - erweiterter Dateimanager" off\
04 "Gloobus - Datei (Bild, Text, Audio...) Vorschau" off\
05 "Chromium - fast Browser" off\
06 "LibreOffice - Office (Tabellen- Textverarbeitung...)" off\
07 "Gnome DO - Globaler Programm-Starter" off\
08 "Ubuntu Tweak - Ubuntu Tweak Tool" off\
09 "Wine - Windows Programme in Linux starten" off\
10 "Flash - Adobe Flash (non-free)" off\
11 "Equinox - Ubuntu Themes" off\
12 "GetDep - viele neue Programm Updates" off\
13 "VirtualBox - Virtuelle PCs installieren" off\
14 "Dropbox - Netzwerk-Dateisystem" off\
15 "Pidgin - Chat-Client" off\
16 "gpm - Mauszeigers in der Systemkonsole" off\
17 "Claws Mail - schneller Mail-Client" off\
18 "VLC - Media Player" off\
19 "Skype - VoIP-Software (non-free)" off 2>${TMPFILE}
if [ ${?} -ne 0 ]; then return; fi
read RESULT <${TMPFILE}
ARRAY=(${RESULT})
chooseDialog
TITLE="Extra-Repositories"
MESSAGE="Moechtest du die Extra-Repositories wirklich eintragen bzw. die Programme installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "1" ]; then return; fi
for I in ${ARRAY[@]}; do
case ${I} in
\"01\")
grep -iv medibuntu ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list;
sudo apt-get --quiet update;
sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring;
sudo apt-get --quiet update ; sudo aptitude install app-install-data-medibuntu apport-hooks-medibuntu;
chooseDialog
TITLE="Codecs installieren"
MESSAGE="Moechtest du das codecs-Pakete (+DVD Unterstuetzung) von medibuntu installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install libdvdcss2 ubuntu-restricted-extras faac faad lame non-free-codecs ubuntu-restricted-extras gxine libmpcdec3 libquicktime1 flac sox ffmpeg2theora libmpeg2-4 libmpeg3-1 mpeg3-utils mpegdemux liba52-dev mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-base gstreamer0.10-plugins-good libdvdnav4 libdvdread4 libmp4v2-0 libxine1-ffmpeg flashplugin-nonfree sun-java6-fonts rar unrar p7zip-full p7zip-rar unace unp zip unzip ttf-mscorefonts-installer ttf-liberation mencoder mplayer sun-java6-plugin sun-java6-jre mplayer smplayer totem-mozilla icedax tagtool easytag id3tool nautilus-script-audio-convert libmad0 libjpeg-progs libxvidcore4;
if [ ${ARCH} = "i386" ]; then
sudo aptitude install w32codecs libxine-extracodecs totem-xine;
elif [ ${ARCH} = "amd64" ]; then
sudo aptitude install w64codecs gstreamer0.10-pitfdll;
fi
fi
;;
\"02\")
grep -iv awn-testing ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:awn-testing/ppa
chooseDialog
TITLE="AWN installieren"
MESSAGE="Moechtest du auch das Paket (AWN) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install avant-window-navigator-trunk avant-window-navigator-data-trunk awn-applets-c-extras awn-applets-python-extras python-awn-extras
fi
;;
\"03\")
grep -iv nautilus-elementary ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:am-monkeyd/nautilus-elementary-ppa
grep -iv elementarydesktop ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:elementaryart/elementarydesktop
chooseDialog
TITLE="Nautilus-Elementary installieren"
MESSAGE="Moechtest du auch das Paket (Nautilus-Elementary) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude upgrade nautilus
fi
;;
\"04\")
grep -iv gloobus-dev ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:gloobus-dev/gloobus-preview
sudo add-apt-repository ppa:gloobus-dev/covergloobus
chooseDialog
TITLE="Gloobus-Preview installieren"
MESSAGE="Moechtest du auch das Paket (Gloobus-Preview) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install gloobus-preview
fi
;;
\"05\")
grep -iv chromium-daily ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:chromium-daily/ppa
chooseDialog
TITLE="Chromium installieren"
MESSAGE="Moechtest du auch das Paket (Chromium) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg-extra chromium-codecs-ffmpeg-nonfree
fi
;;
\"06\")
grep -iv libreoffice ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:libreoffice/ppa
chooseDialog
TITLE="OpenOffice updaten"
MESSAGE="Moechtest du auch das Paket (OpenOffice) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install libreoffice libreoffice-base libreoffice-gnome lo-menubar
fi
;;
\"07\")
chooseDialog
TITLE="Gnome-Do installieren"
MESSAGE="Moechtest du auch das Paket (Gnome-Do) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install gnome-do gnome-do-plugins
fi
;;
\"08\")
grep -iv tualatrix ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:tualatrix/ppa
grep -iv ubuntu-tweak ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:ubuntu-tweak-testing/ppa
chooseDialog
TITLE="Ubuntu-Tweak installieren"
MESSAGE="Moechtest du auch das Paket (Ubuntu-Tweak) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install ubuntu-tweak
fi
;;
\"09\")
grep -iv ubuntu-wine ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:ubuntu-wine/ppa
chooseDialog
TITLE="Wine installieren"
MESSAGE="Moechtest du auch das Paket (Wine) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install wine1.3 wine1.3-gecko
fi
;;
\"10\")
grep -iv sevenmachines ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:sevenmachines/flash
chooseDialog
TITLE="flashplugin installieren"
MESSAGE="Moechtest du auch das Paket (flashplugin) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
pkill -9 firefox*
if [ ${ARCH} = "i386" ]; then
sudo aptitude purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper flashplugin-installer
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f /home/${ON_USER}/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper
sudo apt-get update ; sudo aptitude install flashplugin-nonfree
elif [ ${ARCH} = "amd64" ]; then
sudo aptitude purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper flashplugin-installer
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f /home/${ON_USER}/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper
sudo apt-get update ; sudo aptitude install flashplugin64-nonfree
fi
fi
;;
\"11\")
grep -iv tiheum ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:tiheum/equinox
chooseDialog
TITLE="zusaetzliche Ubuntu Themes installieren"
MESSAGE="Moechtest du auch die Pakete installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install gtk2-engines-equinox equinox-theme
fi
;;
\"12\")
grep -iv getdeb ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
A="## GetDeb"
B="deb http://archive.getdeb.net/ubuntu natty-getdeb apps"
C="deb http://archive.getdeb.net/ubuntu natty-getdeb games"
D="deb-src http://archive.getdeb.net/ubuntu natty-getdeb apps"
E="deb-src http://archive.getdeb.net/ubuntu natty-getdeb games"
echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" >> ${SOURCES}
wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
chooseDialog
TITLE="Update durchfuehren"
MESSAGE="Moechtest du das Update (Quellen von getdeb.net) nun durchfuehren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude -t natty-getdeb upgrade
fi
;;
\"13\")
grep -iv download.virtualbox ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
A="## VirtualBox (download.virtualbox)"
B="deb http://download.virtualbox.org/virtualbox/debian natty non-free"
echo -e "${A}" "\n${B}" >> ${SOURCES}
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
chooseDialog
TITLE="VirtualBox installieren"
MESSAGE="Moechtest du auch das Paket (VirtualBox) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install virtualbox-4.0
fi
;;
\"14\")
grep -iv getdeb ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
A="## GetDeb"
B="deb http://archive.getdeb.net/ubuntu natty-getdeb apps"
C="deb http://archive.getdeb.net/ubuntu natty-getdeb games"
D="deb-src http://archive.getdeb.net/ubuntu natty-getdeb apps"
E="deb-src http://archive.getdeb.net/ubuntu natty-getdeb games"
echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" >> ${SOURCES}
wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
#grep -iv linux.dropbox ${SOURCES} > ${TMPFILE}
#cp -p ${TMPFILE} ${SOURCES}
#echo "deb http://linux.dropbox.com/ubuntu natty main" | sudo tee -a ${SOURCES} > /dev/null
#echo "deb-src http://linux.dropbox.com/ubuntu natty main" | sudo tee -a ${SOURCES} > /dev/null
#sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 5044912E
chooseDialog
TITLE="Dropbox installieren"
MESSAGE="Moechtest du auch das Paket (nautilus-dropbox) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install nautilus-dropbox
fi
;;
\"15\")
grep -iv pidgin-developers ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:pidgin-developers/ppa
chooseDialog
TITLE="Pidgin installieren"
MESSAGE="Moechtest du auch das Paket (Pidgin) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install pidgin
if [ -f `whereis skype | cut -f 2 -d ' '` ] ; then
sudo aptitude install pidgin-skype
fi
fi
;;
\"16\")
chooseDialog
TITLE="gpm installieren"
MESSAGE="Moechtest du auch das Paket (gpm) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo aptitude install gpm
fi
;;
\"17\")
grep -iv claws-mail ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:claws-mail/ppa
chooseDialog
TITLE="Claws-Mail installieren"
MESSAGE="Moechtest du auch das Paket (claws-mail) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install claws-mail
fi
;;
\"18\")
chooseDialog
TITLE="VLC installieren"
MESSAGE="Moechtest du auch das Paket (vlc) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install vlc mozilla-plugin-vlc
fi
;;
\"19\")
grep -iv archive.canonical.com ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
echo "deb http://archive.canonical.com/ubuntu natty partner" | sudo tee -a ${SOURCES} > /dev/null
echo "deb-src http://archive.canonical.com/ubuntu natty partner" | sudo tee -a ${SOURCES} > /dev/null
chooseDialog
TITLE="Skype installieren"
MESSAGE="Moechtest du auch das Paket (skype) installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update ; sudo aptitude install skype earcandy
fi
;;
*)
echo "Fehler?!?!"
;;
esac
done
}
# unity_tweak: In dieser Funktion, kann man mehrere Dinge auswaehlen, die ausgewaehlen Punkte, werden in ein Array
# ... geschrieben und einen nach dem anderen Punkt abgearbeitet.
#
function unity_tweak() {
chooseDialog
testConnection
TITLE="Unity-Tweak"
MESSAGE="Unity-Tweak: fuer Ubuntu 11.04"
setDialogDimensions "${MESSAGE}"
dialog --backtitle "${TITLE}" \
--checklist "\n`echo -e "${MESSAGE}"`" 120 100 60 \
01 "Zeitgeist History löschen" off\
02 "RAM/CPU im Panel" off\
03 "Wetter im Panel" off\
04 "Compiz Settings Manager" off\
05 "Links zu eigenen Datein im Starter hinzufuegen" off\
06 "Link zum Desktop im Startet hinzufuegen" off\
07 "Benachrichtigungen fuer alle Programme" off\
08 "Reset: Benachrichtigungen fuer alle Programme" off\
09 "GlobalMenu entfernen" off\
10 "Reset: GlobalMenu entfernen" off\
11 "Overlay Scrollbars entfernen" off\
12 "Reset: Overlay Scrollbars entfernen" off\
13 "Unity 2D installieren" off 2>${TMPFILE}
if [ ${?} -ne 0 ]; then return; fi
read RESULT <${TMPFILE}
ARRAY=(${RESULT})
chooseDialog
TITLE="Tweak"
MESSAGE="Moechtest du die Aenderungen wirklich durchfuehren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "1" ]; then return; fi
for I in ${ARRAY[@]}; do
case ${I} in
\"01\")
rm /home/${ON_USER}/.local/share/zeitgeist/activity.sqlite;
zeitgeist-daemon --replace;
;;
\"02\")
grep -iv alexeftimie ${SOURCES} > ${TMPFILE}
cp -p ${TMPFILE} ${SOURCES}
sudo add-apt-repository ppa:alexeftimie/ppa;
chooseDialog
TITLE="Indicator-Sysmonitor"
MESSAGE="Moechtest den indicator-sysmonitor installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo apt-get update; sudo aptitude install indicator-sysmonitor;
fi
;;
\"03\")
sudo aptitude install indicator-weather
;;
\"04\")
chooseDialog
TITLE="CompizConfig Settings Manager"
MESSAGE="Moechtest den CompizConfig Settings Manager installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo aptitude install compizconfig-settings-manager dconf-tools
fi
;;
\"05\")
echo "[Desktop Entry]
Name=Home Folder
Comment=Open your personal folder
TryExec=nautilus
Exec=nautilus --no-desktop
Icon=user-home
Terminal=false
StartupNotify=true
Type=Application
Categories=GNOME;GTK;Core;
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-Ubuntu-Gettext-Domain=nautilus
X-Ayatana-Desktop-Shortcuts=Videos;Dokumente;Musik;Bilder;Downloads
[Videos Shortcut Group]
Name=Videos
Exec=nautilus Videos
TargetEnvironment=Unity
[Documents Shortcut Group]
Name=Dokumente
Exec=nautilus Dokumente
TargetEnvironment=Unity
[Musik Shortcut Group]
Name=Musik
Exec=nautilus Musik
TargetEnvironment=Unity
[Bilder Shortcut Group]
Name=Bilder
Exec=nautilus Bilder
TargetEnvironment=Unity
[Downloads Shortcut Group]
Name=Downloads
Exec=nautilus Downloads
TargetEnvironment=Unity" | sudo tee /usr/share/applications/nautilus-home.desktop;
;;
\"06\")
sudo aptitude install wmctrl;
echo "#!/bin/sh
if wmctrl -m | grep \"mode: ON\"; then
exec wmctrl -k off
else
exec wmctrl -k on
fi" | sudo tee /usr/local/bin/showdesktop;
sudo chmod +x /usr/local/bin/showdesktop;
echo "[Desktop Entry]
Name=Show Desktop
Exec=/usr/local/bin/showdesktop
Icon=desktop
Terminal=false
Type=Application
StartupNotify=false" | sudo tee /usr/share/applications/showdesktop.desktop;
echo "Du kannst die Datei \"Show Desktop\" nun in den Starter ziehen.";
sudo -u ${ON_USER} nautilus /usr/share/applications/showdesktop.desktop;
;;
\"07\")
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
;;
\"08\")
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray']"
;;
\"09\")
chooseDialog
TITLE="GlobalMenu deinstallieren"
MESSAGE="Moechtest du GlobalMenu deinstallieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo aptitude remove appmenu-gtk indicator-applet-appmenu indicator-appmenu;
fi
;;
\"10\")
chooseDialog
TITLE="GlobalMenu installieren"
MESSAGE="Moechtest du GlobalMenu installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo aptitude install appmenu-gtk indicator-applet-appmenu indicator-appmenu;
fi
;;
\"11\")
chooseDialog
TITLE="overlay Scrollbars deinstallieren"
MESSAGE="Moechtest du overlay scrollbars deinstallieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo aptitude remove overlay-scrollbar liboverlay-scrollbar-0.1-0;
fi
;;
\"12\")
chooseDialog
TITLE="overlay Scrollbars installieren"
MESSAGE="Moechtest du overlay scrollbars installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo aptitude install overlay-scrollbar liboverlay-scrollbar-0.1-0;
fi
;;
\"13\")
chooseDialog
TITLE="Unity 2D installieren"
MESSAGE="Moechtest du Unity 2D installieren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "0" ]; then
sudo aptitude install unity-2d;
fi
;;
*)
echo "Fehler?!?!"
;;
esac
done
}
# gnome_tweak: In dieser Funktion, kann man mehrere Dinge auswaehlen, die ausgewaehlen Punkte, werden in ein Array
# ... geschrieben und einen nach dem anderen Punkt abgearbeitet.
#
function gnome_tweak() {
chooseDialog
testConnection
TITLE="Gnome-Tweak"
MESSAGE="Gnome-Tweak: fuer Ubuntu 11.04"
setDialogDimensions "${MESSAGE}"
dialog --backtitle "${TITLE}" \
--checklist "\n`echo -e "${MESSAGE}"`" 120 100 60 \
01 "Window Buttons nach links verschieben" off\
02 "Reset: Window Buttons nach rechts verschieben" off\
03 "Aendere den Update Manager - auto Benachrichtigung aus" off\
04 "Reset: Aendere den Update Manager - auto Benachrichtigung an" off\
05 "Ausschalten des GDM Login-Sound" off\
06 "Reset: Einschalten des GDM Login-Sound" off\
07 "mount-Drive Icons vom Desktop entfernen" off\
08 "Reset: mount-Drive Icons auf dem Desktop anzeigen" off\
09 "Icons im Menue anzeigen" off\
10 "Reset: Icons im Menue entfernen" off 2>${TMPFILE}
if [ ${?} -ne 0 ]; then return; fi
read RESULT <${TMPFILE}
ARRAY=(${RESULT})
chooseDialog
TITLE="Tweak"
MESSAGE="Moechtest du die Aenderungen wirklich durchfuehren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "1" ]; then return; fi
for I in ${ARRAY[@]}; do
case ${I} in
\"01\")
sudo -u ${ON_USER} DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS}" gconftool-2 --type string --set /apps/metacity/general/button_layout "menu:minimize,maximize,spacer,close"
;;
\"02\")
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:"
;;
\"03\")
sudo -u ${ON_USER} DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS}" gconftool -s --type bool /apps/update-notifier/auto_launch false
;;
\"04\")
sudo -u ${ON_USER} DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS}" gconftool -s --type bool /apps/update-notifier/auto_launch true
;;
\"05\")
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
;;
\"06\")
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
;;
\"07\")
sudo -u ${ON_USER} DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS}" gconftool -s --type bool /apps/nautilus/desktop/volumes_visible false
;;
\"08\")
sudo -u ${ON_USER} DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS}" gconftool -s --type bool /apps/nautilus/desktop/volumes_visible true
;;
\"09\")
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
;;
\"10\")
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
;;
*)
echo "Fehler?!?!"
;;
esac
done
}
# ubuntu_tweak: In dieser Funktion, kann man mehrere Dinge auswaehlen, die ausgewaehlen Punkte, werden in ein Array
# ... geschrieben und einen nach dem anderen Punkt abgearbeitet.
#
function ubuntu_tweak() {
chooseDialog
testConnection
TITLE="Ubuntu-Tweak"
MESSAGE="Ubuntu-Tweak: fuer Ubuntu 11.04"
setDialogDimensions "${MESSAGE}"
dialog --backtitle "${TITLE}" \
--checklist "\n`echo -e "${MESSAGE}"`" 120 100 60 \
01 "Ausschalten der GDM Login User Liste" off\
02 "Reset: Einschalten der GDM Login User List" off\
03 "Entferne das ubuntu-docs Packet (252MB)" off\
04 "Reset: Installiere das ubuntu-docs Packet" off\
05 "Aedere den Gnome Kalender, erster Tag der Woche von Sonntag zu Montag" off\
06 "Reset: Aedere den Gnome Kalender, erster Tag der Woche von Montag zu Sonntag" off\
07 "Installiere und Konfiguriere Sharp-Fonts" off\
08 "Reset: Deconfigure Sharp-Fonts" off\
09 "Fix 'apt-get update' fuer Google-Repository" off\
10 "Reset: Fix 'apt-get update' fuer Google-Repository" off\
11 "Auto mount NTFS Partitionen beim Systemstart" off\
12 "Reset: Ausschalten des auto mount für NTFS Partitionen beim Systemstart" off\
13 "Firefox optimieren" off\
14 "IPv6 aktivieren (teredo)" off\
15 "IPv6 deaktivieren (teredo)" off\
16 "Sprachdateien im Ubuntu aufraeumen" off\
17 "Wichtige Dateien werden vor dem loeschen geschuetzt (safe-rm)" off 2>${TMPFILE}
if [ ${?} -ne 0 ]; then return; fi
read RESULT <${TMPFILE}
ARRAY=(${RESULT})
chooseDialog
TITLE="Tweak"
MESSAGE="Moechtest du die Aenderungen wirklich durchfuehren?"
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --yesno "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
RESULT1=${?}
if [ ${RESULT1} = "1" ]; then return; fi
for I in ${ARRAY[@]}; do
case ${I} in
\"01\")
sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true
;;
\"02\")
sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list false
;;
\"03\")
sudo aptitude remove ubuntu-docs
;;
\"04\")
sudo aptitude install ubuntu-docs
;;
\"05\")
TIMEE=$(grep "LC_TIME" /etc/default/locale)
if [ ! ${TIMEE} ]; then
dialog --backtitle "Locale" \
--form " You've selected to change Calendar first \nday of the week from Sunday to Monday. Please \nenter your country locale (e.g. en__GB, it__IT and \nso on) - required by this tweak. \n\nIf you do not enter a value, \"de_DE\" will be used. " 21 70 18 \
"locale" 4 4 "de_DE" 4 15 20 0\
2>${TMPFILE}
if [ ${?} -ne 0 ]; then return; fi
read TIMEE <${TMPFILE}
dialog --title " Locale eintragen " --yesno "Moechtest du wirklich folgendes wirklich eintragen \n ${TIMEE}" 10 75
TIMEE1=${?}
if [ ${TIMEE1} = "1" ]; then
echo LC_TIME=\"${TIMEE}.UTF-8\" | sudo tee -a /etc/default/locale > /dev/null
dialog --title " Locale wurde gesetzt " --msgbox "\n ${TIMEE}" 10 75
else
echo LC_TIME=\"de_DE.UTF-8\" | sudo tee -a /etc/default/locale > /dev/null
dialog --title " Locale wurde gesetzt " --msgbox "\n de_DE.UTF-8" 10 75
fi
else
echo "You already have custom values for LC_TIME, skipping this tweak"
fi
;;
\"06\")
sudo sed -i '/^LC_TIME.*/d' /etc/default/locale;
;;
\"07\")
testConnection
dialog --title " INFO: Bitte warten " --msgbox "\nDie installation der Sharp Fonts kann einen Moment dauern, abhänig von deiner Internet-Verbindung." 10 50
sudo aptitude install cabextract ttf-droid msttcorefonts
cd /tmp
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
if [ ! -d ${TRUETYPEPATH} ]; then
mkdir -p ${TRUETYPEPATH}
fi
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
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;
exists() { which "$1" &> /dev/null ; }
if ! [ -d /home/${ON_USER}/.fonts ] ; then
exec 2>&1
echo 'There is no .fonts directory in your home.'
echo 'Is fontconfig set up for privately installed fonts?'
exit 1
fi
# split up to keep the download command short
DL_HOST=download.microsoft.com
DL_PATH=download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26
ARCHIVE=PowerPointViewer.exe
URL="http://${DL_HOST}/${DL_PATH}/${ARCHIVE}"
if ! [ -e "${ARCHIVE}" ] ; then
if exists curl ; then curl -O "${URL}"
elif exists wget ; then wget "${URL}"
elif exists fetch ; then fetch "${URL}"
fi
fi
TMPDIR=`mktemp -d`
trap 'rm -rf "$TMPDIR"' EXIT INT QUIT TERM
cabextract -L -F ppviewer.cab -d "${TMPDIR}" "${ARCHIVE}"
cabextract -L -F '*.TT[FC]' -d /home/${ON_USER}/.fonts "${TMPDIR}/ppviewer.cab"
( cd /home/${ON_USER}/.fonts && mv cambria.ttc cambria.ttf && chmod 600 \
calibri{,b,i,z}.ttf cambria{,b,i,z}.ttf candara{,b,i,z}.ttf \
consola{,b,i,z}.ttf constan{,b,i,z}.ttf corbel{,b,i,z}.ttf )
fc-cache -fv /home/${ON_USER}/.fonts
A=""
B=""
C=""
D=""
E="rgb"
F=""
G=""
H=""
I=""
J="true"
K=""
L=""
M=""
N=""
O="hintfull"
P=""
Q=""
R=""
S=""
T="true"
U=""
V=""
W=""
X=""
Y="FixedsysTTF"
Z=""
AA=""
AB="false"
AC=""
AD=""
AE=""
AF=""
AG="Tahoma"
AH=""
AI=""
AJ="9"
AK=""
AL=""
AM="false"
AN=""
AO=""
AP=""
AQ=""
AR="Times New Roman"
AS=""
AT=""
AU="13"
AV=""
AW=""
AX="false"
AY=""
AZ=""
BA=""
BB=""
BC="Courier"
BD="Courier New"
BE="Courier 10 Pitch"
BF=""
BG=""
BH="11"
BI=""
BJ=""
BK="false"
BL=""
BM=""
BN=""
BO=""
BP="Courier New"
BQ="Times New Roman"
BR="Tahoma"
BS="FixedsysTTF"
BT=""
BU=""
BV="hintslight"
BW=""
BX=""
BY="false"
BZ=""
CA=""
CB=""
CC=""
CD="Bitstream Vera Sans"
CE=""
CF=""
CG="Arial"
CH=""
CI=""
CJ=""
CK=""
CL="Helvetica"
CM=""
CN=""
CO="Arial"
CP=""
CQ=""
CR=""
CS=""
CT="Palatino"
CU=""
CV=""
CW="Georgia"
CX=""
CY=""
CZ=""
echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" "\n${F}" "\n${G}" "\n${H}" "\n${I}" "\n${J}" "\n${K}" "\n${L}" "\n${M}" "\n${N}" "\n${O}" "\n${P}" "\n${Q}" "\n${R}" "\n${S}" "\n${T}" "\n${U}" "\n${V}" "\n${W}" "\n${X}" "\n${Y}" "\n${Z}" "${AA}" "\n${AB}" "\n${AC}" "\n${AD}" "\n${AE}" "\n${AF}" "\n${AG}" "\n${AH}" "\n${AI}" "\n${AJ}" "\n${AK}" "\n${AL}" "\n${AM}" "\n${AN}" "\n${AO}" "\n${AP}" "\n${AQ}" "\n${AR}" "\n${AS}" "\n${AT}" "\n${AU}" "\n${AV}" "\n${AW}" "\n${AX}" "\n${AY}" "\n${AZ}" "${BA}" "\n${BB}" "\n${BC}" "\n${BD}" "\n${BE}" "\n${BF}" "\n${BG}" "\n${BH}" "\n${BI}" "\n${BJ}" "\n${BK}" "\n${BL}" "\n${BM}" "\n${BN}" "\n${BO}" "\n${BP}" "\n${BQ}" "\n${BR}" "\n${BS}" "\n${BT}" "\n${BU}" "\n${BV}" "\n${BW}" "\n${BX}" "\n${BY}" "\n${BZ}" "${CA}" "\n${CB}" "\n${CC}" "\n${CD}" "\n${CE}" "\n${CF}" "\n${CG}" "\n${CH}" "\n${CI}" "\n${CJ}" "\n${CK}" "\n${CL}" "\n${CM}" "\n${CN}" "\n${CO}" "\n${CP}" "\n${CQ}" "\n${CR}" "\n${CS}" "\n${CT}" "\n${CU}" "\n${C}V}" "\n${CW}" "\n${CX}" "\n${CY}" "\n${CZ}" > /home/${ON_USER}/.fonts.conf
chown ${ON_USER} /home/${ON_USER}/.fonts.conf
sudo chmod -w /usr/share/fonts -R
A="category truetype"
B="begin /usr/share/fonts/truetype/custom/tahoma.ttf"
C="Family = Tahoma"
D="FontName = Tahoma-Regular"
E="Encoding = Unicode"
F="Location = Magyar Dutch Spanish Czech Russian English Catalan Slovak Italian Turkish Danish Slovenian Basque Portuguese German Polish Swedish Norwegian French Finnish Greek"
G="Charset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 ISO10646-1"
H="UniCharset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712"
I="GeneralFamily = SansSerif"
J="Weight = Medium"
K="Width = Variable"
L="Shape = NoSerif Upright"
M="Foundry = Microsoft"
N="Priority = 20"
O="end"
P="begin /usr/share/fonts/truetype/custom/tahomabd.ttf"
Q="Family = Tahoma"
R="FontName = Tahoma-Bold"
S="Encoding = Unicode"
T="Location = Magyar Dutch Spanish Czech Russian English Catalan Slovak Italian Turkish Danish Slovenian Basque Portuguese German Polish Swedish Norwegian French Finnish Greek"
U="Charset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712 ISO10646-1"
V="UniCharset = ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 ISO8859-10 ISO8859-13 ISO8859-14 ISO8859-15 KOI8-R KOI8-U CP1251 VISCII1.1-1 TCVN-5712"
W="GeneralFamily = SansSerif"
X="Weight = Bold"
Y="Width = Variable"
Z="Shape = NoSerif Upright"
AA="Foundry = Microsoft"
AB="Priority = 20"
AC="end"
sudo echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" "\n${F}" "\n${G}" "\n${H}" "\n${I}" "\n${J}" "\n${K}" "\n${L}" "\n${M}" "\n${N}" "\n${O}" "\n${P}" "\n${Q}" "\n${R}" "\n${S}" "\n${T}" "\n${U}" "\n${V}" "\n${W}" "\n${X}" "\n${Y}" "\n${Z}" "\n${AA}" "\n${AB}" "\n${AC}" > /etc/defoma/hints/custom.hints
sudo dpkg-reconfigure fontconfig
sudo fc-cache -fv
dialog --title " INFO: Installation abgeschlossen " --msgbox "\nDie installation der Sharp Fonts wurde erfolgreich abgeschlossen." 10 50
;;
\"08\")
rm /etc/fonts/alias.conf /etc/fonts/local.conf /etc/fonts/misc.conf /etc/fonts/msfonts-rules.conf /home/${ON_USER}/.fonts.conf > /dev/null 2>&1;
sudo rm /etc/defoma/hints/custom.hints > /dev/null 2>&1;
;;
\"09\")
echo "Acquire::http::Pipeline-Depth \"0\";" | sudo tee -a /etc/apt/apt.conf.d/90localsettings > /dev/null
;;
\"10\")
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; sudo sed -i '/^Acquire::http::Pipeline-Depth.*/d' /etc/apt/apt.conf.d/90localsettings_back | sudo sed -i '/^Acquire::http::Pipeline-Depth.*/d' /etc/apt/apt.conf.d/90localsettings; sudo rm /etc/apt/apt.conf.d/90localsettings_back > /dev/null 2>&1;
;;
\"11\")
sudo aptitude install ntfs-3g
if [ $(grep '^[^#].*ntfs-3g' /etc/fstab | wc -l) -gt 0 ]; then
dialog --title " INFO: NTFS-3G wird bereits verwendet " --msgbox "\nNTFS-3G wird auf deinem System bereits verwendet." 10 50
else
NTFSS=$(sudo blkid -c /dev/null -t TYPE=ntfs | cut -d ':' -f 1 > ${TMPFILE})
while read curline; do
DIRR=$(echo ${CURLINE} | cut -c 6- | sed -e 's/\///g')
sudo mkdir /media/${DIRR}
NTFSUUID=$(sudo blkid -c /dev/null -t TYPE=ntfs | grep ${C}urline | cut -d '"' -f 4)
eval "echo UUID=${NTFSUUID} /media/${DIRR} ntfs-3g users 0 0" | sudo tee -a /etc/fstab > /dev/null
done < ${TMPFILE}
fi
rm ${TMPFILE} > /dev/null 2>&1;
dialog --title " INFO: NTFS-3G wurde installiert " --msgbox "\nNTFS-3G wird nun auf deinem System verwendet." 10 50
;;
\"12\")
sudo sed -i '/^UUID.*ntfs-3g.*/d' /etc/fstab;
;;
\"13\")
BASHRC="/home/${ON_USER}/.bashrc"
touch ${BASHRC}
sed -i '/*MOZ_DISABLE_PANGO.*/d' ${BASHRC}
echo "export MOZ_DISABLE_PANGO=1" >> ${BASHRC}
source ${BASHRC}
if [ \! -f `whereis sqlite3 | cut -f 2 -d ' '` ] ; then
# wenn nicht, wird dies installiert
sudo aptitude install sqlite3
fi
pkill -9 firefox*
for f in /home/${ON_USER}/.mozilla/firefox/*/*sqlite; do sqlite3 ${f} 'VACUUM;'; done
dialog --backtitle "Firefox optimieren" \
--radiolist "Bitte auswaehlen" 30 60 8 \
01 "Schneller Computer / Schnelle Verbindung (> DSL 2000)" off\
02 "Schneller Computer / Langsamere Verbindung (<= DSL 1000)" off\
03 "Schneller Computer / Langsame Verbindung (z.B. ISDN) " off\
04 "Langsamer Computer / Schnelle Verbindung " off\
05 "Langsamer Computer / Langsame Verbindung" on 2>${TMPFILE}
if [ ${?} -ne 0 ]; then return; fi
read RESULT <${TMPFILE}
case ${RESULT} in
01)
A="user_pref(\"network.http.pipelining\", true);"
B="user_pref(\"network.http.pipelining.firstrequest\", true);"
C="user_pref(\"network.http.proxy.pipelining\", true);"
D="user_pref(\"network.http.pipelining.maxrequests\", 10);"
E="user_pref(\"network.http.keep-alive\", true);"
F="user_pref(\"content.notify.backoffcount\", 5);"
G="user_pref(\"content.interrupt.parsing\", true);"
H="user_pref(\"content.max.tokenizing.time\", 2250000);"
I="user_pref(\"content.notify.interval\", 750000);"
J="user_pref(\"content.notify.ontimer\", true);"
K="user_pref(\"content.switch.threshold\", 750000);"
L="user_pref(\"nglayout.initialpaint.delay\", 0);"
M="user_pref(\"network.http.max-connections\", 48);"
N="user_pref(\"network.http.max-connections-per-server\", 32);"
O="user_pref(\"network.http.max-persistent-connections-per-proxy\", 16);"
P="user_pref(\"network.http.max-persistent-connections-per-server\", 8);"
Q="user_pref(\"browser.cache.memory.capacity\", 65536);"
R="user_pref(\"ui.submenuDelay\", 0);"
S="user_pref(\"platform_file_picker\", true);"
T="user_pref(\"layout.spellcheckDefaultlayout.spellcheckDefault\", 2);"
U="user_pref(\"browser.urlbar.autoFill\", true);"
V="user_pref(\"browser.tabs.closeWindowWithLastTab\", false);"
W="user_pref(\"browser.link.open_newwindow.restriction\", 2);"
X="user_pref(\"browser.link.open_newwindow.restriction\", 60000);"
Y="user_pref(\"view_source.editor.external\", true);"
Z="user_pref(\"view_source.editor.path\", /usr/bin/gedit);"
AA="user_pref(\"security.dialog_enable_delay\", 1000);"
BA="user_pref(\"nglayout.initialpaint.delay\", 0);"
cd /home/${ON_USER}/.mozilla/firefox/*.default/ && echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" "\n${F}" "\n${G}" "\n${H}" "\n${I}" "\n${J}" "\n${K}" "\n${L}" "\n${M}" "\n${N}" "\n${O}" "\n${P}" "\n${Q}" "\n${R}" "\n${S}" "\n${T}" "\n${U}" "\n${V}" "\n${W}" "\n${X}" "\n${Y}" "\n${Z}" "\n${AA}" "\n${AB}" > user.js
;;
02)
A="user_pref(\"network.http.pipelining\", true);"
B="user_pref(\"network.http.pipelining.firstrequest\", true);"
C="user_pref(\"network.http.proxy.pipelining\", true);"
D="user_pref(\"network.http.pipelining.maxrequests\", 10);"
E="user_pref(\"network.http.keep-alive\", true);"
F="user_pref(\"content.notify.backoffcount\", 5);"
G="user_pref(\"content.max.tokenizing.time\", 2250000);"
H="user_pref(\"content.notify.interval\", 750000);"
I="user_pref(\"content.notify.ontimer\", true);"
J="user_pref(\"content.switch.threshold\", 750000);"
K="user_pref(\"network.http.max-connections\", 48);"
L="user_pref(\"network.http.max-connections-per-server\", 16);"
M="user_pref(\"network.http.max-persistent-connections-per-proxy\", 16);"
N="user_pref(\"network.http.max-persistent-connections-per-server\", 8);"
O="user_pref(\"nglayout.initialpaint.delay\", 0);"
P="user_pref(\"browser.cache.memory.capacity\", 65536);"
Q="user_pref(\"ui.submenuDelay\", 0);"
R="user_pref(\"platform_file_picker\", true);"
S="user_pref(\"layout.spellcheckDefaultlayout.spellcheckDefault\", 2);"
T="user_pref(\"browser.urlbar.autoFill\", true);"
U="user_pref(\"browser.tabs.closeWindowWithLastTab\", false);"
V="user_pref(\"browser.link.open_newwindow.restriction\", 2);"
W="user_pref(\"browser.link.open_newwindow.restriction\", 60000);"
X="user_pref(\"view_source.editor.external\", true);"
Y="user_pref(\"view_source.editor.path\", /usr/bin/gedit);"
Z="user_pref(\"security.dialog_enable_delay\", 1000);"
AA="user_pref(\"nglayout.initialpaint.delay\", 0);"
cd /home/${ON_USER}/.mozilla/firefox/*.default/ && echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" "\n${F}" "\n${G}" "\n${H}" "\n${I}" "\n${J}" "\n${K}" "\n${L}" "\n${M}" "\n${N}" "\n${O}" "\n${P}" "\n${Q}" "\n${R}" "\n${S}" "\n${T}" "\n${U}" "\n${V}" "\n${W}" "\n${X}" "\n${Y}" "\n${Z}" "\n${AA}" > user.js
;;
03)
A="user_pref(\"network.http.pipelining\", true);"
B="user_pref(\"network.http.pipelining.firstrequest\", true);"
C="user_pref(\"network.http.proxy.pipelining\", true);"
D="user_pref(\"network.http.pipelining.maxrequests\", 10);"
E="user_pref(\"network.http.keep-alive\", true);"
F="user_pref(\"content.notify.backoffcount\", 5);"
G="user_pref(\"content.interrupt.parsing\", true);"
H="user_pref(\"content.max.tokenizing.time\", 3000000);"
I="user_pref(\"content.maxtextrun\", 8191);"
J="user_pref(\"content.notify.interval\", 750000);"
K="user_pref(\"content.notify.ontimer\", true);"
L="user_pref(\"content.switch.threshold\", 750000);"
M="user_pref(\"network.http.max-connections\", 32);"
N="user_pref(\"network.http.max-connections-per-server\", 8);"
O="user_pref(\"network.http.max-persistent-connections-per-proxy\", 8);"
P="user_pref(\"network.http.max-persistent-connections-per-server\", 4);"
Q="user_pref(\"nglayout.initialpaint.delay\", 0);"
R="user_pref(\"browser.cache.memory.capacity\", 65536);"
S="user_pref(\"ui.submenuDelay\", 0);"
T="user_pref(\"platform_file_picker\", true);"
U="user_pref(\"layout.spellcheckDefaultlayout.spellcheckDefault\", 2);"
V="user_pref(\"browser.urlbar.autoFill\", true);"
W="user_pref(\"browser.tabs.closeWindowWithLastTab\", false);"
X="user_pref(\"browser.link.open_newwindow.restriction\", 2);"
Y="user_pref(\"browser.link.open_newwindow.restriction\", 60000);"
Z="user_pref(\"view_source.editor.external\", true);"
AA="user_pref(\"view_source.editor.path\", /usr/bin/gedit);"
AB="user_pref(\"security.dialog_enable_delay\", 1000);"
AC="user_pref(\"nglayout.initialpaint.delay\", 0);"
cd /home/${ON_USER}/.mozilla/firefox/*.default/ && echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" "\n${F}" "\n${G}" "\n${H}" "\n${I}" "\n${J}" "\n${K}" "\n${L}" "\n${M}" "\n${N}" "\n${O}" "\n${P}" "\n${Q}" "\n${R}" "\n${S}" "\n${T}" "\n${U}" "\n${V}" "\n${W}" "\n${X}" "\n${Y}" "\n${Z}" "\n${AA}" "\n${AB}" "\n${AC}" > user.js
;;
04)
A="user_pref(\"network.http.pipelining\", true);"
B="user_pref(\"network.http.pipelining.firstrequest\", true);"
C="user_pref(\"network.http.proxy.pipelining\", true);"
D="user_pref(\"network.http.pipelining.maxrequests\", 10);"
E="user_pref(\"network.http.keep-alive\", true);"
F="user_pref(\"content.notify.backoffcount\", 5);"
G="user_pref(\"content.max.tokenizing.time\", 3000000);"
H="user_pref(\"content.notify.backoffcount\", 5);"
I="user_pref(\"content.notify.interval\", 1000000);"
J="user_pref(\"content.notify.ontimer\", true);"
K="user_pref(\"content.switch.threshold\", 1000000);"
L="user_pref(\"content.maxtextrun\", 4095);"
M="user_pref(\"nglayout.initialpaint.delay\", 1000);"
N="user_pref(\"network.http.max-connections\", 48);"
O="user_pref(\"network.http.max-connections-per-server\", 16);"
P="user_pref(\"network.http.max-persistent-connections-per-proxy\", 16);"
Q="user_pref(\"network.http.max-persistent-connections-per-server\", 8);"
R="user_pref(\"dom.disable_window_status_change\", true);"
S="user_pref(\"platform_file_picker\", true);"
T="user_pref(\"layout.spellcheckDefaultlayout.spellcheckDefault\", 2);"
U="user_pref(\"browser.urlbar.autoFill\", true);"
V="user_pref(\"browser.tabs.closeWindowWithLastTab\", false);"
W="user_pref(\"browser.link.open_newwindow.restriction\", 2);"
X="user_pref(\"browser.link.open_newwindow.restriction\", 60000);"
Y="user_pref(\"view_source.editor.external\", true);"
Z="user_pref(\"view_source.editor.path\", /usr/bin/gedit);"
AA="user_pref(\"security.dialog_enable_delay\", 1000);"
AB="user_pref(\"nglayout.initialpaint.delay\", 100);"
cd /home/${ON_USER}/.mozilla/firefox/*.default/ && echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" "\n${F}" "\n${G}" "\n${H}" "\n${I}" "\n${J}" "\n${K}" "\n${L}" "\n${M}" "\n${N}" "\n${O}" "\n${P}" "\n${Q}" "\n${R}" "\n${S}" "\n${T}" "\n${U}" "\n${V}" "\n${W}" "\n${X}" "\n${Y}" "\n${Z}" "\n${AA}" "\n${AB}" > user.js
;;
05)
A="user_pref(\"network.http.pipelining\", true);"
B="user_pref(\"network.http.pipelining.firstrequest\", true);"
C="user_pref(\"network.http.proxy.pipelining\", true);"
D="user_pref(\"network.http.pipelining.maxrequests\", 10);"
E="user_pref(\"network.http.keep-alive\", true);"
F="user_pref(\"content.notify.backoffcount\", 5);"
G="user_pref(\"content.max.tokenizing.time\", 2250000);"
H="user_pref(\"content.notify.interval\", 750000);"
I="user_pref(\"content.notify.ontimer\", true);"
J="user_pref(\"content.switch.threshold\", 750000);"
K="user_pref(\"nglayout.initialpaint.delay\", 750);"
L="user_pref(\"network.http.max-connections\", 32);"
M="user_pref(\"network.http.max-connections-per-server\", 8);"
N="user_pref(\"network.http.max-persistent-connections-per-proxy\", 8);"
O="user_pref(\"network.http.max-persistent-connections-per-server\", 4);"
P="user_pref(\"dom.disable_window_status_change\", true);"
Q="user_pref(\"platform_file_picker\", true);"
R="user_pref(\"layout.spellcheckDefaultlayout.spellcheckDefault\", 2);"
S="user_pref(\"browser.urlbar.autoFill\", true);"
T="user_pref(\"browser.tabs.closeWindowWithLastTab\", false);"
U="user_pref(\"browser.link.open_newwindow.restriction\", 2);"
V="user_pref(\"browser.link.open_newwindow.restriction\", 60000);"
W="user_pref(\"view_source.editor.external\", true);"
X="user_pref(\"view_source.editor.path\", /usr/bin/gedit);"
Y="user_pref(\"security.dialog_enable_delay\", 1000);"
Z="user_pref(\"nglayout.initialpaint.delay\", 100);"
cd /home/${ON_USER}/.mozilla/firefox/*.default/ && echo -e "${A}" "\n${B}" "\n${C}" "\n${D}" "\n${E}" "\n${F}" "\n${G}" "\n${H}" "\n${I}" "\n${J}" "\n${K}" "\n${L}" "\n${M}" "\n${N}" "\n${O}" "\n${P}" "\n${Q}" "\n${R}" "\n${S}" "\n${T}" "\n${U}" "\n${V}" "\n${W}" "\n${X}" "\n${Y}" "\n${Z}" > user.js
;;
*)
continue
;;
esac
;;
\"14\")
sudo aptitude install miredo;
sudo /etc/init.d/miredo start;
ping6 -c 4 ipv6.google.com;
;;
\"15\")
sudo aptitude purge miredo;
echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf;
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf;
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf;
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf;
;;
\"16\")
aufraemen;
sudo aptitude install localepurge;
localepurge;
;;
\"17\")
sudo aptitude install safe-rm;
;;
*)
echo "Fehler?!?!";
;;
esac
done
}
# aufraemen: auch diese Funktion, zum aufraemen von Ubuntu, wird momentan nicht im Skript verwendet...
# ... um diese wieder aufzunehmen, muss man die Funktion einfach an einer Stelle im Skript aufrufen.
#
function aufraemen() {
chooseDialog
TITLE="APT-Cache"
MESSAGE="APT-Cache aufraumen..."
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
sudo aptitude autoclean
chooseDialog
TITLE="...aufraumen..."
MESSAGE="nicht mehr benoetigte Abhaengigkeiten aufraumen..."
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
sudo apt-get autoremove
chooseDialog
TITLE="alte Config-Dateien"
MESSAGE="alte Config-Dateien loeschen..."
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
echo -e $GELB"alte Config-Dateien loeschen..."$FARBLOS
sudo aptitude purge $OLDCONF
chooseDialog
TITLE="alte Kernel"
MESSAGE="alte Kernel loeschen..."
setDialogDimensions "${MESSAGE}"
dialog --title " ${TITLE} " --msgbox "\n`echo -e "${MESSAGE}"`" ${DIALOG_H} ${DIALOG_W}
sudo aptitude purge $OLDKERNELS
# kann ggf. einkommentiert werden, wenn man den Papierkorb auch geleert haben moechte
# rm -rf /home/*/.local/share/Trash/*/** &> /dev/null
# rm -rf /root/.local/share/Trash/*/** &> /dev/null
}
# main_menu: Dies ist das Hauptmenue, von wo aus neue Funktionen aufgerufen werden koennen
#
function main_menu() {
dialog --backtitle "suckup.de" --title " ubuntu-11.04-tweak - V. ${VERSION} "\
--no-shadow\
--no-cancel\
--menu "Move using [UP] [DOWN], [Enter] to select" 15 80 10\
Quellen "Repositories: fuer Ubuntu 11.04"\
Tweak-Gnome "Gnome-Einstellungen anpassen"\
Tweak-Unity "Unity-Einstellungen anpassen"\
Tweak-Ubuntu "Ubuntu-Einstellungen anpassen"\
Quit "Exit" 2>${TMPFILE}
opt=${?}
if [ ${?} -ne "0" ]; then return; fi
read MENUITEM <${TMPFILE}
case ${MENUITEM} in
Quellen) launchpad_add;;
Tweak-Gnome) gnome_tweak;;
Tweak-Unity) unity_tweak;;
Tweak-Ubuntu) ubuntu_tweak;;
Quit) sudo rm ${TMPFILE}; sudo chmod +r ${SOURCES}; exit;;
esac
}
while true; do
main_menu
done