X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=ubuntu%2Fubuntu-cfg.sh;h=73086c6fe411df898e1c7b0e152dcf784d8f694e;hb=75e8f41642c1beeee2c43c7ba11ca9e13e4a2b9d;hp=d04180c7d34102e556f9911dc322d3542b3bda51;hpb=e12c484908f6986840e7f4d542a26e1947b77ae6;p=hvlinux.git diff --git a/ubuntu/ubuntu-cfg.sh b/ubuntu/ubuntu-cfg.sh index d04180c..73086c6 100755 --- a/ubuntu/ubuntu-cfg.sh +++ b/ubuntu/ubuntu-cfg.sh @@ -4,11 +4,21 @@ set -o errexit # Liste des items: # 1. Désactiver touch CAPS LOCK +#INSTALL_WMAKER=1 + GST=gstreamer0.10 APT="sudo apt-get --yes --force-yes" AGI="${APT} install" +ubuntu_cleanup() +{ + sudo deborphan | xargs sudo apt-get -y remove --purge + ${APT} autoremove + ${APT} clean + ${APT} autoclean +} + if [ "`id -u`" -eq 0 ]; then echo "You must NOT be the super-user to execute this script" exit 1 @@ -49,43 +59,95 @@ if dpkg --list | grep "gwibber" 1> /dev/null 2>&1; then ${APT} remove --purge gwibber gwibber-service fi +if dpkg --list | grep "vinagre" 1> /dev/null 2>&1; then + ${APT} remove --purge vinagre +fi + +# Braille +if dpkg --list | grep "brltty" 1> /dev/null 2>&1; then + ${APT} remove --purge brltty +fi + +# CouchDB and erlang +if dpkg --list | grep "erlang-base" 1> /dev/null 2>&1; then + ${APT} remove --purge erlang* +fi + +# Ubuntu One +if dpkg --list | grep "libubuntuone" 1> /dev/null 2>&1; then + ${APT} remove --purge ubuntuone* +fi + +if dpkg --list | grep "apparmor-utils" 1> /dev/null 2>&1; then + sudo /etc/init.d/apparmor stop + sudo update-rc.d -f apparmor remove + ${APT} remove --purge apparmor apparmor-utils libapparmor1 +fi + # Remove proprietary code/drivers if dpkg --list | grep "nvidia" 1> /dev/null 2>&1; then ${APT} remove --purge nvidia-* fi -# Configuration SSH -if [ ! -f ${HOME}/.ssh/id_dsa.pub ]; then - ssh-keygen -t dsa - # Append the contents of your public key (~/.ssh/id_dsa.pub) to the - # ~/.ssh/authorized_keys file on the remote server -fi - # Désactivation du son à l'écran de login -sudo -u gdm gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false +sudo -u gdm gconftool --set /desktop/gnome/sound/event_sounds --type bool false + +# Désactive le sound theme +gconftool --set /desktop/gnome/sound/event_sounds --type bool false # Ramener les boutons à droite dans les fenêtres Gtk+: -gconftool-2 --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close +gconftool --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close # Format horloge 24 heures -gconftool-2 --set /apps/panel/applets/clock_screen0/prefs/format --type string 24-hour +gconftool --set /apps/panel/applets/clock_screen0/prefs/format --type string 24-hour # Configuration de Nautilus - pas de preview pour ne pas ralentir -gconftool-2 --set /apps/nautilus/preferences/preview_sound --type string never -gconftool-2 --set /apps/nautilus/preferences/show_directory_item_counts --type string never -gconftool-2 --set /apps/nautilus/preferences/show_icon_text --type string never -gconftool-2 --set /apps/nautilus/preferences/show_image_thumbnails --type string never -gconftool-2 --set /apps/nautilus/preferences/media_automount_open --type bool false +gconftool --set /apps/nautilus/preferences/preview_sound --type string never +gconftool --set /apps/nautilus/preferences/show_directory_item_counts --type string never +gconftool --set /apps/nautilus/preferences/show_icon_text --type string never +gconftool --set /apps/nautilus/preferences/show_image_thumbnails --type string never +gconftool --set /apps/nautilus/preferences/media_automount_open --type bool false +# Affiche le path complet +gconftool --set /apps/nautilus/preferences/always_use_location_entry --type bool true # Démarrage de Rhythmbox non minimisé -gconftool-2 --set /apps/rhythmbox/plugins/status-icon/window-visible --type boolean true +gconftool --set /apps/rhythmbox/plugins/status-icon/window-visible --type boolean true + +# Désactivation demande du mot de passe en mode hibernation +gconftool --type Boolean --set /apps/gnome-power-manager/lock/suspend false +gconftool --type Boolean --set /apps/gnome-power-manager/lock/hibernate false + +for dir in Public Templates ; do + if [ -d ${HOME}/${dir} ]; then + rmdir ${HOME}/${dir} + fi +done + +# Configuration SSH +if [ ! -f ${HOME}/.ssh/id_dsa.pub ]; then + ssh-keygen -t dsa + # Append the contents of your public key (~/.ssh/id_dsa.pub) to the + # ~/.ssh/authorized_keys file on the remote server +fi + +# localepurge recovers diskspace wasted for unneeded locale files and localized man pages. +# It will automagically be invoked upon completion of any apt installation run. +${AGI} localepurge + +if lspci | grep "BCM43" 1> /dev/null 2>&1; then + if [ ! -f /etc/modprobe.d/b43.conf ]; then + sudo touch /etc/modprobe.d/b43.conf + echo "options b43 pio=1 qos=0" | sudo tee -a /etc/modprobe.d/b43.conf + ${AGI} b43-fwcutter firmware-b43-lpphy-installer + fi +fi + +${AGI} deborphan +ubuntu_cleanup ${APT} update ${APT} upgrade ${APT} dist-upgrade -${APT} autoremove -${APT} clean -${APT} autoclean # Configuration de GRUB sudo sed -i -e 's!^\(GRUB_CMDLINE_LINUX_DEFAULT=\)"quiet splash"!\1"ipv6.disable=1"!' /etc/default/grub @@ -108,18 +170,6 @@ EOF sudo chmod +x /etc/grub.d/05_hugo_theme sudo update-grub -# localepurge recovers diskspace wasted for unneeded locale files and localized man pages. -# It will automagically be invoked upon completion of any apt installation run. -${AGI} localepurge - -if lspci | grep "BCM43" 1> /dev/null 2>&1; then - if [ ! -f /etc/modprobe.d/b43.conf ]; then - sudo touch /etc/modprobe.d/b43.conf - echo "options b43 pio=1 qos=0" | sudo tee -a /etc/modprobe.d/b43.conf - ${AGI} b43-fwcutter - fi -fi - ${AGI} emacs ${AGI} reiserfsprogs gparted @@ -128,6 +178,9 @@ ${AGI} reiserfsprogs gparted ${AGI} nfs-common portmap # Development +${AGI} subversion +${AGI} git + ${AGI} build-essential texinfo gettext gawk bison flex ${AGI} autoconf autoconf-doc autotools-dev libtool ${AGI} manpages manpages-dev manpages-posix manpages-posix-dev @@ -143,15 +196,26 @@ ${AGI} libncurses-dev # Debian packaging ${AGI} dh-make lintian dupload -${AGI} subversion -${AGI} git - ${AGI} abiword gnumeric gnumeric-plugins-extra ${AGI} texlive texlive-latex-recommended texlive-latex-extra texlive-humanities # Multimedia ${AGI} jackd patchage ${AGI} pulseaudio-module-jack + +if [ ! -f ${HOME}/.pulse/pulsejack.pa ]; then + cp /etc/pulse/default.pa ${HOME}/.pulse/pulsejack.pa +fi + +if ! grep "load-module module-jack-source" ${HOME}/.pulse/pulsejack.pa 1> /dev/null 2>&1; then + cat >> ${HOME}/.pulse/pulsejack.pa << "EOF" + +### JACK setup (Hugo Villeneuve) +load-module module-jack-source +load-module module-jack-sink +EOF +fi + sudo adduser $(whoami) audio # /etc/security/limits.d/audio.conf -> set rtprio from 95 to 99 ??? @@ -185,13 +249,15 @@ gconftool -s /desktop/gnome/url-handlers/mailto/command -t string "sylpheed --co sed -i -e 's!^\( ${HOME}/GNUstep/Library/WindowMaker/autostart << "EOF" +if [ "x${INSTALL_WMAKER}" = "x1" ]; then + ${AGI} wmaker + if [ -d ${HOME}/GNUstep/Library/WindowMaker ]; then + cat > ${HOME}/GNUstep/Library/WindowMaker/autostart << "EOF" #!/bin/sh gnome-settings-daemon EOF - chmod 755 ${HOME}/GNUstep/Library/WindowMaker/autostart + chmod 755 ${HOME}/GNUstep/Library/WindowMaker/autostart + fi fi ${AGI} pcmanfm @@ -203,9 +269,9 @@ EOF ${AGI} epdfview ${AGI} psutils +${AGI} imagemagick ${AGI} gimp -${AGI} deborphan -sudo deborphan | xargs sudo apt-get -y remove --purge +ubuntu_cleanup exit $?