Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Vos petites astuces, répertoire des tutoriels et astuces
Avatar du membre
david37
modérateur
Messages : 3884
Enregistré le : lun. 22 août 2016 05:06

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par david37 »

Dernier message de la page précédente :

Testé et approuvé ! :D

J'ai juste remplacé les premières lignes de la sorte:

Code : Tout sélectionner

fon=(REMOVE_ PPA_ INSTALL_)

ins=(audacity)

ppa=(heyarje/libav-11)

rmv=(opera)
Je voulais juste voir si ça marchait et j'avais pas besoin de tout ce qui était listé (imprimante, dropbox, client thunderbird, radiotray), donc j'ai supprimé ces parties et lancé le script.

... la petite erreur de débutant... j'ai pas lancé avec sudo... du coup il m'a dit que c'était "installed" alors qu'il avait pas pu :oops:
Mais bon, j'ai relancé en mettant sudo devant le bash "Nom du Script" et ça a marché nikel. :D

Merci Windows pour avoir partagé ce script avec nous ;)
A+

David
PC1: Mobo: Gigabyte B550 AORUS Elite 2 / CPU: AMD Ryzen 7 3700X / GPU: MSI Radeon RX 580 Armor / RAM: 32 GB @3600 MHz CL16 / SSD: Samsung 970 EVO 500 GB / LM 20.2 Xfce
PC2: HP Pavilion 15 / AMD Ryzen 5 5500U with Radeon Graphics / 16GB RAM / 500 GB SSD / Debian 11 Xfce
PC3: Dell-Latitude E7240 / 2.1GHz i7-4600U / Intel Haswell-ULT HD 4400 / 8GB RAM / 250 GB Hard Drive / LM 20.2 Xfce

Berclav
Messages : 59
Enregistré le : dim. 11 mars 2018 13:00

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par Berclav »

Mais il est où ce script, j'ai rien compris !
Et comment ça s'utilise ?
PC Desktop homemade (tour mATX) - Alim Corsair CX430M
Dual boot Linux Mint 18.1 Serena 64bits / Windows XP SP3 - Cinnamon 3.2.7 - Kernel 4.4.0-124-generic x86_64
MSI A88XM-E35 V2 BIOS v : 6.0 en mode non UEFI - AMD A4 7300 APU - 2x 4 Go DDR3
APU with Radeon HD Graphics (8470 D) reconnu - Samsung Syncmaster B2430 - 1920x1080

Avatar du membre
débitant
modérateur
Messages : 11534
Enregistré le : mar. 14 juil. 2015 18:22
Localisation : Lorraine France

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par débitant »

l'auteur l'a supprimé de son premier post, je lui ai laissé un mp la semaine dernière et j'attends la réponse ;)

zeb
Messages : 16473
Enregistré le : ven. 19 juin 2015 22:13
Localisation : plus ici

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par zeb »

Berclav a écrit :Mais il est où ce script, j'ai rien compris !
david37 a écrit :J'ai juste remplacé les premières lignes de la sorte:

Code : Tout sélectionner

fon=(REMOVE_ PPA_ INSTALL_)

ins=(audacity)

ppa=(heyarje/libav-11)

rmv=(opera)
Je pense que ca doit être possible de le retrouver ;)
Notre ami avec un pseudo en or :lol: n'est plus venu depuis le 17 juillet :roll:

Berclav
Messages : 59
Enregistré le : dim. 11 mars 2018 13:00

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par Berclav »

Ah oui je vois
Bon ok mais sinon il y a moyen de faire des fichiers qui s'exécutent comme les fichiers .bat ou .com sur Windaube :mrgreen: ? je ne sais pas ça et pourtant j'en ai fait des installations difficiles de toutes sortes notamment Firefox double version avec un profil par version
PC Desktop homemade (tour mATX) - Alim Corsair CX430M
Dual boot Linux Mint 18.1 Serena 64bits / Windows XP SP3 - Cinnamon 3.2.7 - Kernel 4.4.0-124-generic x86_64
MSI A88XM-E35 V2 BIOS v : 6.0 en mode non UEFI - AMD A4 7300 APU - 2x 4 Go DDR3
APU with Radeon HD Graphics (8470 D) reconnu - Samsung Syncmaster B2430 - 1920x1080

