1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| #--Installation des logiciels alternatifs
apt-get -y install iceweasel iceweasel-l10n-fr scite filezilla xfce4-wavelan-plugin p7zip unzip xfce4-screenshooter-plugin xpdf xfburn abiword gtk2-engines-pixbuf
#--Installation de Xfce 4.6
#modification du sources.list
echo "
#Xfce 4.6.0 (lenny, i386, amd64)
deb http://www.debian-desktop.org/pub/linux/debian/xfce46 lenny xfce460
deb-src http://www.debian-desktop.org/pub/linux/debian/xfce46 lenny xfce460
#Flashplugin-nonfree
deb http://www.backports.org/debian etch-backports main contrib non-free
" >> /etc/apt/sources.list
#appropriation du sources.list
chown root /etc/apt/sources.list
#ajout des clés de gestion de packets
wget http://www.debian-desktop.org/pub/linux/debian/debian-desktop.org.key
apt-key add ./debian-desktop.org.key
rm debian-desktop.org.key
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 16BA136C
gpg --export 16BA136C | apt-key add -
#--Mise a jour du système
apt-get -y update
#--Installation de Xfce 4.6(avec SLiM et theme d'icons gnome)
apt-get -y install xfce4 xfce4-terminal gnome-icon-theme slim flashplugin-nonfree
#--Configuration de SLiM
#Ajout du thème SLiM -> Fingerprint
wget http://download.berlios.de/slim/slim-fingerprint.tar.gz
tar xvzf slim-fingerprint.tar.gz -C /usr/share/slim/themes
rm slim-fingerprint.tar.gz
# Modification du fichier de configuration
# Modification du thème
sed -i 's/\(current_theme \).*/current_theme fingerprint/' /etc/slim.conf
# Ajout de configuration utiles
sed -i 's/# hidecursor/hidecursor/' /etc/slim.conf
sed -i 's/hidecursor false/hidecursor true/' /etc/slim.conf
sed -i 's/# numlock/numlock/' /etc/slim.conf
sed -i 's/numlock off/numlock on/' /etc/slim.conf
#--Mise a jour du système
apt-get -y update
#--Désinstallation des packets inutiles
##apt-get autoremove
#Installation du thème Matt
mkdir /usr/share/themes
wget http://cubitouch.fr/Synaps/dokuwiki/lib/exe/fetch.php?media=matt-theme.tar.gz
tar xvzf fetch.php?media=matt-theme.tar.gz -C /usr/share/themes
rm fetch.php?media=matt-theme.tar.gz
#demande de l'utilisateur qui doit recevoir le theme
read -p "Entrez le nom de l'utilisateur a configurer (ou taper 'suite') : " reponse
#ajouter les fichiers utiles lors de la premiere connexion de l'utilisateur
while [ "$reponse" != "suite" ]
do
test -d /home/$reponse/
if [[ "$?" == "0" ]]
then
echo "#!/bin/bash
# Mise en place du thème Matt
if [[ \$USER == "$reponse" ]]
then
xfconf-query -c xsettings -p /Net/ThemeName -s \"Matt\"
sleep 10
xfconf-query -c xfwm4 -p /general/theme -s \"Matt\"
xterm -e su -c \"rm /etc/xdg/autostart/affectMattTheme.$reponse.desktop
rm /etc/xdg/autostart/affectMattTheme.$reponse.sh\" & wait
fi
exit 0" >> /etc/xdg/autostart/affectMattTheme.$reponse.sh
echo "[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=affectMattTheme.$reponse
Comment=Affectation du thème Matt pour l'utilisateur $reponse, lors de sa première connexion
Exec=sh /etc/xdg/autostart/affectMattTheme.$reponse.sh
StartupNotify=false
Terminal=false
Hidden=false" >> /etc/xdg/autostart/affectMattTheme.$reponse.desktop
else
echo "Erreur : login incorrect ?"
fi
read -p "Entrez le nom d'un autre utilisateur a configurer (ou taper 'suite') : " reponse
done
reboot
exit 0 |
Partager