Avatar du membre
débitant
modérateur
Messages : 11534
Enregistré le : mar. 14 juil. 2015 18:22
Localisation : Lorraine France

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par débitant »

bonjour,
je le remet, mais je ne garantis pas le fonctionnement sur lm18 (script fait par @Windows, pas bilou :l )
et ne je sais toujours pas pourquoi il l'a enlevé de son post, j'attends toujours la réponse :(
encore une fois sans garantie :mrgreen:

Code : Tout sélectionner

#!/bin/bash

fon=(REMOVE_ PPA_ INSTALL_ DCP750CW_ DROPBOX_ PROFILE_THUNDERBIRD_ RADIOTRAY_)

ins=(audacity dropbox gparted indicator-cpufreq nemo-dropbox radiotray)

ppa=(gwendal-lebihan-dev/cinnamon-nightly)

rmv=(brltty espeak espeak-data firefox-locale-en gnome-accessibility-themes hexchat hexchat-common hyphen-en-us language-pack-en-base libbrlapi0.6 liblouis-data libreoffice-help-en-us libsonic0 libspeechd2 pidgin pidgin-data pix pix-data printer-driver-brlaser printer-driver-c2esp printer-driver-min12xxw printer-driver-ptouch printer-driver-sag-gdi printer-driver-splix speech-dispatcher-audio-plugins thunderbird-locale-en toshset virtualbox-guest-utils)

REMOVE_()
{
r=0
tr=0
echo "[`printf '%02d' ${#rmv[@]}`] listed."
while [ "$r" -lt "${#rmv[@]}" ]
do
if (dpkg --get-selections | grep -qw "${rmv[$r]}")
then
apt-get -y autoremove --purge ${rmv[$r]} >/dev/null 2>&1
echo "[--] ${rmv[$r]}."
tr=$(($tr+1))
fi
r=$(($r+1))
done
echo "[`printf '%02d' $tr`] removed."
}

PPA_()
{
p=0
tp=0
echo "[`printf '%02d' ${#ppa[@]}`] listed."
while [ "$p" -lt "${#ppa[@]}" ]
do
if !(grep -lqr "${ppa[$p]}" /etc/apt/sources.list.d)
then
add-apt-repository -y ppa:${ppa[$p]} >/dev/null 2>&1
apt-get -y update >/dev/null 2>&1
echo "[++] ${ppa[$p]}."
tp=$(($tp+1))
fi
p=$(($p+1))
done
echo "[`printf '%02d' $tp`] installed."
}

INSTALL_()
{
i=0
ti=0
echo "[`printf '%02d' ${#ins[@]}`] listed."
while [ "$i" -lt "${#ins[@]}" ]
do
if !(dpkg --get-selections | grep -qw "${ins[$i]}")
then
apt-get -y install ${ins[$i]} >/dev/null 2>&1
echo "[++] ${ins[$i]}."
ti=$(($ti+1))
fi
i=$(($i+1))
done
echo "[`printf '%02d' $ti`] installed."
}

DCP750CW_()
{
if [ ! -f /usr/share/cups/model/brdcp750cw.ppd ]
then
wget -cq http://download.brother.com/welcome/dlf005471/dcp750cwlpr-1.0.1-1.i386.deb
wget -cq http://download.brother.com/welcome/dlf005473/dcp750cwcupswrapper-1.0.1-1.i386.deb
wget -cq http://download.brother.com/welcome/dlf006637/brscan2-0.2.5-1.amd64.deb
dpkg -i --force-all dcp750cwlpr* dcp750cwcupswrapper* brscan* >/dev/null 2>&1
rm -f brscan* dcp750cw*
lpadmin -p 'DCP750CW' \
-v 'socket://192.168.1.3' \
-m 'DCP750CW series CUPS' \
-P '/usr/share/cups/model/brdcp750cw.ppd' \
-L 'Home' \
-o 'Two-Sided Printing=DuplexNoTumble' \
-o 'Color=Mono' \
-o 'Enhance Black Printing=ON' \
-o 'Skip Blank Page=ON' \
-o 'printer-is-shared=false' \
-E
lpadmin -d 'DCP750CW'
brprintconf_dcp750cw -pt A4
brsaneconfig2 -a name=DCP750CW model=DCP-750CW ip=192.168.1.3
cp -rf /usr/lib64/* /usr/lib
echo '[++] installed.'
else
echo '[==] already installed.'
fi
}

DROPBOX_()
{
if [ "$(dropbox status)" != "À jour" ]
then
(grep -nq 'X-GNOME-Autostart-Delay=30' /usr/share/applications/dropbox.desktop) ||
bash -c "cat >> /usr/share/applications/dropbox.desktop <<-'eof'
X-GNOME-Autostart-Delay=30
eof"
[ -f /etc/xdg/autostart/dropbox.desktop ] ||
cp /usr/share/applications/dropbox.desktop /etc/xdg/autostart
rm -rf ~/.cache/dconf
echo -n '[++] '
su -l $(who | cut -d' ' -f1) -c "dropbox start -i"
while [ "$(dropbox status)" != "À jour" ]
do
sleep 1
done
d=0
dro=($(ls ~/Dropbox))
while [ "$d" -lt "${#dro[@]}" ]
do
echo "[++] ${dro[$d]}."
d=$(($d+1))
done
else
echo '[==] already started.'
fi
}

PROFILE_THUNDERBIRD_()
{
if [ -f ~/Dropbox/profile.tar.gz ]
then
if [ ! -d ~/.thunderbird ]
then
[ -d '/usr/lib/thunderbird-addons/extensions/{9533f794-00b4-4354-aa15-c2bbda6989f8}' ] ||
{
wget -cq https://addons.mozilla.org/thunderbird/downloads/latest/firetray/platform:2/addon-4868-latest.xpi
mkdir /usr/lib/thunderbird-addons/extensions/{9533f794-00b4-4354-aa15-c2bbda6989f8}
unzip -q ~/addon-4868-latest.xpi -d /usr/lib/thunderbird-addons/extensions/{9533f794-00b4-4354-aa15-c2bbda6989f8}
rm -f addon-4868*
echo '[++] firetray.'
}
[ -f '/usr/lib/thunderbird-addons/extensions/hide-local-folders@alexcabal.com.xpi' ] ||
{
wget -cq https://addons.mozilla.org/thunderbird/downloads/latest/hide-local-folders/addon-438960-latest.xpi
mv ~/addon-438960-latest.xpi /usr/lib/thunderbird-addons/extensions/hide-local-folders@alexcabal.com.xpi
echo '[++] hide-local-folders.'
}
[ -d '/usr/lib/thunderbird-addons/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}' ] ||
{
wget -cq https://addons.mozilla.org/thunderbird/downloads/latest/lightning/platform:2/addon-2313-latest.xpi
mkdir /usr/lib/thunderbird-addons/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
unzip -q addon-2313-latest.xpi -d /usr/lib/thunderbird-addons/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
rm -f ~/addon-2313*
echo '[++] lightning.'
}
[ -d '/usr/lib/thunderbird-addons/extensions/{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}' ] ||
{
wget -cq 'https://addons.mozilla.org/thunderbird/downloads/latest/provider-for-google-calendar/addon-4631-latest.xpi'
mkdir /usr/lib/thunderbird-addons/extensions/{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}
unzip -q ~/addon-4631-latest.xpi -d /usr/lib/thunderbird-addons/extensions/{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}
rm -f ~/addon-4631*
echo '[++] provider-for-google-calendar.'
}
[ -f /etc/xdg/autostart/thunderbird.desktop ] ||
cp /usr/share/applications/thunderbird.desktop /etc/xdg/autostart
su -l $(who | cut -d' ' -f1) -c "tar zxf ~/Dropbox/profile.tar.gz -C ~/ && mv ~/profile ~/.thunderbird && thunderbird -P"
echo '[++] installed.'
else
echo '[==] already installed.'
fi
else
echo '[xx] no profile.'
fi
}

RADIOTRAY_()
{
if [ ! -f /etc/xdg/autostart/radiotray.desktop ]
then
cp /usr/share/applications/radiotray.desktop /etc/xdg/autostart
bash -c "cat > /usr/share/radiotray/bookmarks.xml <<-'eof'
<bookmarks>
<group name=\"root\">
<bookmark name=\"France Info\" url=\"http://direct.franceinfo.fr/live/franceinfo-midfi.mp3\"/>
</group>
</bookmarks>
eof"
sed -i "s/0.05/1.0/" /usr/share/radiotray/config.xml
echo '[++] updated.'
else
echo '[==] already updated.'
fi
}

f=0
while [ "$f" -ne "${#fon[@]}" ]
do
shopt -s nocasematch
read -p "[lm] $(echo  ${fon[$f]} | sed -e "s/_/ /g")? [y][↲] " rep
case $rep
in
yes|y)
${fon[$f]};;
esac
f=$(($f+1))
done

exit 0

# lm #
donc si tu veux l'essayer , tiens nous au courant ça pourra servir ;)

Berclav
Messages : 59
Enregistré le : dim. 11 mars 2018 13:00

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par Berclav »

C'est à sauvegarder sous le nom de fichier *.sh c'est ça ?
PC Desktop homemade (tour mATX) - Alim Corsair CX430M
Dual boot Linux Mint 18.1 Serena 64bits / Windows XP SP3 - Cinnamon 3.2.7 - Kernel 4.4.0-124-generic x86_64
MSI A88XM-E35 V2 BIOS v : 6.0 en mode non UEFI - AMD A4 7300 APU - 2x 4 Go DDR3
APU with Radeon HD Graphics (8470 D) reconnu - Samsung Syncmaster B2430 - 1920x1080


Avatar du membre
arghlub
Administrateur du site
Messages : 10421
Enregistré le : dim. 21 mai 2017 08:19
Localisation : Provence
Contact :

Re: Script post clean install Linux Mint 18.1 "Serena" - Cinnamon (64-bit).

Message par arghlub »

Salut,

@Berclav : Et n'oublie pas de lui donner les droits d'exécution avec :

Code : Tout sélectionner

chmod u+x NOM_QUE_TU_VEUX.sh
Ensuite pour lancer le script (ne pas omettre le ./ au début) :

Code : Tout sélectionner

./NOM_QUE_TU_VEUX.sh
;)
Tour1 (custom)CM MSI Z270 M3 | CPU Intel I7-7700K | CG Nvidia GTX 1080 | RAM 16Go | tripleBoot : Debian 11 | MXlinux 21 | LMint 19.3 | XFCE
Tour2 (custom)CM Gigabyte | CPU AMD Athlon 5200+ | CG Nvidia GTX 560 | RAM 6Go | FreeBSD 12.1 XFCE
Portable1 MSI GF75 Thin 9SC | CPU Intel I7-9750H | CG Nvidia GTX 1650 | RAM 32Go | dualBoot : LMint 20.2 | MXlinux 21 | XFCE
Portable2 MacBook Air A1466 (2015) | CPU Intel I5-5250U | CG Intel HD Graphics 6000 | RAM 8Go | dualBoot : macOS Sierra | MXlinux 21 XFCE
─────( pour une informatique libre ! -membre en stand-by de l' April.org────────────────

Répondre